emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Ryo TAKAISHI <ryo.takaishi.0@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Capture: Expand keyword within %(SEXP) in template
Date: Sun, 04 Nov 2012 14:10:33 +0100	[thread overview]
Message-ID: <87vcdlbjjq.fsf@gmail.com> (raw)
In-Reply-To: <87hap5rek7.fsf@gmail.com> (Ryo TAKAISHI's message of "Sun, 04 Nov 2012 16:51:36 +0900")

Ryo TAKAISHI <ryo.takaishi.0@gmail.com> writes:

> I fixed and added document in docstring & org.texi.

Thank you.

> +                  @r{If sexp's attr is link keyword (@code{%:keyword}),}
> +                  @r{it will be expanded using @code{org-store-link-plist}.}

Documentation should not contain a reference to `org-store-link-plist':
it is an internal variable, therefore, it is of no use for the end user.
I suggest something along the lines of:

  Evaluate Elisp SEXP and replace with the results@footnote{For
  convenience, %:keyword (see above) placeholders within the expression
  will be expanded.}. The sexp must return a string.

>    %(sexp)     Evaluate elisp `(sexp)' and replace with the result.
> +              If sexp's attr is link keyword (%:keyword), it will
> +              be expanded using `org-store-link-plist`.

Ditto.

Otherwise the code is fine. Would you provide a complete patch, i.e.
with `git format-patch'? The changelog entry may be:

  org-capture: Expand keywords within %(sexp) placeholder in template

  * org-capture.el (org-capture--expand-keyword-in-embedded-elisp): New
    function.
  (org-capture-expand-embedded-elisp): Use new function.


Regards,

  reply	other threads:[~2012-11-04 13:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-02  9:20 [PATCH] Capture: Expand keyword within %(SEXP) in template Ryo TAKAISHI
2012-11-02 11:50 ` Nicolas Goaziou
2012-11-02 13:55   ` Ryo TAKAISHI
2012-11-02 14:11     ` Nicolas Goaziou
2012-11-02 15:36       ` Ryo TAKAISHI
2012-11-03  8:45         ` Nicolas Goaziou
2012-11-04  7:51           ` Ryo TAKAISHI
2012-11-04 13:10             ` Nicolas Goaziou [this message]
2012-11-04 15:05               ` Ryo TAKAISHI
2012-11-05  0:38                 ` Nicolas Goaziou
2012-11-05 12:34                   ` Ryo TAKAISHI
2012-11-05 12:39                     ` 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=87vcdlbjjq.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ryo.takaishi.0@gmail.com \
    /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).