From: Rick Frankel <rick@rickster.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] Inserting new heading
Date: Wed, 15 Mar 2017 10:24:33 -0400 [thread overview]
Message-ID: <20170315142432.3md5z6yhdymbryck@eyeBook> (raw)
There is a bug w/ inserting new headings after a collapsed heading (w/
C-return, org-insert-heading-respect-content) if the last content under the
heading (or a subhead) is a RESULTS: block. This occurs w/ the value of
org-blank-before-new-entry as either '(heading . auto) or '(heading . nil).
This started a few months ago, but I just figured out what actually causes the
behavior.
Given the following org file:
--------------------------
* C-return tests
** Results w/ ending blank line removed
#+BEGIN_SRC sh
echo 'foo'
#+END_SRC
#+RESULTS:
: foo
** Results w/ ending blank line
#+BEGIN_SRC sh
echo 'foo'
#+END_SRC
#+RESULTS:
: foo
** A heading
------------------------------
Steps to reproduce:
For "Correct" (expected) results:
1. Collapse all the headings.
2. Place the cursor On the line "Results w/ ending blank line removed".
3. Hit <C-return> (org-insert-heading-respect-content)
A new heading is inserted just before the following heading.
For "Incorrect" results:
1. Collapse all the headings.
2. Place the cursor On the line "Results w/ ending blank line".
3. Hit <C-return> (org-insert-heading-respect-content)
The new heading characters ('**') are appended to the end of the result
block (the end of the heading line after the '...')
BTW, if the heading containing the source block is expanded it works correctly.
rick
next reply other threads:[~2017-03-15 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 14:24 Rick Frankel [this message]
2017-03-16 12:03 ` [BUG] Inserting new heading Nicolas Goaziou
2017-03-16 19:38 ` Rick Frankel
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170315142432.3md5z6yhdymbryck@eyeBook \
--to=rick@rickster.com \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.