Closed whatacold closed 5 years ago
Thanks, please test.
It seems to be working for M-x avy-goto-char RET g
now:
avy-goto-*
commandsA quick test showed that these commands still ignore the url part of the link:
avy-goto-subword-0
avy-goto-subword-1
avy-goto-symbol-1
avy-goto-symbol-1-above (with the cursor below the org link)
avy-goto-symbol-1-below (with the cursor above the link)
avy-goto-char-timer
I'm not sure how a symbol is defined, but if avy-goto-symbol-1
targets the first character in a "group" of characters, then those commands probably work as expected since github
inside the link part.
It works fine for avy-goto-char
now, but I can confirm that it remains at least for avy-goto-char-timer
.
@duianto Thanks for helping test.
@duianto Thanks for testing, I've added fixes for the functions you mentioned. Could not reproduce avy-goto-symbol-1-*
though, please add a repro scenario.
I followed the steps above:
emacs -Q -l C:\Users\username\.emacs.d\elpa\26.1\avy-20190117.1647\avy.el
(the path is to the Spacemacs install location, but I'm guessing that nothing Spacemacs related is loaded with emacs -Q
)test
: C-x b
test
RET
C-y
them into the test
buffer:
github
[[https://github.com/abo-abo/swiper][abo-abo/swiper - github.com]]
M-x
org-mode
RET
M-x
org-toggle-link-display
RET
M-x
avy-goto-symbol-1
g
or
M-x
avy-goto-symbol-1-above
g
Both cases show (the same as the "Before" screenshot above):
without the g
in the links word github
having a target.
M-x
avy-goto-symbol-1-below
g
Shows the same thing, a missing link g
target, but the a
and s
targets are swapped (I'm guessing because the targets are set from the cursor outwards.
P.S.
But as I said in the previous comment, if symbol
looks for the first char of:
https://github.com/abo-abo/swiper
then it won't add a target to the g
in the middle. In that case it's probably working as expected.
Just tested the latest version avy-20190121.1644
and:
avy-goto-subword-0
avy-goto-subword-1
avy-goto-char-timer
all work as expected, an avy goto target is added to the link as well. 👍
In that case it's probably working as expected.
That's what I suspected. See the doc:
Jump to the currently visible CHAR at a symbol start
In your example, "g" is not at a symbol start. So it works as expected. Thanks for testing.
Hi,
I noticed there is an issue that
avy-goto-char
will only match the description part of org link:git clone https://github.com/abo-abo/avy.git
andcd avy
emacs -Q -l avy.el
to run a fresh emacs instanceOpen a org-mode buffer and insert below two lines, then
M-x org-toggle-link-display
to display it literally.github [[https://github.com/abo-abo/swiper][abo-abo/swiper - github.com]]
M-x avy-goto-char RET g
will only highlight theg
s in the first line and second one of the second line, i.e. the one inhttps://github.com/abo-abo/swiper
is ignored.