emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Using Variable in Org-capture configuration
@ 2011-03-22 14:25 Chao LU
  2011-03-22 14:48 ` Nick Dokos
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chao LU @ 2011-03-22 14:25 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

Dear all,

Just writing to see if it is possible to use variable in org-capture
configuration, like this

 (setq org-capture-templates
           '(("t" "Todo" entry (file *"~/org/refile.org"*) "* TODO %?\n
%i\n  %a" :prepend t)))
                                              ------------------------
                                                       \---How could I use->
(concat My-Dropbox-Path "refile.org")

Since I put all my files in Dropbox, and the My-Dropbox-Path has different
values under MAC and M$Windows.

Thanks,

Chao

[-- Attachment #2: Type: text/html, Size: 719 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using Variable in Org-capture configuration
  2011-03-22 14:25 Using Variable in Org-capture configuration Chao LU
@ 2011-03-22 14:48 ` Nick Dokos
  2011-03-22 14:49 ` Erik Iverson
  2011-03-22 16:56 ` Carsten Dominik
  2 siblings, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2011-03-22 14:48 UTC (permalink / raw)
  To: Chao LU; +Cc: nicholas.dokos, emacs-orgmode

Chao LU <loochao@gmail.com> wrote:

> Dear all,
> 
> Just writing to see if it is possible to use variable in org-capture configuration, like this
> 
>  (setq org-capture-templates
>            '(("t" "Todo" entry (file "~/org/refile.org") "* TODO %?\n  %i\n  %a" :prepend t)))
>                                               ------------------------
>                                                        \---How could I use-> (concat My-Dropbox-Path
> "refile.org")
> 
> Since I put all my files in Dropbox, and the My-Dropbox-Path has different values under MAC and
> M$Windows.
> 

Search for "backtick" on gmane - see e.g. the following post:

   http://thread.gmane.org/gmane.emacs.orgmode/29163/focus=29180

Nick


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using Variable in Org-capture configuration
  2011-03-22 14:25 Using Variable in Org-capture configuration Chao LU
  2011-03-22 14:48 ` Nick Dokos
@ 2011-03-22 14:49 ` Erik Iverson
  2011-03-22 16:56 ` Carsten Dominik
  2 siblings, 0 replies; 5+ messages in thread
From: Erik Iverson @ 2011-03-22 14:49 UTC (permalink / raw)
  To: Chao LU; +Cc: emacs-orgmode

Chao,

I believe I had the exact same issue, caused the exact same use case, 
i.e., Dropbox.  Read David's answer and see if it helps:

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg29029.html

Chao LU wrote:
> Dear all,
> 
> Just writing to see if it is possible to use variable in org-capture 
> configuration, like this
> 
>  (setq org-capture-templates
>            '(("t" "Todo" entry (file *"~/org/refile.org 
> <http://refile.org>"*) "* TODO %?\n  %i\n  %a" :prepend t)))
>                                               ------------------------
>                                                        \---How could I 
> use-> (concat My-Dropbox-Path "refile.org <http://refile.org>")
> 
> Since I put all my files in Dropbox, and the My-Dropbox-Path has 
> different values under MAC and M$Windows.
> 
> Thanks,
> 
> Chao

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using Variable in Org-capture configuration
  2011-03-22 14:25 Using Variable in Org-capture configuration Chao LU
  2011-03-22 14:48 ` Nick Dokos
  2011-03-22 14:49 ` Erik Iverson
@ 2011-03-22 16:56 ` Carsten Dominik
  2011-03-23 15:57   ` Chao LU
  2 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2011-03-22 16:56 UTC (permalink / raw)
  To: Chao LU; +Cc: emacs-orgmode


On 22.3.2011, at 15:25, Chao LU wrote:

> Dear all,
> 
> Just writing to see if it is possible to use variable in org-capture configuration, like this
> 
>  (setq org-capture-templates
>            '(("t" "Todo" entry (file "~/org/refile.org") "* TODO %?\n  %i\n  %a" :prepend t)))
>                                               ------------------------
>                                                        \---How could I use-> (concat My-Dropbox-Path "refile.org")
> 
> Since I put all my files in Dropbox, and the My-Dropbox-Path has different values under MAC and M$Windows.

Using backquote as the others in this thread say is one possibility.
However, you can also get the latest version of Org - it does
allow a lisp form for the file name:

http://article.gmane.org/gmane.emacs.orgmode/38067/match=form

- Carsten

> 
> Thanks,
> 
> Chao

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using Variable in Org-capture configuration
  2011-03-22 16:56 ` Carsten Dominik
@ 2011-03-23 15:57   ` Chao LU
  0 siblings, 0 replies; 5+ messages in thread
From: Chao LU @ 2011-03-23 15:57 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

Yes, the latest version of org 7.5 works!

Thanks~

Chao

On Tue, Mar 22, 2011 at 12:56 PM, Carsten Dominik <carsten.dominik@gmail.com
> wrote:

>
> On 22.3.2011, at 15:25, Chao LU wrote:
>
> > Dear all,
> >
> > Just writing to see if it is possible to use variable in org-capture
> configuration, like this
> >
> >  (setq org-capture-templates
> >            '(("t" "Todo" entry (file "~/org/refile.org") "* TODO %?\n
>  %i\n  %a" :prepend t)))
> >                                               ------------------------
> >                                                        \---How could I
> use-> (concat My-Dropbox-Path "refile.org")
> >
> > Since I put all my files in Dropbox, and the My-Dropbox-Path has
> different values under MAC and M$Windows.
>
> Using backquote as the others in this thread say is one possibility.
> However, you can also get the latest version of Org - it does
> allow a lisp form for the file name:
>
> http://article.gmane.org/gmane.emacs.orgmode/38067/match=form
>
> - Carsten
>
> >
> > Thanks,
> >
> > Chao
>
>

[-- Attachment #2: Type: text/html, Size: 1711 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-23 15:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 14:25 Using Variable in Org-capture configuration Chao LU
2011-03-22 14:48 ` Nick Dokos
2011-03-22 14:49 ` Erik Iverson
2011-03-22 16:56 ` Carsten Dominik
2011-03-23 15:57   ` Chao LU

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).