It would be quite useful if I could use currentfile in place of "path/to/file" 
in the various Target patterns.  That is, it would be nice to write something 

(setq org-capture-templates
   '(("j" "Journal" entry (file+headline currentfile "Journal") "* %a\n\n%i"))
     ("t" "To Do" entry (file+headline currentfile "Tasks") "* TODO %? %i\n")))


-- Greg
Greg Sullivan
(781)262-4553 (office) (978)430-3461 (cell)

-----Original Message-----
From: Bastien Guerry [] On Behalf Of Bastien
Sent: Friday, February 11, 2011 5:22 AM
To: Sullivan, Gregory (US SSA)
Cc: Giovanni Ridolfi;
Subject: Re: [Orgmode] using (id "Name") target in org-capture-templates

Hi Gregory,

"Sullivan, Gregory (US SSA)" <> writes:

> Thanks for the note.  I did indeed mean to use headings.
> I think it would be nice to be able to have the file dynamic but the 
> heading static in capture templates.  In my case, I always want to 
> find a particular heading in the buffer that the capture originated 
> from. So I had to put the whole target spec in a function, as in:

I like the idea of being able to tell capture to use the current file.

This patch against latest Org allows you to use (currentfile) like this:

| (setq org-capture-templates
|   '(("j" "Journal" entry (currentfile) "* %a\n\n%i")))

Let me know if you find this useful.

Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.

Reply via email to