Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong number of arguments error #126

Closed
shivahnshankar opened this issue Apr 14, 2022 · 3 comments
Closed

Wrong number of arguments error #126

shivahnshankar opened this issue Apr 14, 2022 · 3 comments

Comments

@shivahnshankar
Copy link

I updated the repo today and i started getting these errors:

Warning (initialization): An error occurred while loading ‘/Users/shivashankar/.emacs.d/init.el’:

Wrong number of arguments: (3 . 4), 2

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace. Disable showing Disable logging

Emacs started with --debug-init

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 0x155f967e7527c3d7>)('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("/Users/shivashankar/.config/rational-emacs/elpa/ev..." "/Users/shivashankar/.config/rational-emacs/elpa/ev..." nil t)
  require(evil-ex)
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/elpa/ev..." "/Users/shivashankar/.config/rational-emacs/elpa/ev..." nil t)
  require(evil-search)
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/elpa/ev..." "/Users/shivashankar/.config/rational-emacs/elpa/ev..." nil t)
  require(evil)
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/modules..." "/Users/shivashankar/.config/rational-emacs/modules..." nil t)
  require(rational-evil)
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/rationa..." "/Users/shivashankar/.config/rational-emacs/rationa..." nil t)
  load("/Users/shivashankar/.config/rational-emacs/rationa..." nil nomessage)
  (progn (load rational-config-file nil 'nomessage))
  (if (file-exists-p rational-config-file) (progn (load rational-config-file nil 'nomessage)))
  load-with-code-conversion("/Users/shivashankar/.config/rational-emacs/init.el" "/Users/shivashankar/.config/rational-emacs/init.el" t t)
  load("/Users/shivashankar/.config/rational-emacs/init.el" t t)
  (let ((init-file (expand-file-name "init.el" user-emacs-directory))) (setq package-user-dir (expand-file-name "elpa" user-emacs-directory)) (load init-file t t) (let ((chemacs-custom-file (chemacs-profile-get 'custom-file init-file))) (if (not custom-file) (progn (setq custom-file chemacs-custom-file) (if (equal custom-file init-file) nil (if (file-exists-p custom-file) nil (let (...) (save-current-buffer ... ...))) (load custom-file))))))
  chemacs-load-user-init()
  load-with-code-conversion("/Users/shivashankar/.emacs.d/init.el" "/Users/shivashankar/.emacs.d/init.el" t t)
  load("/Users/shivashankar/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x14b3b660489bcc7>) #f(compiled-function () #<bytecode -0x1f3c686ddc0d6275>) t)
  command-line()
  normal-top-level()

I am using Emacs 28.1 with native compilation and chemacs2.

@jeffbowman
Copy link
Contributor

This is coming from the evil-ex project, not Rational Emacs, see: https://github.com/emacs-evil/evil/blob/222b791d3ebed9f58aeb3462522fa9e836fca642/evil-ex.el#L582

However, this version is older and should be updated to a newer version. This line was changed 15 months ago to be in compliance with Emacs 28. (see this commit: emacs-evil/evil@19cc5f8).

Unfortunately, there has not been a release which includes the commit above. Rational Emacs prefers versioned packages for (hopefully) a more stable experience. This depends on packages "releasing" a version of their packages. So, here are the options:

  1. Reach out to the maintainers of evil-ex and request a new versioned release (this is simply adding a tag ala: git tag 1.15.0). Regardless if you choose either (or both) of the following options, please do this one.
  2. You can pin the evil package to the melpa archive with code like this: (add-to-list 'package-pinned-packages '('evil . "melpa")) do this in your early-config.el file. Stop Eamcs, delete evil from your installation in the elpa/ folder, restart Emacs and you should get the "melpa" version of evil.
  3. You can reorder the package priorities. Currently, "melpa" is prioritized lowest because the "version" numbers are only time stamps, but that makes them larger (both physically and numerically) than any stable version. package.el assumes a bigger version number is more recent and will therefore attempt to upgrade to the highest version it finds. We prioritize this lower than every other elpa to defeat that behavior. If you change the priority (or just set package-archive-priorities to nil) you will get the most current commits built in melpa (aka the development versions) of every package. If you choose this step, you don't need to do step 2. If you choose step 2, you don't need this one, but they are not mutually exclusive. You can choose to do them both without hurting anything.

Does this help you?

shivahnshankar referenced this issue in emacs-evil/evil Apr 15, 2022
@shivahnshankar
Copy link
Author

Thanks....that helped.

@jeffbowman
Copy link
Contributor

Great! If that resolves your issue, can we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants