-
-
Notifications
You must be signed in to change notification settings - Fork 339
ivy-avy fails with ' Wrong type argument: number-or-marker-p, nil' #3074
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
Comments
Please provide more details:
I am unable to reproduce an error involving
|
Thanks for your quick response! This is the emacs version : This is the init file that I am starting with : These are the entries for swiper and ivy in my .emacs.d : I set debug-on-entry to swiper--action, and got this stack trace :
I evaluated 'x' on frame 0, and got this : The key strokes I did were the following : At this point I encounter : Please let me know what else I can provide. And thanks again for your promptness. |
Thanks for the details! With this I was able to reproduce the issue and realise what's going on and what I'd misunderstood in the OP. The problem is that Line 161 in 2529a23
Similarly Line 1630 in 2529a23
By contrast Lines 111 to 112 in 2529a23
That means that binding I suggest you adapt your configuration to something like the following instead: ;;; init.el --- my user-init-file -*- lexical-binding: t -*-
(autoload 'ivy-avy "ivy-avy" nil t)
(keymap-global-set "C-s" #'swiper)
(with-eval-after-load 'ivy
(keymap-set ivy-minibuffer-map "M-]" #'ivy-avy))
(with-eval-after-load 'swiper
(keymap-set swiper-map "M-]" #'swiper-avy)) |
Yes, it works! Thanks. |
Both counsel-ag and counsel-grep seem to work with the default C-' binding of ivy-avy in ivy-minibuffer-map, so overriding it with swiper-avy may be unnecessary (abo-abo#1711). Meanwhile swiper works only with swiper-avy and not ivy-avy, so remap the latter to the former in swiper-map. This means users who change the C-' binding in ivy-minibuffer-map will not have to also repeat the same in swiper-map (abo-abo#1711, abo-abo#3074). Keep C-' override for backward compatibility. * counsel.el (counsel-ag-map, counsel-grep-map): Remove swiper-avy key binding. Add docstring. * swiper.el (swiper-map): Remap ivy-avy to swiper-avy.
when ivy-avy is called, I see that ivy-call calls swiper--action with a plain string (the line of text that was selected with the avy key). Subsequently swiper--line-number fails, since the string has no text property (get-text-property fails on the input string).
The text was updated successfully, but these errors were encountered: