From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sullivan, Gregory (US SSA)" Subject: RE: using (id "Name") target in org-capture-templates Date: Tue, 22 Feb 2011 13:55:30 -0500 Message-ID: <83D2ABE0B13B7F409D1DE93916009DAD071F626298@GLDMS60322.goldlnk.rootlnka.net> References: <87wrl6yipt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=54156 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrxOV-0003Ar-A8 for Emacs-orgmode@gnu.org; Tue, 22 Feb 2011 13:55:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrxOT-0006zy-3T for Emacs-orgmode@gnu.org; Tue, 22 Feb 2011 13:55:31 -0500 Received: from dmzms99901.na.baesystems.com ([149.32.200.65]:61408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrxOT-0006zM-1A for Emacs-orgmode@gnu.org; Tue, 22 Feb 2011 13:55:29 -0500 In-Reply-To: <87wrl6yipt.fsf@gnu.org> Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: "Emacs-orgmode@gnu.org" It would be quite useful if I could use currentfile in place of "path/to/fi= le" in the various Target patterns. That is, it would be nice to write som= ething 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 --=20 Greg Sullivan gregory.sullivan@baesystems.com (781)262-4553 (office) (978)430-3461 (cell) -----Original Message----- From: Bastien Guerry [mailto:bastienguerry@googlemail.com] On Behalf Of Bas= tien Sent: Friday, February 11, 2011 5:22 AM To: Sullivan, Gregory (US SSA) Cc: Giovanni Ridolfi; Emacs-orgmode@gnu.org 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=20 > heading static in capture templates. In my case, I always want to=20 > find a particular heading in the buffer that the capture originated=20 > 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.