From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luke Subject: Re: Bug: org-capture inserts empty line before title Date: Fri, 9 Mar 2018 11:36:16 +0800 Message-ID: References: <87r2p0g4xv.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu8pd-00052d-7J for emacs-orgmode@gnu.org; Thu, 08 Mar 2018 22:36:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eu8pZ-0008UZ-A7 for emacs-orgmode@gnu.org; Thu, 08 Mar 2018 22:36:33 -0500 Received: from [195.159.176.226] (port=41914 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eu8pZ-0008UJ-2t for emacs-orgmode@gnu.org; Thu, 08 Mar 2018 22:36:29 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eu8nS-0000Fz-1Z for emacs-orgmode@gnu.org; Fri, 09 Mar 2018 04:34:18 +0100 In-Reply-To: Content-Language: en-US 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 On 04/03/18 08:13, Luke wrote: > Hi, > > > On 04/03/18 06:40, Nicolas Goaziou wrote: >> Hello, >> >> Luke writes: >> >>> org-capture seems to be inserting an extra line before the task >>> heading. So the narrowed buffer for editing the task looks something >>> like this: >>> >>> -------------------- Top of window --------------- >>> >>> ** TODO My new task >>> [2018-03-02 Fri] >>> [[file:~/.notes]] >>> -------------------- End of buffer --------------- >>> >>> I would expect the task heading to be the first line in the buffer. >>> After pressing 'C-c C-c' the resulting file looks like this: >>> >>> -------------------------------------------------- >>> * Tasks >>> >>> ** TODO My new task >>> [2018-03-02 Fri] >>> [[file:~/.notes]] >>> -------------------------------------------------- >>> >>> Is this a bug? If not, how do I stop the blank line from being >>> inserted before the heading. As far as I can tell, this is not related >>> to org-blank-before-new-entry. >> Could you show the capture template you used? I do not notice anything >> like that with my templates. >> >> Regards, >> > I've set up a minimal-org.el file with the following contents: > >     ;; Minimal setup to load latest 'org-mode' > >     ;; activate debugging >     (setq debug-on-error t >           debug-on-signal nil >           debug-on-quit t) > >     ;; add latest org-mode to load path >     (add-to-list 'load-path (expand-file-name "~/elisp/org-mode/lisp")) >     (add-to-list 'load-path (expand-file-name > "~/elisp/org-mode/contrib/lisp" t)) > > Then I've run emacs with `emacs -Q -l minimal-org.el`. So I'm just > running the with org-mode default capture template, which (taken from > org-capture.el) would be: > >     ("t" "Task" entry (file+headline "" "Tasks") >      "* TODO %?\n  %u\n  %a") > As a follow up, after running `git bisect` I've tracked down that the behavior that I describe starts to appear in commit 8ebf4b7274 ("Change `org-paste-subtree' behavior"). It doesn't seem to manifest in the commits previous to that. I'm not sure why though. Regards, -- Luke