Giter VIP home page Giter VIP logo

Comments (9)

daviwil avatar daviwil commented on August 29, 2024 1

I can confirm this problem goes away with newer Emacs 28. Smooth sailing with Vertico right now!

from vertico.

Eason0210 avatar Eason0210 commented on August 29, 2024 1

@minad I also got this error when I press C-h v with latest commit of vertico + latest marginalia:

Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp nil)

With git bitsec and I can confirmed that this issue happened at 1a24952 * Colorize truncation ellipsis and later commit of marginalia .

So, this issue may be caused by marginalia?

from vertico.

minad avatar minad commented on August 29, 2024

You are probably using an outdated version of Emacs 28. Please check that you are using the latest Vertico version and check the Emacs version you are using. It must be newer than emacs-mirror/emacs@d8e037e. Emacs 27 works too.

from vertico.

minad avatar minad commented on August 29, 2024

@tumashu Did updating fix your issue? Vertico works without issues for me on 27.1 and the current Emacs master.

from vertico.

tumashu avatar tumashu commented on August 29, 2024

seem to solved, :-)

from vertico.

blahgeek avatar blahgeek commented on August 29, 2024

I encountered the same problem ((vertico--exhibit): (wrong-type-argument stringp nil)) today with latest emacs 28.

I've been using vertico for several days without any problems, but today this error just popped up for no reason. (I don't think I did anything abnormal, maybe pressed C-g in the middle of completing read.) After it appeared once, it did not ever go away: I could not run any other commands involving completing-read from then. So I had to restart emacs and it came back to normal. I cannot reproduce it now.

Is there anything I can do to help debugging this issue in case I encountered it again? (but since I cannot run any commands involving completing-read at that time, it could be very difficult)

from vertico.

minad avatar minad commented on August 29, 2024

@blahgeek You evaluate the following first to produce a stacktrace:

(defun force-debug (func &rest args)
  (condition-case e
      (apply func args)
    ((debug error) (signal (car e) (cdr e)))))

(advice-add #'vertico--exhibit :around #'force-debug)

With a stack trace it is easier to debug this. Furthermore you should tell me which command is exactly affected by the issue. Anyways - Vertico should get back to normal even if this error occured if you start a new completing-read session. Restarting Emacs is not necessary. I have not seen this issue on Emacs 28. Emacs 28 is already pretty stable, I tested it just a few days ago.

from vertico.

blahgeek avatar blahgeek commented on August 29, 2024

I encountered this issue again: all commands using vertico (e.g. find-file, M-x, etc.) starts to fail. Error message:

Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp ("\\(?:co\\)"))
Quit
Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp nil)
Quit
Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp nil)
Quit [8 times]
Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp nil)
Quit
Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp nil)
Error in post-command-hook (consult--preview-post-command): (wrong-type-argument stringp nil)
orderless-pattern-compiler: Wrong type argument: stringp, nil [9 times]
Quit
Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp nil)
Quit
Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp nil)
Quit
Debug on Error enabled globally
Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp nil)
Quit
Error in post-command-hook (vertico--exhibit): (wrong-type-argument stringp nil)
Error in post-command-hook (consult--preview-post-command): (wrong-type-argument stringp nil)
Quit

Here's the backtrace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  split-string(nil " +" t)
  orderless-pattern-compiler(nil)
  orderless-highlight-matches(nil ("evil-collection-magit-toggle-text-minor-mode" "magit-section-show-headings" "flycheck-list-errors" "evil-find-file-at-point-visual" "pr-ps-file-preview" "lsp-treemacs-cycle-severity" "sgml-mode" "magit-patch-save" "c-electric-lt-gt" "help-follow-symbol"))
  #f(compiled-function (x) #<bytecode -0x1433a9504704410e>)(("evil-collection-magit-toggle-text-minor-mode" "magit-section-show-headings" "flycheck-list-errors" "evil-find-file-at-point-visual" "pr-ps-file-preview" "lsp-treemacs-cycle-severity" "sgml-mode" "magit-patch-save" "c-electric-lt-gt" "help-follow-symbol"))
  vertico--arrange-candidates()
  #<subr vertico--exhibit>()
  apply(#<subr vertico--exhibit> nil)
  (condition-case e (apply func args) ((debug error) (message "HERE: %s" (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (backtrace) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (signal (car e) (cdr e))))
  force-debug(#<subr vertico--exhibit>)
  apply(force-debug #<subr vertico--exhibit> nil)
  vertico--exhibit()
  #<subr completing-read-default>("M-x " #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_49> #f(compiled-function (sym) #<bytecode -0x19ff91b7be9671d1>) t nil extended-command-history nil nil)
  vertico--advice(#<subr completing-read-default> "M-x " #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_49> #f(compiled-function (sym) #<bytecode -0x19ff91b7be9671d1>) t nil extended-command-history nil nil)
  apply(vertico--advice #<subr completing-read-default> ("M-x " #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_49> #f(compiled-function (sym) #<bytecode -0x19ff91b7be9671d1>) t nil extended-command-history nil nil))
  completing-read-default("M-x " #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_49> #f(compiled-function (sym) #<bytecode -0x19ff91b7be9671d1>) t nil extended-command-history nil nil)
  read-extended-command()
  byte-code("\302\30\11\303 \10E)\207" [execute-extended-command--last-typed current-prefix-arg nil read-extended-command] 3)
  command-execute(execute-extended-command)

from vertico.

blahgeek avatar blahgeek commented on August 29, 2024

Update: so the problem seems to be in "orderless" package. I did some debugging and the result is very strange:

  1. In this problematic emacs, I executed (orderless-highlight-matches nil '("hello" "world")) in scratch buffer, it throwed error
  2. However, in another newly started emacs, I executed the same code and it's OK
  3. In the problematic emacs, I executed the (defun orderless-highlight-matches ... block again, then everything went back to normal

It seems that the definition of orderless-highlight-matches function got modified somehow...?

from vertico.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.