Hello,

Thanks for your patch. Here are a few comments about it.

Ryo TAKAISHI <ryo.takaish...@gmail.com> writes:

> * lisp/org-capture.el: If %(SEXP) has %:keyword, expand it using 
> org-store-link-plist.
>
> I want to expand %:description keyword in sexp "%(func %:description)".
> But if org-capture template is "%(function %:keyword)", function take a 
> symbol %:keyword, it does'nt expand.
> This patch expand %:keyword within %(SEXP), so funcsion is taken %:keyword's 
> value.
> For example, when capture template is "%(func %:description)" and
> a keyword :description is "foobar", func is taken string "foobar".

I'm not sure to understand why this patch is necessary. Can't you use
(plist-get org-store-link-plist :description) from your sexp instead?

> +     (let* ((sexp (mapcar '(lambda (attr)

lambdas are self-quoting: do not explicitly quote them.

> +                                    (key (if (string-match "%\\(:.*\\)" 
> attr-symbol)
> +                                             (intern (match-string 1 
> attr-symbol))
> +                                           nil)))

    (key (and (string-match "%\\(:.*\\)" attr-symbol)
              (intern (match-string 1 attr-symbol))))

is better.


Regards,

-- 
Nicolas Goaziou

Reply via email to