mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-12 07:09:55 +00:00
org-capture: use org-eval
* org-capture.el (org-capture-fill-template): Use org-eval.
This commit is contained in:
parent
2c1925f2a5
commit
f73b121549
|
@ -1206,10 +1206,7 @@ The template may still contain \"%?\" for cursor positioning."
|
||||||
(goto-char (match-beginning 0))
|
(goto-char (match-beginning 0))
|
||||||
(let ((template-start (point)))
|
(let ((template-start (point)))
|
||||||
(forward-char 1)
|
(forward-char 1)
|
||||||
(let ((result
|
(let ((result (org-eval (read (current-buffer)))))
|
||||||
(condition-case error
|
|
||||||
(eval (read (current-buffer)))
|
|
||||||
(error (format "%%![Error: %s]" error)))))
|
|
||||||
(delete-region template-start (point))
|
(delete-region template-start (point))
|
||||||
(insert result)))))
|
(insert result)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue