From mboxrd@z Thu Jan 1 00:00:00 1970 From: Puneeth Subject: Re: Org capture templates - file paths Date: Thu, 19 Aug 2010 15:06:25 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=36891 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om1YI-0000Gb-U8 for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 05:36:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om1YE-0006g0-R8 for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 05:36:50 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:45035) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om1YE-0006fr-Mw for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 05:36:46 -0400 Received: by ewy28 with SMTP id 28so1128743ewy.0 for ; Thu, 19 Aug 2010 02:36:45 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?UTF-8?Q?Gustav_Wikstr=C3=B6m?= Cc: emacs-orgmode@gnu.org 2010/8/19 Gustav Wikstr=C3=B6m : > Hello! > I'm having some trouble with org-capture. Could someone explain to me why > the following is not working? (And what to do to get it to work..) > Code: > (defvar my-gtd-inbox-file (concat my-gtd-root "inbox.org")) > ;;; Capture templates > (setq org-capture-templates > =C2=A0=C2=A0 =C2=A0 =C2=A0'(("n" "Note" entry (file my-gtd-inbox-file) > "* %?\n %i\n %a") > ("j" "Journal" entry (file+datetree my-gtd-journal-file) > =C2=A0 =C2=A0 "* %?\nEntered on %U\n %i\n %a"))) > End code. > what I've figured so far is that variables cannot be used in templates...= Is > there some workaround for this, or could it possibly be implemented? I ne= ed > it since i'm on multiple systems where paths to the same files might diff= er > depending on the system in use... >From what I understand from the docs (I didn't look at the code), variables cannot be used. One way to work around this problem is to use the org-directory variable. (setq org-directory "~/life-in-plain-text/") Then, you need not specify the path in the capture templates. You can just specify the file name (inbox.org) HTH, Puneeth