abo-abo / avy

Jump to things in Emacs tree-style
1.7k stars 108 forks source link

avy-copy/move-line/region expects a keystroke on emacs 28 #350

Closed aragaer closed 2 years ago

aragaer commented 2 years ago

avy-copy-line expects an additional keystroke which is then printed.

Example:

line1
line2

When I run M-x avy-copy-line, lines are marked with a and s. When I press a nothing happens. When I press any other key, that key is inserted and line1 is copied after it and point stays between that key and line1.

s<point>line1

Similar behavior happens with avy-move-line, avy-copy-region and avy-move-region (with region the extra keystroke is only needed in the end).

The issue didn't reproduce in the step-by-step debug. It appeared after emacs upgrade from 27.2 to 28.1.

aragaer commented 2 years ago

Apparently the issue is not related to avy, just found out that M-x org-id-get-create RET also expects a keystroke.

aragaer commented 2 years ago

Finally found the reason -- completion-pcm--all-completions took significant time (and actually the avy-copy-line did work after about 10 second timeout). Apparently the problem was in the code that tried to suggest me a shorter command. (setq extended-command-suggest-shorter nil) solved the problem.