summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Huelga Díaz <rhuelga@gmail.com>2014-10-29 18:29:11 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2014-11-02 10:40:31 +0100
commitcdb0a962bc346826bd9609af07c66bbe98cef3bd (patch)
tree94c6f80d4976f1c3c622dc301875548317496c67
parente975eac4ce3051d234aed27935b490cee6b22647 (diff)
downloadorg-mode-cdb0a962bc346826bd9609af07c66bbe98cef3bd.tar.gz
org-capture.el: Fix expand template order
* lisp/org-capture.el (org-capture-fill-template): Expand %(sexp) after %:keywords, per documentation about capture templates expansion. When a template is expanded first the simple %-escapes, %:keywords and after that the %(sexp). TINYCHANGE
-rw-r--r--lisp/org-capture.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index c708683..88d7ee5 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1602,8 +1602,6 @@ The template may still contain \"%?\" for cursor positioning."
(insert-file-contents filename)
(error (insert (format "%%![Couldn't insert %s: %s]"
filename error)))))))
- ;; %() embedded elisp
- (org-capture-expand-embedded-elisp)
;; The current time
(goto-char (point-min))
@@ -1633,6 +1631,10 @@ The template may still contain \"%?\" for cursor positioning."
(intern (match-string 1))) ""))
(replace-match x t t)))))
+ ;; %() embedded elisp
+ (goto-char (point-min))
+ (org-capture-expand-embedded-elisp)
+
;; Turn on org-mode in temp buffer, set local variables
;; This is to support completion in interactive prompts
(let ((org-inhibit-startup t)) (org-mode))