emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matthew Lundin <mdl@imapmail.org>
To: Nathan Neff <nathan.neff@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Use variable filename for remember template?
Date: Mon, 06 Jul 2009 19:35:41 -0500	[thread overview]
Message-ID: <87y6r1qqhu.fsf@fastmail.fm> (raw)
In-Reply-To: <211769420907061527x410f47f6n7370768c24fc5ebb@mail.gmail.com> (Nathan Neff's message of "Mon, 6 Jul 2009 17:27:19 -0500")

Nathan Neff <nathan.neff@gmail.com> writes:

> Hello,
>
> I am able to successfully read the contents of
> "/Users/nate/personal/booktemp.txt" into a new remember-note.
>
> (setq org-remember-templates
>      '(("Book" ?b "\n* %^{Book Title} %t :READING:
> \n%[/Users/nate/personal/booktemp.txt]\n"
>               "L:journal.org")
>       ))
>
> Now, I'd like to be able to specify an environment variable like $HOME
> instead of /Users/nate.
>
> I'm a lisp beginner, and have tried something like
>
> (setq personal-home-dir (getenv "HOME"))
>
> (setq org-remember-templates
>      '(("Book" ?b (concat "\n* %^{Book Title} %t :READING: \n%["
> personal-home-dir "/personal/booktemp.txt]\n")
>               "L:journal.org")
>       ))
>
> but I keep getting "Wrong type argument char-or-string-p" errors.

How about the following?

--8<---------------cut here---------------start------------->8---
 (setq org-remember-templates
      '(("Book" ?b "\n* %^{Book Title} %t :READING:
 \n%[~/personal/booktemp.txt]\n"
               "L:journal.org")
       ))
--8<---------------cut here---------------end--------------->8---

Best,
Matt

  reply	other threads:[~2009-07-07  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06 22:27 Use variable filename for remember template? Nathan Neff
2009-07-07  0:35 ` Matthew Lundin [this message]
2009-07-07  2:42 ` Nick Dokos

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=87y6r1qqhu.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=nathan.neff@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).