I am using Emacs with evil-mode enabled.

I would love to be able to move back using h when the cursor is exactly at the last character of a folded org file (as shown in the picture).

enter image description here

However, when I press h, it gives me an error message Beginning of line, even though it clearly isn't in the beginning of the line.

Is there a way to just go to the . character when I press h?

(I think that the last line is empty, and the folding is "packing" the empty line in the last character of the line I highlighted in the image.)


You’re currently positioned inside the folded text. Visually the cursor is drawn on the same line as the headline, but that’s slightly misleading. Also, the three dots indicating that something is folded aren’t really part of the document; they’re just an overlay. You can’t position the cursor within it, only before or after it.

As I understand it, character movement in vi (and thus evil–mode) won’t move past the line boundaries, hence the error you’re getting. You could use the normal Emacs movement commands such as left-char or backward-char and it would do exactly what you want. org-beginning-of-line and org-end-of-line also handle this case; they move you to the beginning and end of the headline respectively.

  • But why am I able to position my cursor in the dots and move back with h on the others (non-last) folded lines?
    – Xaphanius
    Dec 26 '21 at 20:53
  • As @db48x said, the dots are an overlay. They're not really there. Think of them as a mirage. Dec 28 '21 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.