From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subhan Michael Tindall Subject: Re: Multiple capture templates in file Date: Tue, 06 Oct 2015 21:01:47 +0000 Message-ID: References: <841td7ravo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11401a6cc5ea7e052175f084 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjZN2-0000rx-PD for emacs-orgmode@gnu.org; Tue, 06 Oct 2015 17:02:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjZN1-00027W-DR for emacs-orgmode@gnu.org; Tue, 06 Oct 2015 17:02:00 -0400 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:36845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjZN1-000272-1S for emacs-orgmode@gnu.org; Tue, 06 Oct 2015 17:01:59 -0400 Received: by lbcao8 with SMTP id ao8so83791083lbc.3 for ; Tue, 06 Oct 2015 14:01:58 -0700 (PDT) In-Reply-To: <841td7ravo.fsf@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marco Wahl , emacs-orgmode@gnu.org --001a11401a6cc5ea7e052175f084 Content-Type: text/plain; charset=UTF-8 add-to-list works fine for me, like this: (taken straight of my emacs.org file) #+BEGIN_SRC emacs-lisp (add-to-list 'org-capture-templates '("J" "log job or activity to date tree for UE application" (file+datetree "~/Dropbox/orgzly/ jobs.org") "* %^{Company or activity} %^{Job} - Direct Contact:%^{y/n} - Resume submitted:%^{y/n} - Result:%^{[h]ired/[n]ot hired/[i]nterview} %?" :prepend t :immediate-finish) ) #+END_SRC On Tue, Oct 6, 2015 at 1:38 PM Marco Wahl wrote: > Hi! > > "tenspd137 ." writes: > > > I am trying to figure out how to store multiple capture templates in a > > file, have several files of related templates, and then load all the > > files stored in a directory. For example, lets say I have two > > projects at work WorkProject1 and WorkProject2. Then I have two files > > in a directory org-templates called WorkProj1Templates.el and > > WorkTemplates2.el. How can I append the templates in these files to > > or capture templates? In my main .emacs, I have: > > > > (setq org-capture-templates > > '(("t" "Todo" entry (file+headline (concat org-directory > > "/default.org") "Tasks") > > "* TODO %?") > > ("j" "Journal" entry (file+datetree (concat org-directory > > "/journal.org")) > > "* %?\nEntered on %U\n"))) > > > > I would like to then load the template files in org-templates. That > > way, when a project ends, I can just yank the templates. I have > > experimentally tried using add-to-list with org-capture-templates > > without success. Either that can't be done or my syntax was wrong? > > How could anyone tell if you don't show your attempt? > > > Does anyone have any ideas? > > What about this? > > WorkProj1Templates.el: > > #v+ > (push '("1" "Todo" entry > (file+headline > (concat org-directory "/WorkProj1.org") > "Tasks") > "* TODO %?") > org-capture-templates) > #v- > > -- > Marco Wahl > GPG: 0x49010A040A3AE6F2 > > > --001a11401a6cc5ea7e052175f084 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
add-to-list works fine for me, like this: (taken straight = of my emacs.org file)
#+BEGIN_SRC emac= s-lisp
=C2=A0(add-to-list 'org-capture-templates '(&= quot;J" "log job or activity to date tree for UE application"= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(file+datetree "~/Dropbox/orgzly/jobs.org")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0"* %^{Company or activity} %^{Job}
= =C2=A0 - Direct Contact:%^{y/n}
=C2=A0 - Resume submitted:%^{y/n}=
=C2=A0 - Result:%^{[h]ired/[n]ot hired/[i]nterview}
= =C2=A0 %?"
=C2=A0 :prepend t :immediate-finish)
= =C2=A0 )
#+END_SRC

On Tue, Oct 6, 2015 at 1:38 PM Marco Wahl <marcowahlsoft@gmail.com> wrote:
=
Hi!

"tenspd137 ." <dcday137@gmail.com> writes:

> I am trying to figure out how to store multiple capture templates in a=
> file, have several files of related templates, and then load all the > files stored in a directory.=C2=A0 For example, lets say I have two > projects at work WorkProject1 and WorkProject2.=C2=A0 Then I have two = files
> in a directory org-templates called WorkProj1Templates.el and
> WorkTemplates2.el.=C2=A0 How can I append the templates in these files= to
> or capture templates?=C2=A0 In my main .emacs, I have:
>
> (setq org-capture-templates
>=C2=A0 =C2=A0 =C2=A0 =C2=A0'(("t" "Todo" entry = (file+headline (concat org-directory
> "/default.org") "Tasks")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "* TODO %?")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("j" "Journal" en= try (file+datetree (concat org-directory
> "/journal.org"))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "* %?\nEntered on %U\n")))=
>
> I would like to then load the template files in org-templates.=C2=A0 T= hat
> way, when a project ends, I can just yank the templates.=C2=A0 I have<= br> > experimentally tried using add-to-list with org-capture-templates
> without success.=C2=A0 Either that can't be done or my syntax was = wrong?

How could anyone tell if you don't show your attempt?

> Does anyone have any ideas?

What about this?

WorkProj1Templates.el:

#v+
(push '("1" "Todo" entry
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (file+headline
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(concat org-directory "/WorkProj1.or= g")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"Tasks")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "* TODO %?")
=C2=A0 =C2=A0 =C2=A0 org-capture-templates)
#v-

--
Marco Wahl
GPG: 0x49010A040A3AE6F2


--001a11401a6cc5ea7e052175f084--