From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [BUG] Inserting new heading Date: Thu, 16 Mar 2017 13:03:18 +0100 Message-ID: <878to5h1ix.fsf@nicolasgoaziou.fr> References: <20170315142432.3md5z6yhdymbryck@eyeBook> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coU7s-000370-AO for emacs-orgmode@gnu.org; Thu, 16 Mar 2017 08:03:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coU7n-0005lc-BH for emacs-orgmode@gnu.org; Thu, 16 Mar 2017 08:03:28 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:38913) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1coU7n-0005kj-4F for emacs-orgmode@gnu.org; Thu, 16 Mar 2017 08:03:23 -0400 Received: from saiph.selenimh (00004301000000000000074b.ipv6.commingeshautdebit.fr [IPv6:2a03:a0a0:0:4301::74b]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 3C54A1720B3 for ; Thu, 16 Mar 2017 13:03:21 +0100 (CET) Received: from ngz by saiph.selenimh with local (Exim 4.88) (envelope-from ) id 1coU7i-0002zs-Vm for emacs-orgmode@gnu.org; Thu, 16 Mar 2017 13:03:19 +0100 In-Reply-To: <20170315142432.3md5z6yhdymbryck@eyeBook> (Rick Frankel's message of "Wed, 15 Mar 2017 10:24:33 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hello, Rick Frankel writes: > 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 (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 (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. Fixed. I couldn't reproduce it on maint tho, so the commit landed on master branch. Thank you. Regards, -- Nicolas Goaziou