Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swiper: Error in post-command-hook (ivy--queue-exhibit): (wrong-type-argument number-or-marker-p nil) (with org-mode?) #3036

Open
stefan2904 opened this issue Mar 25, 2024 · 1 comment
Labels
moreinfo Waiting for author to provide more information support triage

Comments

@stefan2904
Copy link

Since a few weeks, I get the following error when using swiper (after a few keystrokes in the swiper minibuffer):

Error in post-command-hook (ivy--queue-exhibit): (wrong-type-argument number-or-marker-p nil)

It seems that this only happens in buffers with org-mode enabled, but I am not 100% sure.
As this does not trigger debug-on-error, I am not sure how to best debug it further.

My init.el only contains the following:

(use-package ivy
  :ensure t)
(use-package swiper
  :ensure t)

(require 'ivy)

;(ivy-mode 1)

(setq ivy-use-virtual-buffers t)
;(setq ivy-count-format "(%d/%d) ")
;(setq enable-recursive-minibuffers t)


(global-set-key "\C-s" 'swiper)
  • GNU Emacs 28.1
  • counsel 20240229.1509
  • ivy 20240214.2118
  • swiper 20240214.2118
  • Org mode version 9.7-pre (release_9.6.21-1298-gb338a9)
@basil-conto
Copy link
Collaborator

basil-conto commented Apr 7, 2024

Error in post-command-hook (ivy--queue-exhibit): (wrong-type-argument number-or-marker-p nil)

It seems that this only happens in buffers with org-mode enabled, but I am not 100% sure. As this does not trigger debug-on-error, I am not sure how to best debug it further.

Yes, these can be difficult to debug, especially when it's not always reproducible. One of the simplest options is to copy the definition of ivy--insert-minibuffer, sprinkle some print-debugging calls like (message ">>> n") for different values of n among the function's lines, and reevaluate the function (this will overwrite its previous definition). That might shed more light on which part of the ivy--exhibit hook is failing. It could be that old-mark is nil, for example.

@basil-conto basil-conto added triage moreinfo Waiting for author to provide more information support labels Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moreinfo Waiting for author to provide more information support triage
Projects
None yet
Development

No branches or pull requests

2 participants