From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Capture: Expand keyword within %(SEXP) in template Date: Sun, 04 Nov 2012 14:10:33 +0100 Message-ID: <87vcdlbjjq.fsf@gmail.com> References: <1351848001-11636-1-git-send-email-ryo.takaishi.0@gmail.com> <87ip9oi5qt.fsf@gmail.com> <878vak9kib.fsf@gmail.com> <87a9v0hz7j.fsf@gmail.com> <87lieknhjy.fsf@gmail.com> <87sj8rgjn6.fsf@gmail.com> <87hap5rek7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TV02H-00054h-Hp for emacs-orgmode@gnu.org; Sun, 04 Nov 2012 08:14:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TV02G-0002Gy-HS for emacs-orgmode@gnu.org; Sun, 04 Nov 2012 08:14:45 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:59348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TV02G-0002Gp-A2 for emacs-orgmode@gnu.org; Sun, 04 Nov 2012 08:14:44 -0500 Received: by mail-wi0-f171.google.com with SMTP id hj13so1732981wib.12 for ; Sun, 04 Nov 2012 05:14:43 -0800 (PST) In-Reply-To: <87hap5rek7.fsf@gmail.com> (Ryo TAKAISHI's message of "Sun, 04 Nov 2012 16:51:36 +0900") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ryo TAKAISHI Cc: emacs-orgmode@gnu.org Ryo TAKAISHI 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,