emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: Append new heading when :END: exists


From: Bastien
Subject: Re: [O] Bug: Append new heading when :END: exists
Date: Mon, 22 Apr 2013 20:57:12 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

I'm tempted to apply the following patch, as this problem falls under
the category of "inserting in an invisible region".  I don't think it
breaks any non-interactive call of org-insert-heading, but this needs
further checking.

Also, note that the problem occurs only when there is no blank line
between the :END: and the following headline, so maybe the real fix
has to be within org-insert-heading...

diff --git a/lisp/org.el b/lisp/org.el
index 8c55bd4..4d16682 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7495,6 +7495,7 @@ and create a new headline with the text in the current 
line after point
 When INVISIBLE-OK is set, stop at invisible headlines when going back.
 This is important for non-interactive uses of the command."
   (interactive "P")
+  (org-check-before-invisible-edit 'insert)
   (cond
    ((or (= (buffer-size) 0)
        (and (not (save-excursion
-- 
 Bastien

reply via email to

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