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:27:28 +0200 Message-ID: <2016-05-05T23-26-42@devnull.Karl-Voit.at> References: <2016-05-05T22-34-16@devnull.Karl-Voit.at> <2016-05-05T23-08-04@devnull.Karl-Voit.at> Reply-To: Karl Voit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayQoc-00017b-3o for emacs-orgmode@gnu.org; Thu, 05 May 2016 17:28:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayQoQ-00056w-5A for emacs-orgmode@gnu.org; Thu, 05 May 2016 17:28:04 -0400 Received: from plane.gmane.org ([80.91.229.3]:51932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayQoP-000524-W5 for emacs-orgmode@gnu.org; Thu, 05 May 2016 17:27:58 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ayQoF-0002B2-DK for emacs-orgmode@gnu.org; Thu, 05 May 2016 23:27:47 +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:27:42 +0200 Received: from news1142 by friends.grml.info with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 May 2016 23:27:42 +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 * Karl Voit wrote: > 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. > > Unfortunately, adding the comma did not make the "Invalid capture > template" go away :-( This does not seem to be my (only) issue here... I missed, that you replaced the single quote with a back quote. With it, it works like charm. Thank you for your help! -- 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