From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Capture template using variable Date: Thu, 05 May 2016 20:45:00 +0000 Message-ID: References: <2016-05-05T22-34-16@devnull.Karl-Voit.at> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ce3c60d478a05321e6ba0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayQ9U-0005KT-Me for emacs-orgmode@gnu.org; Thu, 05 May 2016 16:45:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayQ9I-0001yA-Uz for emacs-orgmode@gnu.org; Thu, 05 May 2016 16:45:35 -0400 Received: from mail-oi0-x233.google.com ([2607:f8b0:4003:c06::233]:36096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayQ9H-0001qb-OF for emacs-orgmode@gnu.org; Thu, 05 May 2016 16:45:28 -0400 Received: by mail-oi0-x233.google.com with SMTP id x201so116961220oif.3 for ; Thu, 05 May 2016 13:45:13 -0700 (PDT) In-Reply-To: <2016-05-05T22-34-16@devnull.Karl-Voit.at> 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: Karl Voit , emacs-orgmode@gnu.org --001a113ce3c60d478a05321e6ba0 Content-Type: text/plain; charset=UTF-8 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. -- -- Kaushal Modi --001a113ce3c60d478a05321e6ba0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Try

(setq my-capture-template-next= "* NEXT %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n")
(setq org-capture-templates
=C2=A0 =C2=A0 =C2=A0 `( = =C2=A0; Note the backquote here!!
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (&q= uot;1" "first version with string" entry (file+headline &quo= t;~/share/all/org-mode/misc.org" "= ;shorts")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"* NEXT %?\= n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 ("2" "second version with variable&= quot; entry (file+headline "~/share/all/org-mode/misc.org" "shorts")
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0,my-capture-template-next :empty-lines 1) ; and comma befo= re my-capture-..
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ))
<= br>
My guess is you need to evaluate my-capture-template-next bef= ore putting it in org-capture-templates and the backquote/comma above do th= at.
--

--
Kaushal Modi

--001a113ce3c60d478a05321e6ba0--