From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Gustav_Wikstr=F6m?= Subject: Org capture templates - file paths Date: Thu, 19 Aug 2010 10:52:38 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1055655699==" Return-path: Received: from [140.186.70.92] (port=43995 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om0ra-0002jC-9B for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 04:52:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om0rY-0000jI-Uw for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 04:52:42 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:55606) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om0rY-0000jD-Sl for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 04:52:40 -0400 Received: by qwk4 with SMTP id 4so1558036qwk.0 for ; Thu, 19 Aug 2010 01:52:40 -0700 (PDT) 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: emacs-orgmode@gnu.org --===============1055655699== Content-Type: multipart/alternative; boundary=0014853c9338eace66048e294d7a --0014853c9338eace66048e294d7a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 '(("n" "Note" entry (file my-gtd-inbox-file) "* %?\n %i\n %a") ("j" "Journal" entry (file+datetree my-gtd-journal-file) "* %?\nEntered on %U\n %i\n %a"))) End code. what I've figured so far is that variables cannot be used in templates... I= s there some workaround for this, or could it possibly be implemented? I need it since i'm on multiple systems where paths to the same files might differ depending on the system in use... Regards Gustav Wikstr=F6m --0014853c9338eace66048e294d7a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello!

I'm having some trouble with org-capture. Cou= ld 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
=A0=A0 =A0 =A0'(("= ;n" "Note" entry (file my-gtd-inbox-file)
&q= uot;* %?\n %i\n %a")
("j" "Journal" entry (file+d= atetree my-gtd-journal-file)
= =A0 =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 need it since i'm on mult= iple systems where paths to the same files might differ depending on the sy= stem in use...

Regards Gustav Wikstr=F6m
--0014853c9338eace66048e294d7a-- --===============1055655699== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1055655699==-- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Magnus Henoch Subject: Re: Org capture templates - file paths Date: Thu, 19 Aug 2010 13:56:20 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=58047 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om3jY-00052S-ET for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 07:56:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om3jX-0003e6-77 for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 07:56:36 -0400 Received: from lo.gmane.org ([80.91.229.12]:47115) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om3jX-0003dh-1l for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 07:56:35 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Om3jU-0007hR-Hd for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 13:56:32 +0200 Received: from c-f893e255.56-4-64736c14.cust.bredbandsbolaget.se ([85.226.147.248]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Aug 2010 13:56:32 +0200 Received: from magnus.henoch by c-f893e255.56-4-64736c14.cust.bredbandsbolaget.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Aug 2010 13:56:32 +0200 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: emacs-orgmode@gnu.org Gustav Wikström writes: > (setq org-capture-templates > '(("n" "Note" entry (file my-gtd-inbox-file) > "* %?\n %i\n %a") > ("j" "Journal" entry (file+datetree my-gtd-journal-file) > "* %?\nEntered on %U\n %i\n %a"))) Backquotes and commas are your friends: (setq org-capture-templates `(("n" "Note" entry (file ,my-gtd-inbox-file) "* %?\n %i\n %a") ("j" "Journal" entry (file+datetree ,my-gtd-journal-file) "* %?\nEntered on %U\n %i\n %a"))) Read more at http://www.gnu.org/s/emacs/manual/html_node/elisp/Backquote.html . Magnus From mboxrd@z Thu Jan 1 00:00:00 1970 From: Puneeth Subject: Re: Re: Org capture templates - file paths Date: Thu, 19 Aug 2010 17:44:29 +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=45331 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om41D-0000xw-Ar for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 08:14:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om41C-0007Ku-8O for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 08:14:51 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:33892) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om41C-0007Kl-4K for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 08:14:50 -0400 Received: by wyg36 with SMTP id 36so2296265wyg.0 for ; Thu, 19 Aug 2010 05:14:49 -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: Magnus Henoch Cc: emacs-orgmode@gnu.org On Thu, Aug 19, 2010 at 5:26 PM, Magnus Henoch wr= ote: > Gustav Wikstr=C3=B6m writes: > >> (setq org-capture-templates >> =C2=A0 =C2=A0 =C2=A0 '(("n" "Note" entry (file my-gtd-inbox-file) >> "* %?\n %i\n %a") >> =C2=A0("j" "Journal" entry (file+datetree my-gtd-journal-file) >> =C2=A0 =C2=A0 =C2=A0"* %?\nEntered on %U\n %i\n %a"))) > > Backquotes and commas are your friends: Thanks! I didn't know this. > > (setq org-capture-templates > =C2=A0 =C2=A0 =C2=A0`(("n" "Note" entry (file ,my-gtd-inbox-file) > "* %?\n %i\n %a") > =C2=A0("j" "Journal" entry (file+datetree ,my-gtd-journal-file) > =C2=A0 =C2=A0 "* %?\nEntered on %U\n %i\n %a"))) > > Read more at > http://www.gnu.org/s/emacs/manual/html_node/elisp/Backquote.html . > > Magnus > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --=20 Puneeth