emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Multiple capture templates in file


From: Subhan Michael Tindall
Subject: Re: [O] Multiple capture templates in file
Date: Tue, 06 Oct 2015 21:01:47 +0000

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 <address@hidden> wrote:
Hi!

"tenspd137 ." <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]