0

I'm running into some trouble with emacs evil. I get the error

(wrong-number-of-arguments (3 . 4) 2)

and when I run debug I get the following message:

Debugger entered--Lisp error: (wrong-number-of-arguments (3 . 4) 2)
  #f(compiled-function (obsolete-name current-name when &optional docstring) "Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete.\n\n(define-obsolete-function-alias \\='old-fun \\='new-fun \"28.1\" \"old-fun's doc.\")\n\nis equivalent to the following two lines of code:\n\n(defalias \\='old-fun \\='new-fun \"old-fun's doc.\")\n(make-obsolete \\='old-fun \\='new-fun \"28.1\")\n\nWHEN should be a string indicating when the function was first\nmade obsolete, for example a date or a release number.\n\nSee the docstrings of `defalias' and `make-obsolete' for more details." #<bytecode 0x176864f919538488>)('evil-ex-shell-command-completion-at-point 'comint-completion-at-point)
  (define-obsolete-function-alias 'evil-ex-shell-command-completion-at-point 'comint-completion-at-point)
  load-with-code-conversion("c:/Users/-/AppData/Roaming/.emacs.d/elpa/evil-..." "c:/Users/-/AppData/Roaming/.emacs.d/elpa/evil-..." nil t)
  require(evil-ex)
  load-with-code-conversion("c:/Users/-/AppData/Roaming/.emacs.d/elpa/evil-..." "c:/Users/-/AppData/Roaming/.emacs.d/elpa/evil-..." nil t)
  require(evil-search)
  load-with-code-conversion("c:/Users/-/AppData/Roaming/.emacs.d/elpa/evil-..." "c:/Users/-/AppData/Roaming/.emacs.d/elpa/evil-..." nil t)
  require(evil)
  load-with-code-conversion("c:/Users/-/AppData/Roaming/.emacs" "c:/Users/-/AppData/Roaming/.emacs" t t)
  load("~/.emacs" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x9ab6abaf93bbce0>) #f(compiled-function () #<bytecode -0x1f3c686ddc0da035>) t)
  command-line()
  normal-top-level()

Any ideas what I'm running into? The only contents of my .emacs file are

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 ;;'(package-selected-packages '(evil evil-org org-superstar gruvbox-theme)))
 '(package-selected-packages '(evil gruvbox-theme)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(load-theme 'gruvbox t)

;; Download Evil
(unless (package-installed-p 'evil)
  (package-install 'evil))

;; Enable Evil
(require 'evil)
(evil-mode 1)

I apologize if I'm misunderstanding something. I'm running this on a windows machine, coming from Mac, so I might have messed something up with my configuration along these lines.

Drew
  • 75,699
  • 9
  • 109
  • 225
ChasingUG
  • 43
  • 6
  • 1
    Bisect your init file to find the culprit. Some code you're evaluating is invoking macro `define-obsolete-function-alias` with the wrong number of arguments. It expect 3 or 4 arguments and it's only getting 2. – Drew Apr 25 '22 at 02:15
  • @Drew I did, and it's the evil invocation causing it, hence the title. – ChasingUG Apr 25 '22 at 02:57
  • 2
    From the commit [here](https://github.com/emacs-evil/evil/commit/19cc5f8eef8bfffdec8082b604c7129782acb332), it looks like your 'evil' got installed from 'NonGNU ELPA'. Can you check with `M-x list-packages`? Also, from list packages you can uninstall 'nonGNU evil' and install 'MELPA evil' (I guess that should fix things, but not sure). – dalanicolai Apr 25 '22 at 06:07
  • @dalanicolai thanks I've installed the melpa version. No longer getting an error, but still some strange behavior. Despite my .emacs containing "(require 'evil) (evil-mode 1)" it's not enabled by default on startup. If I try M-x evil-mode, nothing changes, but if I run M-x evil mode a second time, it works! Any idea what's going on here? – ChasingUG Apr 25 '22 at 16:30
  • This is apparently a dup of the problem of question https://emacs.stackexchange.com/q/71536/105. – Drew Apr 27 '22 at 15:07

0 Answers0