From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luke Subject: Re: Bug: org-capture inserts empty line before title Date: Sun, 4 Mar 2018 08:13:09 +0800 Message-ID: References: <87r2p0g4xv.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------F578319A4857C15005BFE778" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esHI4-0006ga-MN for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 19:14:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esHI1-0000WA-Gu for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 19:14:12 -0500 Received: from sonic306-21.consmr.mail.sg3.yahoo.com ([106.10.241.141]:40209) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esHI0-0000VX-HZ for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 19:14:09 -0500 In-Reply-To: <87r2p0g4xv.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------F578319A4857C15005BFE778 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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") --------------F578319A4857C15005BFE778 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi,


On 04/03/18 06:40, Nicolas Goaziou wrote:
Hello,

Luke <mideniko1234-org@yahoo.co.uk> 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")

--------------F578319A4857C15005BFE778--