2

I am using GNU Emacs 28.0.50 and trying to enable icicles within. The error I am having:

For:

(add-to-list 'load-path "~/.emacs.d/lisp/icicles")
(require 'icicles)

error:

Debugger entered--Lisp error: (wrong-number-of-arguments (3 . 3) 2)
  make-obsolete(icicle-scatter icicle-scatter-re)
  eval-buffer(#<buffer  *load*-323141> nil "/home/alper/.emacs.d/lisp/icicles/icicles-fn.el" nil t)  ; Reading at buffer position 247290
  load-with-code-conversion("/home/alper/.emacs.d/lisp/icicles/icicles-fn.el" "/home/alper/.emacs.d/lisp/icicles/icicles-fn.el" nil t)
  require(icicles-fn)
  eval-buffer(#<buffer  *load*-374269> nil "/home/alper/.emacs.d/lisp/icicles/icicles.el" nil t)  ; Reading at buffer position 84578
  load-with-code-conversion("/home/alper/.emacs.d/lisp/icicles/icicles.el" "/home/alper/.emacs.d/lisp/icicles/icicles.el" nil t)
  require(icicles)
  eval-buffer(#<buffer  *load*> nil "/home/alper/.emacs" nil t)  ; Reading at buffer position 86650
  load-with-code-conversion("/home/alper/.emacs" "/home/alper/.emacs" t t)
  load("~/.emacs" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x14c922c058d04726>) #f(compiled-function () #<bytecode -0x1f3c692ddc0f4d75>) t)
  command-line()
  normal-top-level()

[Q] What may be the reason for this error and how can I fix it?

Drew
  • 75,699
  • 9
  • 109
  • 225
alper
  • 1,238
  • 11
  • 30

1 Answers1

3

It looks like you don't have the latest Icicles source files. The file in question now has this code:

(if (< emacs-major-version 23)
    (make-obsolete 'icicle-scatter 'icicle-scatter-re) ; 2018-01-14
  (make-obsolete 'icicle-scatter 'icicle-scatter-re "2018-01-14"))

So you should not see that problem. The problem you're seeing is from Emacs 28 deciding that the 3rd arg should no longer be optional. Starting with Emacs 23 the 3rd arg is possible, and starting with Emacs 28 it's mandatory. Hence the need for the conditional code now.

Please download the latest Icicles files from Emacs Wiki.

Drew
  • 75,699
  • 9
  • 109
  • 225
  • I had downloaded from https://github.com/emacsmirror/icicles, which was not the latest version. Downloaded the latest version and its solved. – alper Feb 22 '21 at 09:15