From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: org-capture templates with file+olp target Date: Mon, 23 Aug 2010 20:54:52 +0200 Message-ID: <871v9ptb0j.wl%dmaus@ictsoc.de> References: <4C71F175.2040809@ccbr.umn.edu> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============0828844801==" Return-path: Received: from [140.186.70.92] (port=36866 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OncBB-0001Fb-Av for Emacs-orgmode@gnu.org; Mon, 23 Aug 2010 14:55:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OncBA-0001yh-6P for Emacs-orgmode@gnu.org; Mon, 23 Aug 2010 14:55:33 -0400 Received: from mysql1.xlhost.de ([213.202.242.106]:46481) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OncBA-0001xi-1e for Emacs-orgmode@gnu.org; Mon, 23 Aug 2010 14:55:32 -0400 In-Reply-To: <4C71F175.2040809@ccbr.umn.edu> 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: Erik Iverson Cc: Emacs-orgmode@gnu.org --===============0828844801== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Mon_Aug_23_20:54:52_2010-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Mon_Aug_23_20:54:52_2010-1 Content-Type: text/plain; charset=US-ASCII Erik Iverson wrote: >I tried to debug, and it looks like that variable is not getting >evaluated for some reason. I'm sure it's obvious to someone, >but is there a way around this? >Hardcoding the path is actually problematic, since my org >files are passed around various machines using git/Dropbox, >and therefore the path is different depending on where I >am located. >Below is the simplest example I could come up with, just >create a ~/test.org file and try it out. > ;; a path to some org-files > (setq org-test-path "/tmp") > ;; a specific org-file > (setq org-test-file (concat org-test-path "/test.org")) > (setq org-capture-templates > '(("t" "Todo" entry (file+headline org-test-file "Tasks") > "* TODO %?\n %i\n %a") > ("b" "Buy" item (file+olp org-test-file "Stuff to Buy" "House") > ""))) The symbol `org-test-file' is indeed not evaluated because the entire template list is quoted. You can use backquotes (Elisp manual, 13.5) to tell Emacs to evaluate parts of the lisp: ,---- | (setq org-capture-templates | `(("t" "Todo" entry (file+headline ,org-test-file "Tasks") | "* TODO %?\n %i\n %a") | ("b" "Buy" item (file+olp ,org-test-file "Stuff to Buy" "House") | ""))) `---- The lisp starts with the backtick (`) and all expressions that are prefix by comma (,) are evaluated. HTH, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Mon_Aug_23_20:54:52_2010-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAkxyw/wACgkQma24O1pEeObY+gD/RD0HgU/idw4xl5Rz3PUa2vv6 h2u39G19bHtlflp57V8A/ikqXzMOSIp6Ig4M/aJKscs422k3WilJ3AhLxLukeYXk =3nBi -----END PGP SIGNATURE----- --pgp-sign-Multipart_Mon_Aug_23_20:54:52_2010-1-- --===============0828844801== 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 --===============0828844801==--