tumashu / vertico-posframe

GNU General Public License v3.0
114 stars 16 forks source link

Error thrown when attempting to narrow consult results. #15

Closed bjc closed 2 years ago

bjc commented 2 years ago

When using consult in conjunction with vertico-posframe, attempting to narrow a buffer throws an error:

cl-some: Wrong type argument: symbolp, #[0 "\301 \210\302\300@!\207" [(102 . "File") delete-minibuffer-contents consult-narrow] 2 nil nil]
Error in post-command-hook (vertico--exhibit): (wrong-type-argument symbolp #[0 "\301 \210\302\300@!\207" [(102 . "File") delete-minibuffer-contents consult-narrow] 2 nil nil])

You can test this yourself by installing consult, turning on vertico-posframe-mode, then issuing M-x consult-buffer. At the prompt, type b SPC to attempt to narrow to the buffer list, causing the error.

This works correctly with plain vertico, it is only vertico-posframe that fails.

The full backtrace:

Debugger entered--Lisp error: (wrong-type-argument symbolp #f(compiled-function () (interactive nil) #<bytecode 0x1f852f5886d6cad3>))
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_13>("^eval-*")
  cl-some(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_13> ("^eval-*"))
  vertico-posframe--show-minibuffer-p()
  vertico-posframe--handle-minibuffer-window()
  vertico-posframe--display((#("     Buffer  \n" 0 4 (face vertico-group-separator) 4 12 (face vertico-group-title) 12 13 (display (space :align-to right) face vertico-group-separator)) #("emacs.org    ---  61k      Org                    ..." 0 9 (multi-category (buffer . "emacs.org") face (consult-buffer vertico-current)) 9 10 (face vertico-current marginalia--align t display (space :align-to (+ left 70))) 10 13 (face vertico-current) 13 14 (face (marginalia-modified vertico-current)) 14 15 (face (marginalia-modified vertico-current)) 15 16 (face (marginalia-modified vertico-current)) 16 18 (face vertico-current) 18 21 (face (marginalia-size vertico-current)) 21 27 (face vertico-current) 27 30 (face (marginalia-mode vertico-current)) 30 49 (face vertico-current) 49 89 (face (marginalia-file-name vertico-current)) 89 90 (face vertico-current)) #("*scratch*    ---  145      Org                    ..." 0 9 (multi-category (buffer . "*scratch*") face consult-buffer) 9 10 (marginalia--align t display (space :align-to (+ left 70))) 13 16 (face marginalia-modified) 18 21 (face marginalia-size) 27 30 (face marginalia-mode) 49 89 (face marginalia-file-name)) #("magit-process: emacs    %*-  950      Magit Proces..." 0 20 (multi-category (buffer . "magit-process: emacs") face consult-buffer) 20 21 (marginalia--align t display (space :align-to (+ left 70))) 24 27 (face marginalia-modified) 29 32 (face marginalia-size) 38 51 (face marginalia-mode) 60 100 (face marginalia-file-name)) #("magit-diff: emacs    %%-  360      Magit Diff     ..." 0 17 (multi-category (buffer . "magit-diff: emacs") face consult-buffer) 17 18 (marginalia--align t display (space :align-to (+ left 70))) 21 24 (face marginalia-modified) 26 29 (face marginalia-size) 35 45 (face marginalia-mode) 57 97 (face marginalia-file-name)) #("magit: emacs    %%-  544      Magit               ..." 0 12 (multi-category (buffer . "magit: emacs") face consult-buffer) 12 13 (marginalia--align t display (space :align-to (+ left 70))) 16 19 (face marginalia-modified) 21 24 (face marginalia-size) 30 35 (face marginalia-mode) 52 92 (face marginalia-file-name)) #("*Help*    %%-  51k      Help                      ..." 0 6 (multi-category (buffer . "*Help*") face consult-buffer) 6 7 (marginalia--align t display (space :align-to (+ left 70))) 10 13 (face marginalia-modified) 15 18 (face marginalia-size) 24 28 (face marginalia-mode) 46 86 (face marginalia-file-name)) #("*Messages*    %*-  3.0k     Messages              ..." 0 10 (multi-category (buffer . "*Messages*") face consult-buffer) 10 11 (marginalia--align t display (space :align-to (+ left 70))) 14 17 (face marginalia-modified) 19 23 (face marginalia-size) 28 36 (face marginalia-mode) 50 90 (face marginalia-file-name))))
  apply(vertico-posframe--display (#("     Buffer  \n" 0 4 (face vertico-group-separator) 4 12 (face vertico-group-title) 12 13 (display (space :align-to right) face vertico-group-separator)) #("emacs.org    ---  61k      Org                    ..." 0 9 (multi-category (buffer . "emacs.org") face (consult-buffer vertico-current)) 9 10 (face vertico-current marginalia--align t display (space :align-to (+ left 70))) 10 13 (face vertico-current) 13 14 (face (marginalia-modified vertico-current)) 14 15 (face (marginalia-modified vertico-current)) 15 16 (face (marginalia-modified vertico-current)) 16 18 (face vertico-current) 18 21 (face (marginalia-size vertico-current)) 21 27 (face vertico-current) 27 30 (face (marginalia-mode vertico-current)) 30 49 (face vertico-current) 49 89 (face (marginalia-file-name vertico-current)) 89 90 (face vertico-current)) #("*scratch*    ---  145      Org                    ..." 0 9 (multi-category (buffer . "*scratch*") face consult-buffer) 9 10 (marginalia--align t display (space :align-to (+ left 70))) 13 16 (face marginalia-modified) 18 21 (face marginalia-size) 27 30 (face marginalia-mode) 49 89 (face marginalia-file-name)) #("magit-process: emacs    %*-  950      Magit Proces..." 0 20 (multi-category (buffer . "magit-process: emacs") face consult-buffer) 20 21 (marginalia--align t display (space :align-to (+ left 70))) 24 27 (face marginalia-modified) 29 32 (face marginalia-size) 38 51 (face marginalia-mode) 60 100 (face marginalia-file-name)) #("magit-diff: emacs    %%-  360      Magit Diff     ..." 0 17 (multi-category (buffer . "magit-diff: emacs") face consult-buffer) 17 18 (marginalia--align t display (space :align-to (+ left 70))) 21 24 (face marginalia-modified) 26 29 (face marginalia-size) 35 45 (face marginalia-mode) 57 97 (face marginalia-file-name)) #("magit: emacs    %%-  544      Magit               ..." 0 12 (multi-category (buffer . "magit: emacs") face consult-buffer) 12 13 (marginalia--align t display (space :align-to (+ left 70))) 16 19 (face marginalia-modified) 21 24 (face marginalia-size) 30 35 (face marginalia-mode) 52 92 (face marginalia-file-name)) #("*Help*    %%-  51k      Help                      ..." 0 6 (multi-category (buffer . "*Help*") face consult-buffer) 6 7 (marginalia--align t display (space :align-to (+ left 70))) 10 13 (face marginalia-modified) 15 18 (face marginalia-size) 24 28 (face marginalia-mode) 46 86 (face marginalia-file-name)) #("*Messages*    %*-  3.0k     Messages              ..." 0 10 (multi-category (buffer . "*Messages*") face consult-buffer) 10 11 (marginalia--align t display (space :align-to (+ left 70))) 14 17 (face marginalia-modified) 19 23 (face marginalia-size) 28 36 (face marginalia-mode) 50 90 (face marginalia-file-name))))
  vertico--display-candidates((#("     Buffer  \n" 0 4 (face vertico-group-separator) 4 12 (face vertico-group-title) 12 13 (display (space :align-to right) face vertico-group-separator)) #("emacs.org    ---  61k      Org                    ..." 0 9 (multi-category (buffer . "emacs.org") face (consult-buffer vertico-current)) 9 10 (face vertico-current marginalia--align t display (space :align-to (+ left 70))) 10 13 (face vertico-current) 13 14 (face (marginalia-modified vertico-current)) 14 15 (face (marginalia-modified vertico-current)) 15 16 (face (marginalia-modified vertico-current)) 16 18 (face vertico-current) 18 21 (face (marginalia-size vertico-current)) 21 27 (face vertico-current) 27 30 (face (marginalia-mode vertico-current)) 30 49 (face vertico-current) 49 89 (face (marginalia-file-name vertico-current)) 89 90 (face vertico-current)) #("*scratch*    ---  145      Org                    ..." 0 9 (multi-category (buffer . "*scratch*") face consult-buffer) 9 10 (marginalia--align t display (space :align-to (+ left 70))) 13 16 (face marginalia-modified) 18 21 (face marginalia-size) 27 30 (face marginalia-mode) 49 89 (face marginalia-file-name)) #("magit-process: emacs    %*-  950      Magit Proces..." 0 20 (multi-category (buffer . "magit-process: emacs") face consult-buffer) 20 21 (marginalia--align t display (space :align-to (+ left 70))) 24 27 (face marginalia-modified) 29 32 (face marginalia-size) 38 51 (face marginalia-mode) 60 100 (face marginalia-file-name)) #("magit-diff: emacs    %%-  360      Magit Diff     ..." 0 17 (multi-category (buffer . "magit-diff: emacs") face consult-buffer) 17 18 (marginalia--align t display (space :align-to (+ left 70))) 21 24 (face marginalia-modified) 26 29 (face marginalia-size) 35 45 (face marginalia-mode) 57 97 (face marginalia-file-name)) #("magit: emacs    %%-  544      Magit               ..." 0 12 (multi-category (buffer . "magit: emacs") face consult-buffer) 12 13 (marginalia--align t display (space :align-to (+ left 70))) 16 19 (face marginalia-modified) 21 24 (face marginalia-size) 30 35 (face marginalia-mode) 52 92 (face marginalia-file-name)) #("*Help*    %%-  51k      Help                      ..." 0 6 (multi-category (buffer . "*Help*") face consult-buffer) 6 7 (marginalia--align t display (space :align-to (+ left 70))) 10 13 (face marginalia-modified) 15 18 (face marginalia-size) 24 28 (face marginalia-mode) 46 86 (face marginalia-file-name)) #("*Messages*    %*-  3.0k     Messages              ..." 0 10 (multi-category (buffer . "*Messages*") face consult-buffer) 10 11 (marginalia--align t display (space :align-to (+ left 70))) 14 17 (face marginalia-modified) 19 23 (face marginalia-size) 28 36 (face marginalia-mode) 50 90 (face marginalia-file-name))))
  vertico--exhibit()
  consult-vertico--refresh()
  run-hooks(consult--completion-refresh-hook)
  apply(run-hooks consult--completion-refresh-hook)
  consult-narrow(98)
  #f(compiled-function () (interactive nil) #<bytecode 0x1f852f5886d6cad3>)()
  funcall-interactively(#f(compiled-function () (interactive nil) #<bytecode 0x1f852f5886d6cad3>))
  command-execute(#f(compiled-function () (interactive nil) #<bytecode 0x1f852f5886d6cad3>))
  #<subr completing-read-default>("Switch to: " #f(compiled-function (str pred action) #<bytecode 0x14a91aa308185108>) #f(compiled-function (&rest args2) #<bytecode -0xae24ffff914413f>) confirm-after-completion nil consult--buffer-history #("emacs.org" 9 10 (invisible t consult-strip t)) nil)
  vertico--advice(#<subr completing-read-default> "Switch to: " #f(compiled-function (str pred action) #<bytecode 0x14a91aa308185108>) #f(compiled-function (&rest args2) #<bytecode -0xae24ffff914413f>) confirm-after-completion nil consult--buffer-history #("emacs.org" 9 10 (invisible t consult-strip t)) nil)
  apply(vertico--advice #<subr completing-read-default> ("Switch to: " #f(compiled-function (str pred action) #<bytecode 0x14a91aa308185108>) #f(compiled-function (&rest args2) #<bytecode -0xae24ffff914413f>) confirm-after-completion nil consult--buffer-history #("emacs.org" 9 10 (invisible t consult-strip t)) nil))
  completing-read-default("Switch to: " #f(compiled-function (str pred action) #<bytecode 0x14a91aa308185108>) #f(compiled-function (&rest args2) #<bytecode -0xae24ffff914413f>) confirm-after-completion nil consult--buffer-history #("emacs.org" 9 10 (invisible t consult-strip t)) nil)
  completing-read("Switch to: " #f(compiled-function (str pred action) #<bytecode 0x14a91aa308185108>) #f(compiled-function (&rest args2) #<bytecode -0xae24ffff914413f>) confirm-after-completion nil consult--buffer-history #("emacs.org" 9 10 (invisible t consult-strip t)) nil)
  #f(compiled-function () #<bytecode -0x1868fd0dc285163c>)()
  consult--with-preview-1((:predicate #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_150> :keys (any)) #f(compiled-function (action arg0) #<bytecode 0xcf5ac6571d4e1b7>) #f(compiled-function (input cand) #<bytecode -0x12001433ddcb4a0c>) #f(compiled-function (&rest args2) #<bytecode 0x642925a5b7d4ec7>) #f(compiled-function () #<bytecode -0x1868fd0dc285163c>))
  consult--read-1((#(" *Minibuf-1*" 0 12 (face consult-buffer multi-category ...) 12 13 (invisible t consult-strip t)) #(" *Minibuf-0*" 0 12 (face consult-buffer multi-category ...) 12 13 (invisible t consult-strip t)) #(" *Echo Area 0*" 0 14 (face consult-buffer multi-category ...) 14 15 (invisible t consult-strip t)) #(" *Echo Area 1*" 0 14 (face consult-buffer multi-category ...) 14 15 (invisible t consult-strip t)) #(" *code-conversion-work*" 0 23 (face consult-buffer multi-category ...) 23 24 (invisible t consult-strip t)) #(" *emacsql-sqlite*" 0 17 (face consult-buffer multi-category ...) 17 18 (invisible t consult-strip t)) #(" *org-src-fontification:em..." 0 40 (face consult-buffer multi-category ...) 40 41 (invisible t consult-strip t)) #(" *stderr of elisp-flymake-..." 0 39 (face consult-buffer multi-category ...) 39 40 (invisible t consult-strip t)) #("*Flymake log*" 0 13 (face consult-buffer multi-category ...) 13 14 (invisible t consult-strip t)) #(" *server*" 0 9 (face consult-buffer multi-category ...) 9 10 (invisible t consult-strip t)) #("emacs.org" 0 9 (face consult-buffer multi-category ...) 9 10 (invisible t consult-strip t)) #("*scratch*" 0 9 (face consult-buffer multi-category ...) 9 10 (invisible t consult-strip t)) #("magit-process: emacs" 0 20 (face consult-buffer multi-category ...) 20 21 (invisible t consult-strip t)) #("magit-diff: emacs" 0 17 (face consult-buffer multi-category ...) 17 18 (invisible t consult-strip t)) #("magit: emacs" 0 12 (face consult-buffer multi-category ...) 12 13 (invisible t consult-strip t)) #("*Help*" 0 6 (face consult-buffer multi-category ...) 6 7 (invisible t consult-strip t)) #("*Messages*" 0 10 (face consult-buffer multi-category ...) 10 11 (invisible t consult-strip t)) #("~/.local/share/emacs/bookm..." 0 30 (face consult-file multi-category ...) 30 31 (invisible t consult-strip t)) #("~/.local/share/emacs/elpa/..." 0 68 (face consult-file multi-category ...) 68 69 (invisible t consult-strip t)) #("~/.config/emacs/emacs.el" 0 24 (face consult-file multi-category ...) 24 25 (invisible t consult-strip t)) #("~/src/MyStuff/emacs-lisp/f..." 0 53 (face consult-file multi-category ...) 53 54 (invisible t consult-strip t)) #("/usr/share/emacs/29.0.50/e..." 0 33 (face consult-file multi-category ...) 33 34 (invisible t consult-strip t)) #("~/.local/share/emacs/elpa/..." 0 63 (face consult-file multi-category ...) 63 64 (invisible t consult-strip t)) #("/usr/share/emacs/29.0.50/l..." 0 47 (face consult-file multi-category ...) 47 48 (invisible t consult-strip t)) #("/ssh:guix:~/tmphome" 0 19 (face consult-file multi-category ...) 19 20 (invisible t consult-strip t)) #("/usr/share/emacs/29.0.50/l..." 0 41 (face consult-file multi-category ...) 41 42 (invisible t consult-strip t)) ...) :require-match confirm-after-completion :prompt "Switch to: " :history consult--buffer-history :sort nil :default #("emacs.org" 9 10 (invisible t consult-strip t)) :category multi-category :predicate #f(compiled-function (&rest args2) #<bytecode -0xae24ffff914413f>) :annotate #f(compiled-function (&rest args2) #<bytecode -0xae2d955fc71713f>) :group #f(compiled-function (&rest args2) #<bytecode -0xae24ffffe4c413f>) :lookup #f(compiled-function (&rest args2) #<bytecode -0xae24ffffd10413f>) :preview-key (:predicate #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_150> :keys (any)) :narrow ((32 . "Hidden Buffer") (98 . "Buffer") (102 . "File") (109 . "Bookmark") (112 . "Project")) :state ...)
  consult--read((#(" *Minibuf-1*" 0 12 (face consult-buffer multi-category ...) 12 13 (invisible t consult-strip t)) #(" *Minibuf-0*" 0 12 (face consult-buffer multi-category ...) 12 13 (invisible t consult-strip t)) #(" *Echo Area 0*" 0 14 (face consult-buffer multi-category ...) 14 15 (invisible t consult-strip t)) #(" *Echo Area 1*" 0 14 (face consult-buffer multi-category ...) 14 15 (invisible t consult-strip t)) #(" *code-conversion-work*" 0 23 (face consult-buffer multi-category ...) 23 24 (invisible t consult-strip t)) #(" *emacsql-sqlite*" 0 17 (face consult-buffer multi-category ...) 17 18 (invisible t consult-strip t)) #(" *org-src-fontification:em..." 0 40 (face consult-buffer multi-category ...) 40 41 (invisible t consult-strip t)) #(" *stderr of elisp-flymake-..." 0 39 (face consult-buffer multi-category ...) 39 40 (invisible t consult-strip t)) #("*Flymake log*" 0 13 (face consult-buffer multi-category ...) 13 14 (invisible t consult-strip t)) #(" *server*" 0 9 (face consult-buffer multi-category ...) 9 10 (invisible t consult-strip t)) #("emacs.org" 0 9 (face consult-buffer multi-category ...) 9 10 (invisible t consult-strip t)) #("*scratch*" 0 9 (face consult-buffer multi-category ...) 9 10 (invisible t consult-strip t)) #("magit-process: emacs" 0 20 (face consult-buffer multi-category ...) 20 21 (invisible t consult-strip t)) #("magit-diff: emacs" 0 17 (face consult-buffer multi-category ...) 17 18 (invisible t consult-strip t)) #("magit: emacs" 0 12 (face consult-buffer multi-category ...) 12 13 (invisible t consult-strip t)) #("*Help*" 0 6 (face consult-buffer multi-category ...) 6 7 (invisible t consult-strip t)) #("*Messages*" 0 10 (face consult-buffer multi-category ...) 10 11 (invisible t consult-strip t)) #("~/.local/share/emacs/bookm..." 0 30 (face consult-file multi-category ...) 30 31 (invisible t consult-strip t)) #("~/.local/share/emacs/elpa/..." 0 68 (face consult-file multi-category ...) 68 69 (invisible t consult-strip t)) #("~/.config/emacs/emacs.el" 0 24 (face consult-file multi-category ...) 24 25 (invisible t consult-strip t)) #("~/src/MyStuff/emacs-lisp/f..." 0 53 (face consult-file multi-category ...) 53 54 (invisible t consult-strip t)) #("/usr/share/emacs/29.0.50/e..." 0 33 (face consult-file multi-category ...) 33 34 (invisible t consult-strip t)) #("~/.local/share/emacs/elpa/..." 0 63 (face consult-file multi-category ...) 63 64 (invisible t consult-strip t)) #("/usr/share/emacs/29.0.50/l..." 0 47 (face consult-file multi-category ...) 47 48 (invisible t consult-strip t)) #("/ssh:guix:~/tmphome" 0 19 (face consult-file multi-category ...) 19 20 (invisible t consult-strip t)) #("/usr/share/emacs/29.0.50/l..." 0 41 (face consult-file multi-category ...) 41 42 (invisible t consult-strip t)) ...) :require-match confirm-after-completion :prompt "Switch to: " :history consult--buffer-history :sort nil :default #("emacs.org" 9 10 (invisible t consult-strip t)) :category multi-category :predicate #f(compiled-function (&rest args2) #<bytecode -0xae24ffff914413f>) :annotate #f(compiled-function (&rest args2) #<bytecode -0xae2d955fc71713f>) :group #f(compiled-function (&rest args2) #<bytecode -0xae24ffffe4c413f>) :lookup #f(compiled-function (&rest args2) #<bytecode -0xae24ffffd10413f>) :preview-key (:predicate #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_150> :keys (any)) :narrow ((32 . "Hidden Buffer") (98 . "Buffer") (102 . "File") (109 . "Bookmark") (112 . "Project")) :state ...)
  consult--multi((consult--source-hidden-buffer consult--source-buffer consult--source-recent-file consult--source-bookmark consult--source-project-buffer consult--source-project-recent-file) :require-match confirm-after-completion :prompt "Switch to: " :history consult--buffer-history :sort nil)
  consult-buffer()
  funcall-interactively(consult-buffer)
  command-execute(consult-buffer)
tumashu commented 2 years ago

Please try again.

bjc commented 2 years ago

Working now! Gotta say that was a fast turn-around. Thank you!