[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: question about capture templates
From: |
Carsten Dominik |
Subject: |
Re: [Orgmode] Re: question about capture templates |
Date: |
Tue, 22 Feb 2011 10:15:15 +0100 |
On Feb 22, 2011, at 1:39 AM, Filippo A. Salustri wrote:
> Thanks to everyone for the varied and thoughtful responses. I didn't think
> of backquotes, but I know about them from Scheme, and no, they shouldn't work
> in this case.
>
> Very frustrating. org-capture clearly has the original buffer handy (for %a
> stuff) yet I can't get it out of there without hacking the org code, which I
> am loathe to do. Hmmm. I'll think some more. If I come up with anything;
> I'll report it.
I have just implemented that whenever you mean a file name
in capture templates, you can instead give a function, a
variable, or a lisp form. So your original attempt
>> ("m" "Message" entry (file+datetree (buffer-file-name
>> (buffer-base-buffer))) "* MSG @ %U %?\n %a")
should now work.
Hope this helps
- Carsten
>
> Cheers.
> Fil
>
> 2011/2/21 Sébastien Vauban <address@hidden>
> Hi Richard,
>
> Richard Lawrence wrote:
> > Sébastien Vauban <address@hidden> writes:
> >> "Filippo A. Salustri" wrote:
> >>> I would really like to be able to vary the file into which a captured item
> >>> goes. Specifically, I'd like to insert the item into whatever file I was
> >>> visiting when I started the capture.
> >
> >> You have to use backquotes so that expressions are considered as code to
> >> execute, instead of data. See Emacs manual.
> >
> > I'm not sure that backquotes will do what the OP wants. Backquotes will
> > allow the OP to compute the value of a target file at the time the (setq
> > org-capture templates ...) form is evaluated. The OP needs a way to
> > determine the target file at the time of capture (right?), not at the time
> > the variable is set.
>
> You're definitely right. I missed the distinction "at Org launch time" vs "at
> execution time"... Pull my answer off the records ;-)
>
> Best regards,
> Seb
>
> --
> Sébastien Vauban
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> --
> Filippo A. Salustri, Ph.D., P.Eng.
> Mechanical and Industrial Engineering
> Ryerson University
> 350 Victoria St, Toronto, ON
> M5B 2K3, Canada
> Tel: 416/979-5000 ext 7749
> Fax: 416/979-5265
> Email: address@hidden
> http://deseng.ryerson.ca/~fil/
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
- [Orgmode] question about capture templates, Filippo A. Salustri, 2011/02/21
- [Orgmode] Re: question about capture templates, Sébastien Vauban, 2011/02/21
- [Orgmode] Re: question about capture templates, Richard Lawrence, 2011/02/21
- [Orgmode] Re: question about capture templates, Sébastien Vauban, 2011/02/21
- Re: [Orgmode] Re: question about capture templates, Filippo A. Salustri, 2011/02/21
- [Orgmode] Re: question about capture templates, Richard Lawrence, 2011/02/21
- Re: [Orgmode] Re: question about capture templates, Carsten Dominik, 2011/02/22
- [Orgmode] Re: question about capture templates, Richard Lawrence, 2011/02/22
- Re: [Orgmode] Re: question about capture templates, Nick Dokos, 2011/02/22
- Re: [Orgmode] Re: question about capture templates,
Carsten Dominik <=
- Re: [Orgmode] Re: question about capture templates, Bastien, 2011/02/22
- Re: [Orgmode] Re: question about capture templates, Filippo A. Salustri, 2011/02/23
- Re: [Orgmode] Re: question about capture templates, Filippo A. Salustri, 2011/02/23
Re: [Orgmode] question about capture templates, Matthew Sauer, 2011/02/21
Re: [Orgmode] question about capture templates, Matthew Sauer, 2011/02/21