1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-05 11:45:52 +00:00

Fix bug with C-RET

Leo writes:

> Hi there,
>
> ,----[ (info "(org)Structure editing") ]
> | `C-<RET>'
> |      Just like `M-<RET>', except when adding a new heading below the
> |      current heading, the new heading is placed after the body instead
> |      of before it.  This command works from anywhere in the entry.
> `----
>
> Inside a substree and with the point at the beginning of a line, C-RET
> turns the current line into a heading. In the following example, ><
> indicates where the point is.
>
> ----------------
> * Sample
> <  This is not a heading
> ----------------
>
> After C-RET, it changes to
> ----------------
> * Sample
> * This is not a heading
> ----------------
>
> I can reproduce this with org 6.29c as included in Emacs. Can someone
> else reproduce this bug?
This commit is contained in:
Carsten Dominik 2009-08-07 16:29:43 +02:00
parent 0af5133334
commit 76d970b761
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2009-08-07 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-insert-heading): When respecting content, do not
convert current line to headline.
* org-clock.el (org-clock-save-markers-for-cut-and-paste): Also
cheeeeeck the hd marker
(org-clock-in): Also set the hd marker.

View File

@ -5665,6 +5665,7 @@ but create the new headline after the current line."
;; insert before the current line
(open-line (if blank 2 1)))
((and (bolp)
(not org-insert-heading-respect-content)
(or (bobp)
(save-excursion
(backward-char 1) (not (org-invisible-p)))))