1

Emacs raises "funcall: Symbol's value as variable is void: choices" on bookmark-set.

After disabling bookmark+, bookmark-set started to work correctly.

Does anyone have an idea how to solve this?

Drew
  • 29,895
  • 7
  • 74
  • 104

2 Answers2

1

I cannot find any use of a variable named choices in the Bookmark+ code.

What is the most recent Last-Updated date you see in any of the Bookmark+ source-file headers?

I would suggest that you do this, if you haven't done it already:

  1. Check whether you have something in bmkp-after-set-hook. If so, try removing it to see whether that removes the error.

  2. Download the latest Bookmark+ source files (from Emacs Wiki or from MELPA).

  3. Delete any byte-compiled (i.e., *.elc) versions of the files that you might have.

  4. Try again, to see if you get the same error. If so, please report it to me by email: M-x bmkp-send-bug-report.

  5. If not (no such error anymore):

    a. Load source file bookmark+-mac.el, which defines Lisp macros used by the other files.

    b. Byte-compile bookmark+-mac.el.

    c. Byte-compile the other files. (An easy way to do this is to mark them in Dired and use B.)

    d. Restart Emacs and see whether you get the error again (you will be using the byte-compiled files this time). If so, M-x bmkp-send-bug-report.

Sorry for your trouble. Let me know, and I'll get it fixed. If you use M-x bmkp-send-bug-report then please try to provide a complete recipe to repro the problem, preferably starting from emacs -Q (no init file). Thx.

Drew
  • 29,895
  • 7
  • 74
  • 104
  • This error acquired only in case when ido-ubiquitous is enabled, and it relates on ido-completing-read+ function, where choices setted: (setq choices (append def (nreverse (cl-set-difference choices def))) def (car def)) – Let's apple in Apr 18 '15 at 14:22
  • OK. Sorry, but I don't understand everything that you are saying. Do you think that there is a problem here with *Bookmark+*, or a way in which it should be improved? If so, please follow up by email and I will take a look: `M-x bmkp-send-bug-report`. Provide as much detail as you can, to help me understand. Thx. – Drew Apr 18 '15 at 14:25
0

Drew has found an answer:

This is an ido-completing-read+.el bug. You will want to report it to that library's maintainer. Here is the relevant part of the source code:

(when (and def (listp def)) (setq choices (append def (nreverse (cl-set-difference choices def))) def (car def)))

(when (and def initial (stringp initial) (not (string= initial ""))) (setq choices (cons def (remove def choices)) def nil))

The variable CHOICES is not declared with (defvar choices), and the file has local variable lexical-binding set to t. This means that CHOICES is considered to be a lexically bound variable. But is never bound lexically.

Probably the library maintainer just needs to add (defvar choices). Or else bind choices. Or else remove the setting of `lexical-binding' to t.