emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Luke <mideniko1234-org@yahoo.co.uk>
To: emacs-orgmode@gnu.org
Subject: Re: Bug: org-capture inserts empty line before title
Date: Fri, 9 Mar 2018 11:36:16 +0800	[thread overview]
Message-ID: <p7svbj$c0$1@blaine.gmane.org> (raw)
In-Reply-To: <ced9ac98-6f67-948f-9c2d-66908abbd687@yahoo.co.uk>

On 04/03/18 08:13, Luke wrote:
> 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")
> 

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

  reply	other threads:[~2018-03-09  3:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02  3:46 Bug: org-capture inserts empty line before title Luke
2018-03-03 22:40 ` Nicolas Goaziou
2018-03-04  0:13   ` Luke
2018-03-09  3:36     ` Luke [this message]
2018-03-11 18:22     ` Nicolas Goaziou

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='p7svbj$c0$1@blaine.gmane.org' \
    --to=mideniko1234-org@yahoo.co.uk \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).