emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Brady Trainor <algebrat@uw.edu>
To: emacs-orgmode@gnu.org
Subject: extra newlines in TYPE checkitem for capture-templates
Date: Thu, 23 Oct 2014 19:57:59 -0700	[thread overview]
Message-ID: <87siiegonc.fsf@uw.edu> (raw)



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	other threads:[~2014-10-24  2:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24  2:57 Brady Trainor [this message]
2014-10-24  5:00 ` extra newlines in TYPE checkitem for capture-templates Brady Trainor

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=87siiegonc.fsf@uw.edu \
    --to=algebrat@uw.edu \
    --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).