mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-17 10:36:27 +00:00
Fix inserting headlines at the end of the buffer.
When the cursor is at the end of the buffer but not at the beginning of a line, inserting a new headline with C-RET did insert the stars into the last line, without adding the needed newline. The new line is now added.
This commit is contained in:
parent
b87eb74600
commit
7d1e644715
|
@ -1,5 +1,8 @@
|
|||
2008-11-03 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org.el (org-insert-heading): If buffer does not end with a
|
||||
newline, add one if necessary to insert headline correctly.
|
||||
|
||||
* org-exp.el (org-export-as-html): Make sure that <hr/> is between
|
||||
paragraphs, not inside.
|
||||
|
||||
|
|
|
@ -4648,6 +4648,7 @@ but create the new headline after the current line."
|
|||
(cond
|
||||
(org-insert-heading-respect-content
|
||||
(org-end-of-subtree nil t)
|
||||
(or (bolp) (newline))
|
||||
(open-line 1))
|
||||
((org-on-heading-p)
|
||||
(when hide-previous
|
||||
|
|
Loading…
Reference in a new issue