Suppose you want to write the parent directory name in your capture so write a
template like

"* %(file-name-nondirectory (directory-file-name (file-name-directory \"%F\")))"

Without the patch, file-name-directory get the useless string "%F"
instead of a string
with the full path name of the file.

The orgmode manual template expansion page describe

     %(sexp)     Evaluate Elisp sexp and replace with the result.
                       For convenience, %:keyword (see below) placeholders
                       within the expression will be expanded prior to this.
                       The sexp must return a string.

But without the patch is not true, first is expanded %(sexp) and after
that the %OneLetter and later the %:keyword

Thanks for your work at the awesome orgmode.


2014-10-30 16:48 GMT+01:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:
> Hello,
>
> Roberto Huelga <rhue...@gmail.com> writes:
>
>> Patch proposal fro org-capture-fill-template
>
> Thanks for your patch. However, I'd like to know your motivation for it
> as I fail to see how it is superior to the current design.
>
>
> Regards,
>
> --
> Nicolas Goaziou

Reply via email to