From: Bastien <bzg@gnu.org>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>,
Muchenxuan Tong <demon386@gmail.com>
Subject: Re: Bug: Append new heading when :END: exists
Date: Mon, 22 Apr 2013 20:57:12 +0200 [thread overview]
Message-ID: <87sj2io0l3.fsf@bzg.ath.cx> (raw)
In-Reply-To: <CA+M2ft-ibNBZaa7QQC3qVds1ntftabhigE8h8yeRAACGvaiVrw@mail.gmail.com> (John Hendy's message of "Mon, 22 Apr 2013 07:01:11 -0500")
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
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...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org.el.patch --]
[-- Type: text/x-patch, Size: 464 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
next prev parent reply other threads:[~2013-04-22 18:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 9:02 Bug: Append new heading when :END: exists Muchenxuan Tong
2013-04-22 12:01 ` John Hendy
2013-04-22 18:57 ` Bastien [this message]
2013-04-23 1:23 ` Muchenxuan Tong
2013-04-22 15:40 ` Jeff Kowalczyk
2013-04-22 18:48 ` Carsten Dominik
2013-04-22 20:01 ` John Hendy
2013-04-22 20:33 ` Bastien
2013-04-24 7:57 ` Bastien
2013-04-24 8:31 ` Muchenxuan Tong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sj2io0l3.fsf@bzg.ath.cx \
--to=bzg@gnu.org \
--cc=demon386@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jw.hendy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).