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: Sun, 6 Mar 2011 14:57:47 -0500 Message-ID: References: <87tyfgp46v.fsf@altern.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=52745 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwKAo-0005Wb-Ft for Emacs-orgmode@gnu.org; Sun, 06 Mar 2011 15:03:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwK5S-0005Le-W9 for Emacs-orgmode@gnu.org; Sun, 06 Mar 2011 14:57:56 -0500 Received: from dmzms99902.na.baesystems.com ([149.32.200.66]:16956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwK5S-0005KF-Tw for Emacs-orgmode@gnu.org; Sun, 06 Mar 2011 14:57:54 -0500 In-Reply-To: <87tyfgp46v.fsf@altern.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" Perfect. Thanks very much! -- 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: Sunday, March 06, 2011 12:08 PM To: Sullivan, Gregory (US SSA) Cc: Giovanni Ridolfi; Emacs-orgmode@gnu.org Subject: Re: [Orgmode] using (id "Name") target in org-capture-templates Hi Sullivan, "Sullivan, Gregory (US SSA)" 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, --=20 Bastien