Hello,

In the context of capturing a web page using org-protocol, I would like
to use the page title as an argument to a function I use in the capture
(to generate the capture template). Is there a way in elisp to transform
the `%:description' template to its value?

For more context, here is the capture template I use:

        ("D" "Denote web page" plain
         (file denote-last-path)
         (function (lambda ()
                      (let ((denote-use-title "%:description")
                               (denote-use-keywords  '("web"))
                               (denote-use-directory (expand-file-name "notes" 
(denote-directory))))
                           (denote-org-capture))))
         :immediate-finish t
         :kill-buffer t
         :jump-to-captured t)

The problem is that `%:description' is not expanded at the time the
function runs, so the file created by org-denote-capture is called
"description". Its contents are fine, as they are later processed by the
org-capture template expansion, so the title gets correctly set in the
file.

Thanks,

Alan

Attachment: signature.asc
Description: PGP signature

Reply via email to