From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: using (id "Name") target in org-capture-templates Date: Sun, 06 Mar 2011 18:08:24 +0100 Message-ID: <87tyfgp46v.fsf@altern.org> References: <20110228040226.9CDE5EADE@mx.altern.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=59954 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwHSN-0002aY-3r for Emacs-orgmode@gnu.org; Sun, 06 Mar 2011 12:09:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwHRm-00056j-8T for Emacs-orgmode@gnu.org; Sun, 06 Mar 2011 12:08:47 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:50001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwHRm-00055Y-3x for Emacs-orgmode@gnu.org; Sun, 06 Mar 2011 12:08:46 -0500 Received: by wwj40 with SMTP id 40so3697746wwj.30 for ; Sun, 06 Mar 2011 09:08:40 -0800 (PST) In-Reply-To: <20110228040226.9CDE5EADE@mx.altern.org> (Gregory Sullivan's message of "Sun, 27 Feb 2011 20:38:00 -0500") 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: "Sullivan, Gregory (US SSA)" Cc: "Emacs-orgmode@gnu.org" 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, -- Bastien