[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Orgmode] using (id "Name") target in org-capture-templates
From: |
Sullivan, Gregory (US SSA) |
Subject: |
RE: [Orgmode] using (id "Name") target in org-capture-templates |
Date: |
Tue, 22 Feb 2011 13:55:30 -0500 |
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
like:
(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")))
Thanks.
-- Greg
--
Greg Sullivan address@hidden
(781)262-4553 (office) (978)430-3461 (cell)
-----Original Message-----
From: Bastien Guerry [mailto:address@hidden On Behalf Of Bastien
Sent: Friday, February 11, 2011 5:22 AM
To: Sullivan, Gregory (US SSA)
Cc: Giovanni Ridolfi; address@hidden
Subject: Re: [Orgmode] using (id "Name") target in org-capture-templates
Hi Gregory,
"Sullivan, Gregory (US SSA)" <address@hidden> 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.