[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] RE: [Orgmode] using (id "Name") target in org-capture-templates
From: |
Sullivan, Gregory (US SSA) |
Subject: |
[O] RE: [Orgmode] using (id "Name") target in org-capture-templates |
Date: |
Sun, 6 Mar 2011 14:57:47 -0500 |
Perfect. Thanks very much!
-- 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: Sunday, March 06, 2011 12:08 PM
To: Sullivan, Gregory (US SSA)
Cc: Giovanni Ridolfi; address@hidden
Subject: Re: [Orgmode] using (id "Name") target in org-capture-templates
Hi Sullivan,
"Sullivan, Gregory (US SSA)" <address@hidden> writes:
> The way I understood your patch is that I can use (currentfile) as
> _the_ target expression in a capture template. What I was requesting
> was to use 'capturefile' _within_ a file+headline target
> expressions. Let me re-include a motivating example - as your citation
> didn't include it:
Sorry, I overlooked your request.
> (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")))
Actually, you can already do this:
(setq org-capture-templates
'(("j" "Journal" entry (file+headline buffer-file-name "Journal") "*
%a\n\n%i"))
("t" "To Do" entry (file+headline buffer-file-name "Tasks") "* TODO %?
%i\n")))
See the documentation about file specification.
So I removed (currentfile), which is simply (file buffer-file-name)).
HTH,
--
Bastien