Wilfred / suggest.el

discover elisp functions that do what you want
367 stars 14 forks source link

suggest--possibilities: Symbol’s value as variable is void: it #4

Closed heikkil closed 8 years ago

heikkil commented 8 years ago

Just installed suggest.el from MALPA. Ran M-x suggest. The suggest buffer comes up with the default inputs but no suggestions and the error message:

suggest--possibilities: Symbol’s value as variable is void: it

Could there be an undeclared dependency?

Wilfred commented 8 years ago

Sounds like you have an old version of a library. Could you try upgrading dash.el and loop.el?

heikkil commented 8 years ago

For the record: I am running emacs version 25.1.50.1 from git head under OS X. I just upgraded emacs from an older version of 25.1.50.1 but that did not change the error message either.

I upgraded all packages just before installing suggest. Did that again, suggest was upgraded, same error message.

I am running these library versions:

The suggest.el dependency of s is 1.11.0. My s package version is the latest in MELPA. Could that be the cause of this? I thought "Package-Requires:" in elisp packages would prevent running the an older version of dependencies.

I had a look at s.el in github. The commit message for 1.11.0 was made 7 months ago. The latest changes to s.el was done exactly a month ago and in that file the version is still 1.10.0. So there does not seem to be a newer version.

heikkil commented 8 years ago

I did yet an other emacs restart and suggest started working. I do not know how the problem got solved.

dunn commented 8 years ago

I'm seeing the same thing, except sometimes the error comes from suggest-update. I've got the latest versions of suggest, loop, s, and dash. emacs-version is GNU Emacs 25.1.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G31)).

dunn commented 8 years ago

My mistake, I didn't have the latest dash, with your commit https://github.com/magnars/dash.el/commit/1fce650170b974a3a76ad7150fe13ca0b9769d2d. Installing the HEAD version (currently 502be58) works. But that means we need something later than the current stable version of dash (2.12.1), so maybe this shouldn't be in MELPA stable yet after all.

Wilfred commented 8 years ago

Please provide a full traceback if you can (M-x toggle-debug-on-error). I'd like to confirm that this issue is only from --each-indexed. loop-for-each-line also gained an it variable recently.

I've filed a bug on dash.el to request a new tag.

dunn commented 8 years ago

That's interesting:

Debugger entered--Lisp error: (void-function -select-column)
  -select-column(0 ((1 #("1" 0 1 (fontified nil))) (2 #("2" 0 1 (fontified nil)))))
  suggest--unzip(((1 #("1" 0 1 (fontified nil))) (2 #("2" 0 1 (fontified nil)))))
  mapcar(suggest--unzip (((1 #("1" 0 1 (fontified nil))) (2 #("2" 0 1 (fontified nil)))) ((2 #("2" 0 1 (fontified nil))) (1 #("1" 0 1 (fontified nil))))))
  -map(suggest--unzip (((1 #("1" 0 1 (fontified nil))) (2 #("2" 0 1 (fontified nil)))) ((2 #("2" 0 1 (fontified nil))) (1 #("1" 0 1 (fontified nil))))))
  suggest--possibilities((#("1" 0 1 (fontified nil)) #("2" 0 1 (fontified nil))) (1 2) 3)
  suggest-update()
  suggest()
  funcall-interactively(suggest)
  call-interactively(suggest record nil)
  command-execute(suggest record)
  #[257 "\304\305!\203\f
  ivy-call()
  ivy-read("M-x " ("load-library" "toggle-debug-on-error" "eval-buffer" "customize" "flycheck-select-checker" "js2-mode" "replace-string" "query-replace" "dired" "vc-resolve-conflicts" "rgrep" "package-list-packages" "replace-regexp" "magit-blame" "ert" "homebrew-add-deps" "query-replace-regexp" "ispell" "org-time-stamp" "slime" "auto-fill-mode" "shell-script-mode" "homebrew-poet-insert" "homebrew-autotools" "company-complete" "typo-mode" "compile" "ansible-doc" "magit-log-buffer-file" "org-version" "load-file" "company-mode" "untabify" "ruby-mode" "magit-version" "eval-expression" "customize-variable" "flycheck-mode" "eww" "LaTeX-mode" "erc" "flyspell-mode" "homebrew-mode" "recover-this-file" "company-emoji-init" "erc-ssl" "erc-tls" "text-mode" "magit-status" "set-buffer-file-coding-system" ...) :predicate nil :require-match t :history extended-command-history :action #[257 "\304\305!\203\f

Relatedly, loop needs a new stable version, with 1.2 I get this:

Debugger entered--Lisp error: (void-function loop--current-line)
  loop--current-line()
  suggest--raw-inputs()
  suggest-update()
  suggest()
  funcall-interactively(suggest)
  call-interactively(suggest record nil)
  command-execute(suggest record)
#[257 "\304\305!\203\f
  ivy-call()
  ivy-read("M-x " ("load-library" "toggle-debug-on-error" "eval-buffer" "customize" "flycheck-select-checker" "js2-mode" "replace-string" "query-replace" "dired" "vc-resolve-conflicts" "rgrep" "package-list-packages" "replace-regexp" "magit-blame" "ert" "homebrew-add-deps" "query-replace-regexp" "ispell" "org-time-stamp" "slime" "auto-fill-mode" "shell-script-mode" "homebrew-poet-insert" "homebrew-autotools" "company-complete" "typo-mode" "compile" "ansible-doc" "magit-log-buffer-file" "org-version" "load-file" "company-mode" "untabify" "ruby-mode" "magit-version" "eval-expression" "customize-variable" "flycheck-mode" "eww" "LaTeX-mode" "erc" "flyspell-mode" "homebrew-mode" "recover-this-file" "company-emoji-init" "erc-ssl" "erc-tls" "text-mode" "magit-status" "set-buffer-file-coding-system" ...) :predicate nil :require-match t :history extended-command-history :action #[257 "\304\305!\203\f
Wilfred commented 8 years ago

OK, I've tagged a new version of loop.el.

Looks like we're using a number of recent dash.el functions, so I've noted the required build in the readme.

dunn commented 8 years ago

Thanks very much!