emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Roberto Huelga <rhuelga@gmail.com>
To: Roberto Huelga <rhuelga@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Patch org-capure-fill-template
Date: Thu, 30 Oct 2014 17:21:57 +0100	[thread overview]
Message-ID: <CAPJ+JL29XyiG5OHssSPDr_0Lr1+fp52b4TDfqMFexb9AtZRgqA@mail.gmail.com> (raw)
In-Reply-To: <8761f1eeya.fsf@nicolasgoaziou.fr>

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 <mail@nicolasgoaziou.fr>:
> Hello,
>
> Roberto Huelga <rhuelga@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	other threads:[~2014-10-31 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 17:46 Patch org-capure-fill-template Roberto Huelga
2014-10-30 15:48 ` Nicolas Goaziou
2014-10-30 16:21   ` Roberto Huelga [this message]
2014-11-02  9:44     ` Nicolas Goaziou
2014-11-02 19:59       ` Roberto Huelga
2014-11-02 21:41         ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPJ+JL29XyiG5OHssSPDr_0Lr1+fp52b4TDfqMFexb9AtZRgqA@mail.gmail.com \
    --to=rhuelga@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).