Fix empty line bug in capture
commit2a58795e1958210b96e9adee52b9dd68f7d1f50e
authorCarsten Dominik <carsten.dominik@gmail.com>
Tue, 26 Oct 2010 04:34:16 +0000 (26 06:34 +0200)
committerCarsten Dominik <carsten.dominik@gmail.com>
Tue, 26 Oct 2010 04:34:16 +0000 (26 06:34 +0200)
tree22bba4a4d29a96bd8e9b3d481605e4e667748e8c
parent6d44fef50a396617b6d1c86fc64451def31f4739
Fix empty line bug in capture

* lisp/org-capture.el (org-capture-empty-lines-before):
(org-capture-empty-lines-after): Make sure the n=0 does not insert any
newlines.

Marcel van der Boom writes:

> I'm in the process of migrating from org-remember to org-capture.
> Pretty easy going so far, but it seems org-capture adds newlines, which
> I think it should not do.
>
> My (test) capture-template is:
>
> (("t" "Todo" entry
>  (file "~/.outlet/GTD.org")
>  "* TODO %?" :prepend t :empty-lines 0)
>
> with the intention of inserting the captured task on the
> first line of the file ~/.outlet/GTD.org. What happens when I capture
> an task is this:
>
> <beginning of file>
>
> * TODO Captured task
>
> <original first line of file here>
> ....
>
> Both before and after the task is a newline. Also, when capturing and
> cancelling the capture with C-c C-k the newlines remain whereas the
> task is removed.
lisp/org-capture.el