From mboxrd@z Thu Jan 1 00:00:00 1970 From: "tenspd137 ." Subject: Re: Multiple capture templates in file Date: Tue, 6 Oct 2015 15:15:37 -0600 Message-ID: References: <841td7ravo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjZaF-0007cW-50 for emacs-orgmode@gnu.org; Tue, 06 Oct 2015 17:15:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjZaE-00034K-A0 for emacs-orgmode@gnu.org; Tue, 06 Oct 2015 17:15:39 -0400 Received: from mail-ig0-x234.google.com ([2607:f8b0:4001:c05::234]:32845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjZaE-00033x-1n for emacs-orgmode@gnu.org; Tue, 06 Oct 2015 17:15:38 -0400 Received: by igbkq10 with SMTP id kq10so97346943igb.0 for ; Tue, 06 Oct 2015 14:15:37 -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 Cc: emacs-orgmode@gnu.org Marco - Thanks for the reply. "How could anyone tell if you don't show your attempt?" - Good point. Wasn't thinking there. First I will try what you have suggested since you were kind enough to create the code, and if I can't get that working, I'll show what I tried and also go back and re-create what I was trying with add-to-list. I am new to Lisp and Elisp, but I think your function is saying push an association list (which is the template) to the variable org-capture-templates. Please forgive my apparent slowness :) On Tue, Oct 6, 2015 at 2: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 > >