6

Here is an illustration of the problem:

 - First item. Pressing M-RET...
 - Another item at the correct position. Now a blank line:

 - Next item after blank line. Now press M-RET again...

 - .. but now I'm down here!
6

You can configure that using the org-blank-before-new-entry variable.

I have set that to '((heading) (plain-list-item)) so that such blank lines are not auto-inserted after M-RET for headings and list items.

You can also set just the cdr of the element with plain-list-item to nil to get exactly what want by doing:

(setcdr (assoc 'plain-list-item org-blank-before-new-entry) nil)

Have a look at C-h v org-blank-before-new-entry output.

Should org-insert-heading leave a blank line before new heading/item? The value is an alist, with heading and plain-list-item as CAR, and a boolean flag as CDR. The cdr may also be the symbol auto, in which case Org will look at the surrounding headings/items and try to make an intelligent decision whether to insert a blank line or not.

It's default value is

'((heading . auto) (plain-list-item . auto))

So what are are seeing is expected.. as you had a blank line before the "- Next item after blank line. Now press M-RET again..." list item, it inserted a blank line before "- .. but now I'm down here!" too.

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.