[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] issue with `org-insert-heading'

From: Oleh
Subject: [O] issue with `org-insert-heading'
Date: Fri, 19 Sep 2014 14:23:33 +0200

Hi all,

I just wanted to point out what I think is a bug in `org-insert-heading'.
The abridged code:

#+begin_src elisp
(let ((adjust-empty-lines t))
  ;; code that does not change `adjust-empty-lines'
  (when adjust-empty-lines
    (if (or (not blank)
            (and blank (not (org-previous-line-empty-p))))
        (org-N-empty-lines-before-current (if blank 1 0)))))

So at the very least there's test that always returns t.

The effect of this code is that when I do "M-RET" 3 times in a blank
file, the first two stars don't get a space after them and get
highlighted differently than the third.
Calling `outline-previous-heading' from the third star moves point to
the first star and not the second, which means that they're not
recognized as proper headings.

What I think 3 "M-RET" should do is to insert a space after each star.
That way they are proper headings with empty headlines.

best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]