emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] extra newlines in TYPE checkitem for capture-templates


From: Brady Trainor
Subject: [O] extra newlines in TYPE checkitem for capture-templates
Date: Thu, 23 Oct 2014 19:57:59 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt)


I am prepending a checkboxed plain list item to a file named "pomodoro.org" 
(I'm not really doing pomodoro here anymore, it started as this but the unique 
filename stuck, and it is my ad-hoc datetree). It is organized much like a 
datetree, but flatter and newest first, thus the use of prepend. However, the 
capture buffer includes two extra newlines, which I must get rid of before or 
after completing the capture. 

Is this desired behavior for capture-templates TYPE checkitem? 

I am still on ELPA version of org, 8.2.10. 

Here is my 

#+BEGIN_SRC emacs-lisp
(setq pomodoro "~/pomodoro.org")
(setq org-capture-templates
      `(("p" "pomodoro, checklist" checkitem (file ,pomodoro)
         ""
         :prepend t
         :empty-lines 0
         :empty-lines-before 0
         :empty-lines-after 0
         ;; :unnarrowed t
         )))
#+END_SRC

The result of consecutive captures looks like: 

#+BEGIN_SRC org

- [ ] a second capture

- [ ] a first capture

#+END

The spacing is doubled if I use `:unnarrowed t'. 

I have also tried `(file+regexp ,pomodoro "- \\[")', but I still get the extra 
line. 

A solution would be to use file+headline, then not using :prepend prevents an 
extra line, but my headline is the date and varies. 

Thank you, 

--
Brady




reply via email to

[Prev in Thread] Current Thread [Next in Thread]