bug: avy teleport functionality broken for evilem-motion-next/previous-line
I am observing that when I invoke evilem-motion-next-line and attempt to teleport the target line (via t <target-combo>), only the first word on the line gets teleported (it should be the whole line). Same for -previous-line.
This behavior works as expected with avy-goto-line.
This would be great to fix as these motions are more usable compared to avy-goto-line.
I'm sorry I can't really understand. What is teleporting a line, as opposed to a word in that line?
See gif for illustration. I am invoking the teleport action (i.e. pressing "t" before the avy hotkey). The behavior is expected to be the same in both cases, namely, line two should teleport to the top.

Oh I see, this is a feature I wasn't aware of. Unfortunately, the design of avy makes fixing this a bit difficult. E.g.
(defun avy-forward-item ()
(if (eq avy-command 'avy-goto-line)
(end-of-line)
(forward-sexp))
(point))
(Note the hardcoded condition).
There are a lot of ways we could approach this:
- Bind the action functions (i.e. define our own line-wise and bind them for line-wise motions)
- Bind
avy-dispatch-alist - Define a new
avyhandler (seems like a lot of work)
Note that for some reason, simply binding avy-command doesn't work. I don't know why but honestly, that seems like a bad approach anyway given how avy is structured.