benchmark-init-el icon indicating copy to clipboard operation
benchmark-init-el copied to clipboard

Error: Wrong number of arguments

Open apc opened this issue 2 years ago • 6 comments

Trying to install this package using straight. If I just eval a use-package call for it, e.g.

(use-package benchmark-init
  :demand)

I get (wrong-number-of-arguments (3 . 4) 2). Here's the backtrace:

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 0x155f9ad0b6db0ed6>)('benchmark-init/install 'benchmark-init/activate)
  (define-obsolete-function-alias 'benchmark-init/install 'benchmark-init/activate)
  eval-buffer(#<buffer  *load*> nil "/Users/apc/.emacs.d/straight/build/benchmark-init/..." nil t)  ; Reading at buffer position 6700
  load-with-code-conversion("/Users/apc/.emacs.d/straight/build/benchmark-init/..." "/Users/apc/.emacs.d/straight/build/benchmark-init/..." nil t)
  require(benchmark-init nil nil)
  (progn (use-package-statistics-gather :use-package 'benchmark-init nil) (straight-use-package 'benchmark-init) (use-package-statistics-gather :init 'benchmark-init nil) (require 'benchmark-init nil nil) (use-package-statistics-gather :config 'benchmark-init nil) (use-package-statistics-gather :config 'benchmark-init t) (use-package-statistics-gather :init 'benchmark-init t) (use-package-statistics-gather :use-package 'benchmark-init t))
  (progn (defvar bootstrap-version) (progn (use-package-statistics-gather :use-package 'benchmark-init nil) (straight-use-package 'benchmark-init) (use-package-statistics-gather :init 'benchmark-init nil) (require 'benchmark-init nil nil) (use-package-statistics-gather :config 'benchmark-init nil) (use-package-statistics-gather :config 'benchmark-init t) (use-package-statistics-gather :init 'benchmark-init t) (use-package-statistics-gather :use-package 'benchmark-init t)))
  eval((progn (defvar bootstrap-version) (progn (use-package-statistics-gather :use-package 'benchmark-init nil) (straight-use-package 'benchmark-init) (use-package-statistics-gather :init 'benchmark-init nil) (require 'benchmark-init nil nil) (use-package-statistics-gather :config 'benchmark-init nil) (use-package-statistics-gather :config 'benchmark-init t) (use-package-statistics-gather :init 'benchmark-init t) (use-package-statistics-gather :use-package 'benchmark-init t))) t)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

I'm on Emacs 28.0.90.

apc avatar Jan 20 '22 19:01 apc

the same issue I am experiencing with Emacs 28.0.91 see #15

ugurbolat avatar Feb 02 '22 22:02 ugurbolat

add the absent WHEN argument can help.

--- a/benchmark-init-modes.el
+++ b/benchmark-init-modes.el
@@ -209,7 +209,7 @@
 ;; Obsolete functions

 (define-obsolete-function-alias 'benchmark-init/show-durations
-  'benchmark-init/show-durations-tabulated)
+  'benchmark-init/show-durations-tabulated "28.1")

 (provide 'benchmark-init-modes)
 ;;; benchmark-init-modes.el ends here
diff --git a/benchmark-init.el b/benchmark-init.el
index 90a69df..7e7735d 100644
--- a/benchmark-init.el
+++ b/benchmark-init.el
@@ -189,7 +189,7 @@ Slots:
 ;; Obsolete functions

 (define-obsolete-function-alias 'benchmark-init/install
-  'benchmark-init/activate)
+  'benchmark-init/activate "28.1")

 (provide 'benchmark-init)
 ;;; benchmark-init.el ends here

include-yy avatar Apr 05 '22 07:04 include-yy

@include-yy Could you add a pull request to this package. I have the same issue in emacs 28.1.0

aladine avatar Apr 11 '22 19:04 aladine

@aladine I am afraid that this package's author doesn't maintain it any more. Since the last commit is 4 years ago. I suggest just fork it, and commit the correction, then use it until another error occurs. You can see that there are 32 forks (include me) of this package, and they just add some small commit on it.

include-yy avatar Apr 12 '22 05:04 include-yy

@aladine in fact here is already a pull request 😄 https://github.com/dholm/benchmark-init-el/pull/16

include-yy avatar Apr 12 '22 05:04 include-yy

Good news! The pull request is already merged. @apc could you verify the changes and resolve the issue.

aladine avatar May 01 '22 04:05 aladine

Sorry, I missed this notification. Looks good! Thanks a bunch.

apc avatar Aug 25 '22 15:08 apc