[Top][All Lists]

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

Re: [Orgmode] Capture template and elisp expression

From: Nick Dokos
Subject: Re: [Orgmode] Capture template and elisp expression
Date: Thu, 06 Jan 2011 18:41:16 -0500

Carsten Dominik <address@hidden> wrote:

> > [fn:1] Is there an easier way to get the filename of the file I was
> > visiting when I initiated the capture? If not, should there be?
> > Perhaps
> > a %f escape?
> Hi Nick,
> you can use
>     (buffer-file-name (org-capture-get :original-buffer))
> and we could certainly introduce a special escape for it if helpful.
> If it is easier, we can also put the filename itself into the property
> list,
> and any other information we like.  This should happen in the function
> org-capture,
> close to the location where the buffer is stored, so near this line:
>       (org-capture-put :original-buffer orig-buf :annotation annotation
>                        :initial initial)
> org-capture uses this property list precisely so that it is simple
> to add any information required.
> Note that, after the template has been filled in, it is better
> to access information in the property list with
>   (org-capture-get PROPERTY 'local)
> to avoid conflicts with other ongoing capture processes.
> Hope this helps.

It sure does - thanks!


reply via email to

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