From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Capture template using variable Date: Thu, 5 May 2016 23:11:28 +0200 Message-ID: <2016-05-05T23-08-04@devnull.Karl-Voit.at> References: <2016-05-05T22-34-16@devnull.Karl-Voit.at> Reply-To: Karl Voit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayQZD-0005wD-R4 for emacs-orgmode@gnu.org; Thu, 05 May 2016 17:12:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayQZ2-00071b-3j for emacs-orgmode@gnu.org; Thu, 05 May 2016 17:12:10 -0400 Received: from plane.gmane.org ([80.91.229.3]:51175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayQZ1-0006xx-TK for emacs-orgmode@gnu.org; Thu, 05 May 2016 17:12:04 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ayQYr-0007mA-7K for emacs-orgmode@gnu.org; Thu, 05 May 2016 23:11:53 +0200 Received: from friends.grml.info ([136.243.234.19]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 May 2016 23:11:53 +0200 Received: from news1142 by friends.grml.info with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 May 2016 23:11:53 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi Kaushal! * Kaushal Modi wrote: > > Try > > (setq my-capture-template-next "* NEXT %?\n:PROPERTIES:\n:CREATED: > %U\n:END:\n\n") > > (setq org-capture-templates > `( ; Note the backquote here!! > ("1" "first version with string" entry (file+headline > "~/share/all/org-mode/misc.org" "shorts") > "* NEXT %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1) > ("2" "second version with variable" entry (file+headline > "~/share/all/org-mode/misc.org" "shorts") > ,my-capture-template-next :empty-lines 1) ; and comma before > my-capture-.. > )) > > My guess is you need to evaluate my-capture-template-next before putting it > in org-capture-templates and the backquote/comma above do that. Oh, I see. I'm not that good with Elisp yet. Unfortunately, adding the comma did not make the "Invalid capture template" go away :-( This does not seem to be my (only) issue here... -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github