DarwinAwardWinner/ido-completing-read-plus

Error about dynamic collections in Geiser REPL

ylluminarious opened this issue · 4 comments

When I try to do geiser-doc-symbol-at-point (C-c C-d C-d) or other similar commands in the Geiser REPL, I almost immediately get this error:

Error running timer ‘ido-cr+-update-dynamic-collection’: (void-function nil)

A backtrace of the error shows the following:

Debugger entered--Lisp error: (void-function nil)
  nil(nil)
  geiser-eval--get-module()
  geiser-eval--scheme-str((:eval (:ge completions "#")))
  geiser-eval--send/wait((:eval (:ge completions "#")) nil nil)
  geiser-completion--symbol-list("#")
  #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"]("#" nil t)
  #<subr all-completions>("#" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil nil)
  apply(#<subr all-completions> ("#" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil))
  #[128 "\304�\302\"\305\306\307\310\311\301\302\303�	$\312\"\313$\216\211\206 �\314�\315\300�\"\302#)\207" [#<subr all-completions> nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data (("" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil) ("#%app" "#%datum" "#%declare" "#%expression" "#%module-begin" "#%plain-app" "#%plain-lambda" "#%plain-module-begin" "#%printing-module-begin" "#%provide" "#%require" "#%stratified-body" "#%top" "#%top-interaction" "#%variable-reference" "*" "*list/c" "+" "-" "->" "->*" "->*m" "->d" "->dm" "->i" "->m" "..." "/" ":do-in" "<" "</c" "<=" "<=/c" "=" "=/c" "==" "=>" ">" ">/c" ">=" ">=/c" "_" "abort-current-continuation" "abs" "absent" "absolute-path?" "abstract" "acos" "add-between" "add1" ...) ...)) #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data (("" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil) [nil 22931 14197 737318 nil #[0 "\302\301\300\"\207" [#s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data (("" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil) ("#%app" "#%datum" "#%declare" "#%expression" "#%module-begin" "#%plain-app" "#%plain-lambda" "#%plain-module-begin" "#%printing-module-begin" "#%provide" "#%require" "#%stratified-body" "#%top" "#%top-interaction" "#%variable-reference" "*" "*list/c" "+" "-" "->" "->*" "->*m" "->d" "->dm" "->i" "->m" "..." "/" ":do-in" "<" "</c" "<=" "<=/c" "=" "=/c" "==" "=>" ">" ">/c" ">=" ">=/c" "_" "abort-current-continuation" "abs" "absent" "absolute-path?" "abstract" "acos" "add-between" "add1" ...) ...)) ("" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil) remhash] 3] nil nil 0] ...)) gethash make-byte-code 0 "\305\303\302\"\300\206	�\f�\203��\306�!\210\211\205)�\307\303\310�\311\312\313\314\315\316\301\303\"\317\"\320$#\302#\207" vconcat vector [memoize-default-timeout gethash cancel-timer puthash run-at-time nil make-byte-code 0 "\302\301\300\"\207" vconcat vector [remhash] 3] 14 puthash apply] 11 "\n\n(fn &rest ARGS)"]("#" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil)
  #[770 "\301�!\2030�\302�G\303��X\203,�\304��\206��\305\306���\n\"����#\"\262��T\262�\202\n�\307�!\207\305\310��#\207" [ido-cr+-all-completions-memoized functionp 0 nil append all-completions s-left delete-dups ""] 12 ("/Users/my_username/.emacs.d/elpa/ido-completing-read+-20170813.2325/ido-completing-read+.elc" . 27838)]("#%app" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil)
  apply(#[770 "\301�!\2030�\302�G\303��X\203,�\304��\206��\305\306���\n\"����#\"\262��T\262�\202\n�\307�!\207\305\310��#\207" [ido-cr+-all-completions-memoized functionp 0 nil append all-completions s-left delete-dups ""] 12 ("/Users/my_username/.emacs.d/elpa/ido-completing-read+-20170813.2325/ido-completing-read+.elc" . 27838)] ("#%app" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil))
  #[128 "\304�\302\"\305\306\307\310\311\301\302\303�	$\312\"\313$\216\211\206 �\314�\315\300�\"\302#)\207" [#[770 "\301�!\2030�\302�G\303��X\203,�\304��\206��\305\306���\n\"����#\"\262��T\262�\202\n�\307�!\207\305\310��#\207" [ido-cr+-all-completions-memoized functionp 0 nil append all-completions s-left delete-dups ""] 12 ("/Users/my_username/.emacs.d/elpa/ido-completing-read+-20170813.2325/ido-completing-read+.elc" . 27838)] nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data (("" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil) ("#%app" "#%datum" "#%declare" "#%expression" "#%module-begin" "#%plain-app" "#%plain-lambda" "#%plain-module-begin" "#%printing-module-begin" "#%provide" "#%require" "#%stratified-body" "#%top" "#%top-interaction" "#%variable-reference" "*" "*list/c" "+" "-" "->" "->*" "->*m" "->d" "->dm" "->i" "->m" "..." "/" ":do-in" "<" "</c" "<=" "<=/c" "=" "=/c" "==" "=>" ">" ">/c" ">=" ">=/c" "_" "abort-current-continuation" "abs" "absent" "absolute-path?" "abstract" "acos" "add-between" "add1" ...) ...)) #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data (("" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil) [nil 22931 14197 453797 nil #[0 "\302\301\300\"\207" [#s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data (("" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil) ("#%app" "#%datum" "#%declare" "#%expression" "#%module-begin" "#%plain-app" "#%plain-lambda" "#%plain-module-begin" "#%printing-module-begin" "#%provide" "#%require" "#%stratified-body" "#%top" "#%top-interaction" "#%variable-reference" "*" "*list/c" "+" "-" "->" "->*" "->*m" "->d" "->dm" "->i" "->m" "..." "/" ":do-in" "<" "</c" "<=" "<=/c" "=" "=/c" "==" "=>" ">" ">/c" ">=" ">=/c" "_" "abort-current-continuation" "abs" "absent" "absolute-path?" "abstract" "acos" "add-between" "add1" ...) ...)) ("" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil) remhash] 3] nil nil 0] ...)) gethash make-byte-code 0 "\305\303\302\"\300\206	�\f�\203��\306�!\210\211\205)�\307\303\310�\311\312\313\314\315\316\301\303\"\317\"\320$#\302#\207" vconcat vector [memoize-default-timeout gethash cancel-timer puthash run-at-time nil make-byte-code 0 "\302\301\300\"\207" vconcat vector [remhash] 3] 14 puthash apply] 11 "\n\n(fn &rest ARGS)"]("#%app" #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil)
  ido-cr+-update-dynamic-collection()
  apply(ido-cr+-update-dynamic-collection nil)
  timer-event-handler([t 0 0 250000 nil ido-cr+-update-dynamic-collection nil idle 0])
  read-from-minibuffer("Symbol: " nil (keymap keymap (4 . ido-magic-delete-char) (6 . ido-magic-forward-char) (2 . ido-magic-backward-char) (63 . ido-completion-help) (left . ido-prev-match) (right . ido-next-match) (0 . ido-restrict-to-matches) (27 keymap (32 . ido-take-first-match)) (67108896 . ido-restrict-to-matches) (26 . ido-undo-merge-work-directory) (20 . ido-toggle-regexp) (67108908 . ido-prev-match) (67108910 . ido-next-match) (19 . ido-next-match) (18 . ido-prev-match) (16 . ido-toggle-prefix) (13 . ido-exit-minibuffer) (10 . ido-select-text) (32 . ido-complete-space) (9 . ido-complete) (5 . ido-edit-input) (3 . ido-toggle-case) (1 . ido-toggle-ignore) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuffer") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "
" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . minibuffer-keyboard-quit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil nil)
  ido-read-internal(list "Symbol: " nil nil nil nil)
  #[(prompt choices &optional _predicate require-match initial-input hist def _inherit-input-method) "\306\211\211\307������\310 \210\311\312���\f�
����&�-\207" [choices ido-choice-list ido-context-switch-command ido-directory-too-big ido-directory-nonreadable ido-current-directory nil ignore ido-common-initialization ido-read-internal list prompt hist def require-match initial-input] 7 ("/Applications/Emacs.app/Contents/Resources/lisp/ido.elc" . 120784)]("Symbol: " ("#%app" "#%datum" "#%declare" "#%expression" "#%module-begin" "#%plain-app" "#%plain-lambda" "#%plain-module-begin" "#%printing-module-begin" "#%provide" "#%require" "#%stratified-body" "#%top" "#%top-interaction" "#%variable-reference" "*" "*list/c" "+" "-" "->" "->*" "->*m" "->d" "->dm" "->i" "->m" "..." "/" ":do-in" "<" "</c" "<=" "<=/c" "=" "=/c" "==" "=>" ">" ">/c" ">=" ">=/c" "_" "abort-current-continuation" "abs" "absent" "absolute-path?" "abstract" "acos" "add-between" "add1" ...) nil nil nil nil nil nil)
  apply(#[(prompt choices &optional _predicate require-match initial-input hist def _inherit-input-method) "\306\211\211\307������\310 \210\311\312���\f�
����&�-\207" [choices ido-choice-list ido-context-switch-command ido-directory-too-big ido-directory-nonreadable ido-current-directory nil ignore ido-common-initialization ido-read-internal list prompt hist def require-match initial-input] 7 ("/Applications/Emacs.app/Contents/Resources/lisp/ido.elc" . 120784)] ("Symbol: " ("#%app" "#%datum" "#%declare" "#%expression" "#%module-begin" "#%plain-app" "#%plain-lambda" "#%plain-module-begin" "#%printing-module-begin" "#%provide" "#%require" "#%stratified-body" "#%top" "#%top-interaction" "#%variable-reference" "*" "*list/c" "+" "-" "->" "->*" "->*m" "->d" "->dm" "->i" "->m" "..." "/" ":do-in" "<" "</c" "<=" "<=/c" "=" "=/c" "==" "=>" ">" ">/c" ">=" ">=/c" "_" "abort-current-continuation" "abs" "absent" "absolute-path?" "abstract" "acos" "add-between" "add1" ...) nil nil nil nil nil nil))
  ido-completing-read@ido-cr+-replace(#[(prompt choices &optional _predicate require-match initial-input hist def _inherit-input-method) "\306\211\211\307������\310 \210\311\312���\f�
����&�-\207" [choices ido-choice-list ido-context-switch-command ido-directory-too-big ido-directory-nonreadable ido-current-directory nil ignore ido-common-initialization ido-read-internal list prompt hist def require-match initial-input] 7 ("/Applications/Emacs.app/Contents/Resources/lisp/ido.elc" . 120784)] "Symbol: " ("#%app" "#%datum" "#%declare" "#%expression" "#%module-begin" "#%plain-app" "#%plain-lambda" "#%plain-module-begin" "#%printing-module-begin" "#%provide" "#%require" "#%stratified-body" "#%top" "#%top-interaction" "#%variable-reference" "*" "*list/c" "+" "-" "->" "->*" "->*m" "->d" "->dm" "->i" "->m" "..." "/" ":do-in" "<" "</c" "<=" "<=/c" "=" "=/c" "==" "=>" ">" ">/c" ">=" ">=/c" "_" "abort-current-continuation" "abs" "absent" "absolute-path?" "abstract" "acos" "add-between" "add1" ...) nil nil nil nil nil nil)
  apply(ido-completing-read@ido-cr+-replace #[(prompt choices &optional _predicate require-match initial-input hist def _inherit-input-method) "\306\211\211\307������\310 \210\311\312���\f�
����&�-\207" [choices ido-choice-list ido-context-switch-command ido-directory-too-big ido-directory-nonreadable ido-current-directory nil ignore ido-common-initialization ido-read-internal list prompt hist def require-match initial-input] 7 ("/Applications/Emacs.app/Contents/Resources/lisp/ido.elc" . 120784)] ("Symbol: " ("#%app" "#%datum" "#%declare" "#%expression" "#%module-begin" "#%plain-app" "#%plain-lambda" "#%plain-module-begin" "#%printing-module-begin" "#%provide" "#%require" "#%stratified-body" "#%top" "#%top-interaction" "#%variable-reference" "*" "*list/c" "+" "-" "->" "->*" "->*m" "->d" "->dm" "->i" "->m" "..." "/" ":do-in" "<" "</c" "<=" "<=/c" "=" "=/c" "==" "=>" ">" ">/c" ">=" ">=/c" "_" "abort-current-continuation" "abs" "absent" "absolute-path?" "abstract" "acos" "add-between" "add1" ...) nil nil nil nil nil nil))
  ido-completing-read("Symbol: " ("#%app" "#%datum" "#%declare" "#%expression" "#%module-begin" "#%plain-app" "#%plain-lambda" "#%plain-module-begin" "#%printing-module-begin" "#%provide" "#%require" "#%stratified-body" "#%top" "#%top-interaction" "#%variable-reference" "*" "*list/c" "+" "-" "->" "->*" "->*m" "->d" "->dm" "->i" "->m" "..." "/" ":do-in" "<" "</c" "<=" "<=/c" "=" "=/c" "==" "=>" ">" ">/c" ">=" ">=/c" "_" "abort-current-continuation" "abs" "absent" "absolute-path?" "abstract" "acos" "add-between" "add1" ...) nil nil nil nil nil nil)
  ido-completing-read+("Symbol: " #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil nil nil nil nil nil)
  completing-read("Symbol: " #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [geiser-completion--symbol-list nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil nil nil nil nil)
  geiser-completion--read-symbol("Symbol: " nil)
  geiser-doc-symbol-at-point(nil)
  funcall-interactively(geiser-doc-symbol-at-point nil)
  #<subr call-interactively>(geiser-doc-symbol-at-point nil nil)
  apply(#<subr call-interactively> geiser-doc-symbol-at-point (nil nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> geiser-doc-symbol-at-point nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (geiser-doc-symbol-at-point nil nil))
  call-interactively(geiser-doc-symbol-at-point nil nil)
  command-execute(geiser-doc-symbol-at-point)

The weird thing is that all my Ido completions are still there in the minibuffer, but this weird error keeps showing up as I try to select my completions which is rather annoying.

Also I just updated all my packages to the most recent version, so updating shouldn't do anything to resolve the issue.

It seems that the error is happening here: https://github.com/jaor/geiser/blob/ae895088fab7593295dc16bc7d58a67321f92d46/elisp/geiser-eval.el#L37-L40
Geiser is trying to funcall a variable that is nil. I'm not sure why it would do that.

Regardless, this brings up a good point that ido-cr+ should probably suppress errors during dynamic updates, since in many cases the dynamic updates are not essential.

@DarwinAwardWinner Thanks for the info. Yes, I agree with your point about suppressing errors during dynamic updates.

I've added error suppression in 176fabe. It still shows a warning about the error, but then allows you to continue on with completion. If the warning is too annoying, I recommend blacklisting gesier in ido-cr+, and reporting a bug to geiser, since it shouldn't be trying to funcall a nil variable. For context, all ido-cr+ is doing for the dynamic update is repeatedly calling all-completions with every prefix of the current input.

@DarwinAwardWinner Ok, thanks again for the info. I'll consider reporting a bug to Geiser once I can test out your new patch (currently waiting for MELPA to build again).