From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)] Date: Thu, 09 Jan 2020 17:40:18 +0100 Message-ID: <87sgkoeg7h.fsf@nicolasgoaziou.fr> References: <87sgkxwk7i.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46144) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iparB-0007FK-Sc for emacs-orgmode@gnu.org; Thu, 09 Jan 2020 11:40:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipar9-0001QA-3X for emacs-orgmode@gnu.org; Thu, 09 Jan 2020 11:40:25 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:35071) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ipar8-0001EO-SZ for emacs-orgmode@gnu.org; Thu, 09 Jan 2020 11:40:23 -0500 In-Reply-To: (Miguel Morin's message of "Thu, 09 Jan 2020 07:54:01 +0000") 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: Miguel Morin Cc: emacs-orgmode@gnu.org Hello, Miguel Morin writes: > I put "refiling" in the title as that is the moment when things go awry, so I noticed it when I refiled items. > > I updated Org to 9.3.1 and confirm that the bug is still present. Because I got some compatibility problems, I tested it with `emacs -q`, in which I didn't have email, and then drafted the email after reverting to the built-in 9.1.9. > > Below is the relevant part to reproduce the bug. What do you mean by > ECM? Error Correction Mode? Engineering Change Management? Complete Minimal Example, using French wording order, which is more or less what you did provide. > Start a file at `~/test.org` with: > > ``` > * heading 1 > > * heading 2 > > * heading 3 > ``` > > Set this capture template: > > ``` > (setq org-capture-templates > '(("t" "Todo" entry (file+headline "~/test.org" "heading 1") > "* TODO %?\n"))) > ``` > > add a capture item, delete newlines from the end of the org-capture buffer, and refile to "heading 3". The heading next to the refiled item is gobbled and both the org-capture item and the gobbled "heading 2" move to "heading 3". > > [![Empty lines method, step 1 - create an org-capture item][1]][1] > > [![Empty lines method, step 2 - delete lines from end of org-capture buffer][2]][2] > > [![Empty lines method, step 3 - refile][3]][3] > > [1]: https://i.stack.imgur.com/6cUlo.png > [2]: https://i.stack.imgur.com/GPwg8.png > [3]: https://i.stack.imgur.com/tzAJI.png FWIW, I cannot reproduce it with your recipe. Maybe someone else could. Regards, -- Nicolas Goaziou