emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Puneeth <punchagan@gmail.com>
To: "Gustav Wikström" <gustav.erik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Org capture templates - file paths
Date: Thu, 19 Aug 2010 15:06:25 +0530	[thread overview]
Message-ID: <AANLkTikx1WwZHr3DXPLacNaXHwTQyC5vMTYaSxidUPyD@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=2G9yp3p-JwOadysQRxMh4eymeGOxBrasGhdET@mail.gmail.com>

2010/8/19 Gustav Wikström <gustav.erik@gmail.com>:
> 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... Is
> 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...

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

  reply	other threads:[~2010-08-19  9:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19  8:52 Org capture templates - file paths Gustav Wikström
2010-08-19  9:36 ` Puneeth [this message]
2010-08-19 11:56 ` Magnus Henoch
2010-08-19 12:14   ` Puneeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikx1WwZHr3DXPLacNaXHwTQyC5vMTYaSxidUPyD@mail.gmail.com \
    --to=punchagan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=gustav.erik@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).