emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: error in org-remember


From: Nick Dokos
Subject: Re: [Orgmode] Re: error in org-remember
Date: Wed, 16 Sep 2009 11:35:09 -0400

Xin Shi <address@hidden> wrote:

> On Wed, Sep 16, 2009 at 10:43 AM, Xin Shi <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]