dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
480 stars 41 forks source link

Error: History should be specified as a symbol #135

Closed henrymazza closed 2 years ago

henrymazza commented 2 years ago

when I call rg from either amx or helm i get this error when invoking M-x right after.

this is the important part on stacktrace (check around :history):

Debugger entered--Lisp error: (wrong-type-argument window-live-p nil) #<subr select-window>(nil nil)
ad-Advice-select-window(#<subr select-window> nil) apply(ad-Advice-select-window #<subr
select-window> nil) select-window(nil) amx-update-and-rerun() amx() (let ((amx-prompt-string "Emacs
commands: ")) (amx)) spacemacs/amx() funcall-interactively(spacemacs/amx) #<subr
call-interactively>(spacemacs/amx nil nil) apply(#<subr call-interactively> spacemacs/amx (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> spacemacs/amx nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (spacemacs/amx
nil nil)) call-interactively(spacemacs/amx nil nil) command-execute(spacemacs/amx) recursive-edit()
debug(error (cl-assertion-failed ((if shistory (or (null history) (and history (symbolp history)))
t) "Error: History should be specified as a symbol"))) cl--assertion-failed((if shistory (or (null
history) (and history (symbolp history))) t) "Error: History should be specified as a symbol" nil
nil) helm-comp-read("Emacs commands: " #f(compiled-function (&rest args2) #<bytecode
-0x9e25e5b382ab2d7>) :initial-input nil :test identity :default "rg" :name "Helm M-x Completions"
:buffer "Helm M-x Completions" :history ("rg" "ruby-mode" "org-mode" "toggle-debug-on-error"
"projectile-invalidate-cache" "org-md-export-as-markdown" "org-md-export-to-markdown" "insert-char
(C-x 8 RET)" "git-gutter:revert-hunk" "toggle-truncate-lines (C-x x t)" "csv-mode" "web-beautify-js"
"hmz-init/org-mode-prettify-symbols" "hmz-init/org-prettify" "column-enforce-mode"
"hmz-init/org-config" "hmz-prog-mode-hook" "org-toggle-pretty-entities (C-c C-x \\)"
"magit-file-checkout" "customize-face" "js-mode" "customize" "undo-tree-visualize (C-x u)"
"company-files" "evil-quit" "restart-emacs" "revert-buffer" "string-inflection-camelcase (C-c C)"
"vc-annotate (C-x v g)" "eshell" "rubocop-check-current-file" "ruby-toggle-block" "describe-face"
"git-gutter-mode" "hmz-neotree-mode" "rubocopfmt" "scroll-bar-mode" "good-scroll-mode"
"list-packages" "sublimity-mode" "pixel-scroll-mode" "load-theme") :reverse-history t :must-match t
:fuzzy t :keymap (keymap (keymap (27 keymap (46 . amx-find-function)) (8 keymap (119 . amx-where-is)
(102 . amx-describe-function))) keymap (127 . delete-backward-char) (27 keymap (13 .
helm-cr-empty-string)) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab .
helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (17 .
ace-jump-helm-line) (f13 lambda nil (interactive) (helm-select-nth-action 12)) (f12 lambda nil (interactive)
(helm-select-nth-action 11)) (f11 lambda nil (interactive) (helm-select-nth-action 10)) (f10 lambda nil
(interactive) (helm-select-nth-action 9)) (f9 lambda nil (interactive) (helm-select-nth-action 8)) (f8 lambda
nil (interactive) (helm-select-nth-action 7)) (f7 lambda nil (interactive) (helm-select-nth-action 6))
(f6 lambda nil (interactive) (helm-select-nth-action 5)) (f5 lambda nil (interactive) (helm-select-nth-action
4)) (f4 lambda nil (interactive) (helm-select-nth-action 3)) (f3 lambda nil (interactive)
(helm-select-nth-action 2)) (f2 lambda nil (interactive) (helm-select-nth-action 1)) (menu-bar keymap
(help-menu keymap (describe keymap (describe-mode . helm-help)))) (67108927 keymap (109 .
helm-help)) (help keymap (109 . helm-help)) (23 . #f(compiled-function () (interactive nil)
#<bytecode -0x1e895d52e40e262>)) (f1 lambda nil (interactive) (helm-select-nth-action 0)) (8) (20 .
helm-toggle-resplit-and-swap-windows) (C-tab . helm-follow-action-forward) (67108897 .
helm-toggle-suspend-update) (3 keymap (57 . helm-execute-selection-action-at-nth-+9) (56 .
helm-execute-selection-action-at-nth-+8) (55 . helm-execute-selection-action-at-nth-+7) (54 .
helm-execute-selection-action-at-nth-+6) (53 . helm-execute-selection-action-at-nth-+5) (52 .
helm-execute-selection-action-at-nth-+4) (51 . helm-execute-selection-action-at-nth-+3) (50 .
helm-execute-selection-action-at-nth-+2) (49 . helm-execute-selection-action-at-nth-+1) (63 .
helm-help) (110 . #f(compiled-function () (interactive nil) #<bytecode -0x1f8f4e36640e262>)) (108 .
helm-display-line-numbers-mode) (62 . helm-toggle-truncate-line) (21 . helm-refresh) (6 .
helm-follow-mode) (9 . helm-insert-or-copy) (11 . helm-kill-selection-and-quit) (25 .
helm-yank-selection) (37 . helm-exchange-minibuffer-and-header-line) (95 . helm-toggle-full-frame)
(45 . helm-swap-windows)) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 .
undefined) (24 keymap (57 . helm-execute-selection-action-at-nth-+9) (56 .
helm-execute-selection-action-at-nth-+8) (55 . helm-execute-selection-action-at-nth-+7) (54 .
helm-execute-selection-action-at-nth-+6) (53 . helm-execute-selection-action-at-nth-+5) (52 .
helm-execute-selection-action-at-nth-+4) (51 . helm-execute-selection-action-at-nth-+3) (50 .
helm-execute-selection-action-at-nth-+2) (49 . helm-execute-selection-action-at-nth-+1) (2 .
helm-resume-list-buffers-after-quit) (98 . helm-resume-previous-session-after-quit) (6 .
helm-quit-and-find-file)) (11 . helm-delete-minibuffer-contents) (67108896 .
helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) (C-M-up .
helm-scroll-other-window-down) (C-M-down . helm-scroll-other-window) (M-prior .
helm-scroll-other-window-down) (M-next . helm-scroll-other-window) (12 .
helm-recenter-top-bottom-other-window) (left . helm-previous-source) (right . helm-next-source) (15
. helm-next-source) (10 . helm-execute-persistent-action) (9 . helm-execute-persistent-action) ...))
amx-completing-read-helm(#f(compiled-function (&rest args2) #<bytecode -0x9e25e5b382ab2d7>)
:initial-input nil :predicate identity :def "rg") amx-completing-read(#f(compiled-function (&rest
args2) #<bytecode -0x9e25e5b382ab2d7>) :initial-input nil :predicate identity :def "rg" :backend
#s(amx-backend :name helm :required-feature helm :comp-fun amx-completing-read-helm :get-text-fun
amx-default-get-text :exit-fun helm-confirm-and-exit-minibuffer :auto-activate (bound-and-true-p
helm-mode))) amx-completing-read-auto(#f(compiled-function (&rest args2) #<bytecode
-0x9e25e5b382ab2d7>) :initial-input nil :predicate identity :def "rg")
amx-completing-read(#f(compiled-function (&rest args2) #<bytecode -0x9e25e5b382ab2d7>)
:initial-input nil :def "rg") amx-read-and-run(((rg . 21) (ruby-mode . 4) (org-mode . 4)
(toggle-debug-on-error . 2) (projectile-invalidate-cache . 24) (org-md-export-as-markdown . 3)
(org-md-export-to-markdown . 1) (insert-char . 1) (toggle-truncate-lines . 4) (csv-mode . 1)
(web-beautify-js . 1) (hmz-init/org-mode-prettify-symbols . 1) (hmz-init/org-prettify . 4)
(column-enforce-mode . 1) (hmz-init/org-config . 1) (hmz-prog-mode-hook . 1)
(org-toggle-pretty-entities . 1) (magit-file-checkout . 12) (customize-face . 1) (js-mode . 1)
(customize . 1) (undo-tree-visualize . 2) (company-files . 4) (revert-buffer . 1)
(string-inflection-camelcase . 1) (vc-annotate . 1) (cd) (ff) (5x5) (amx) (arp) (dbx)
(git-gutter:revert-hunk . 21) (dig) (erc) (ert) (eww) (ffo) (ftp) (gdb) (irc) (jdb) (man) (mpc)
(pdb) (pwd) (rsh) (sdb) (xdb) (calc) ...)) amx() (let ((amx-prompt-string "Emacs commands: "))
(amx)) spacemacs/amx() funcall-interactively(spacemacs/amx) #<subr call-interactively>(spacemacs/amx
nil nil) apply(#<subr call-interactively> spacemacs/amx (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> spacemacs/amx nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (spacemacs/amx
nil nil)) call-interactively(spacemacs/amx nil nil) command-execute(spacemacs/amx)
dajva commented 2 years ago

Thanks for the report. The information here is nothing I can work with. Superficially this looks like a bug in either helm or amx. If you believe this package is doing something wrong, please try to reproduce this bug in vanilla emacs and use that as a base for this report.

henrymazza commented 2 years ago

ok, thank you. I found that it may not be the case of a rg.el bug really. thank you.