abo-abo / avy

Jump to things in Emacs tree-style
1.71k stars 109 forks source link

Trouble with org-mode and evilem-next-line #300

Open WhatDothLife opened 4 years ago

WhatDothLife commented 4 years ago

When I'm editing an org-mode buffer and my cursor is behind the end of collapsed headings, the line properties change after calling evilem-motion-next-line, since the three dots teasing the heading contents move to the line below, creating a new one. I've added two pictures that show the described behavior. image image

I guess the reason is the two overlays competing with each other. So is this an org-mode or an avy issue? If you need further information, ask and I'll provide it. I really need this to be fixed.

abo-abo commented 4 years ago

I think you should report this issue to evil-easymotion, which relies on avy.

If you can narrow it down to just avy, I'll try to fix it here.

WhatDothLife commented 4 years ago

evil-easymotion applies avy to evil-commands, under which are evil-next-line and evil-previous-line, that result in this undesired behavior. Yet, this issue is of a more general nature, since the result would be the same when using e.g. next-line.

The core of the issue lies within the two overlays conflicting with each other: When behind a collapsed org-mode heading, evil-next-line moves point to the first dot of the org mode overlay. So now evilem-next-line is called and after indexing is done by avy, its overlays push the org overlays to the next line.

I think it is not possible to determine whether this is an org-mode or an avy issue, because two overlays in the same place is somehow an edge case, so I'd be interested in your opinion.

WhatDothLife commented 4 years ago

Any advice?