emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Xin Shi <shixin111@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Re: error in org-remember
Date: Wed, 16 Sep 2009 11:35:09 -0400	[thread overview]
Message-ID: <7834.1253115309@alphaville.usa.hp.com> (raw)
In-Reply-To: Message from Xin Shi <shixin111@gmail.com> of "Wed, 16 Sep 2009 11:14:56 EDT." <5236d6f90909160814h37ea3c50tf1fbaa54e3869bc5@mail.gmail.com>

Xin Shi <shixin111@gmail.com> wrote:

> On Wed, Sep 16, 2009 at 10:43 AM, Xin Shi <shixin111@gmail.com> wrote:
> 
> > ...
> > My settings are:
> >
> > (org-remember-insinuate)
> > (setq sx-notes-file-name "~/.notes.org")
> > (setq sx-journal-file-name "~/.journal.org")
> > (setq org-remember-templates
> >       '(
> >         ("Journal" ?j "* %U %?\n\n  %i\n  %a" sx-journal-file-name)
> >         ("Notes" ?n "* %^{Title}\n  %i\n  %a" sx-notes-file-name "Notes")
> >     )
> >       )
> > Any suggestions?
> >
> I solved the problem by using the file name directly:
> 
> (setq org-remember-templates
>       '(
>         ("Journal" ?j "* %U %?\n\n  %i\n  %a" "~/.journal.org")
>         ("Notes" ?n "* %^{Title}\n  %i\n  %a" "~/.notes.org" "Notes")
>     )
>       )

Alternatively, you can use the backquote mechanism in such situations - it
allows you to evaluate parts of a (back)quoted expression, by preceding them
with commas:

(setq sx-notes-file-name "~/.notes.org")
(setq sx-journal-file-name "~/.journal.org")
(setq org-remember-templates
      `(
        ("Journal" ?j "* %U %?\n\n  %i\n  %a" ,sx-journal-file-name)
        ("Notes" ?n "* %^{Title}\n  %i\n  %a" ,sx-notes-file-name "Notes")
       ))

See

  http://www.gnu.org/software/emacs/manual/html_node/elisp/Backquote.html#Backquote

for details.

HTH,
Nick

  reply	other threads:[~2009-09-16 15:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16 14:43 error in org-remember Xin Shi
2009-09-16 15:14 ` Xin Shi
2009-09-16 15:35   ` Nick Dokos [this message]
2009-09-18 13:17 ` problem with org-remember invoked from agenda view Eric S Fraga
2009-09-18 15:05   ` Carsten Dominik
2009-09-18 15:12     ` Eric S Fraga
2009-09-18 17:01       ` Bernt Hansen

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=7834.1253115309@alphaville.usa.hp.com \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=shixin111@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).