File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -309,6 +309,8 @@ be replaced with content and expanded:
309309 introduced with %[pathname] are expanded this way.
310310 Since this happens after expanding non-interactive
311311 %-escapes, those can be used to fill the expression.
312+ The evaluation happens with Org mode set as major mode
313+ in a temporary buffer.
312314 %<...> The result of `format-time-string' on the ... format
313315 specification.
314316 %t Time stamp, date only. The time stamp is the current
@@ -1572,7 +1574,9 @@ Lisp programs can force the template by setting KEYS to a string."
15721574 " Fill a TEMPLATE and return the filled template as a string.
15731575The template may still contain \" %?\" for cursor positioning.
15741576INITIAL content and/or ANNOTATION may be specified, but will be overridden
1575- by their respective `org-store-link-plist' properties if present."
1577+ by their respective `org-store-link-plist' properties if present.
1578+
1579+ Expansion occurs in a temporary Org mode buffer."
15761580 (let* ((template (or template (org-capture-get :template )))
15771581 (buffer (org-capture-get :buffer ))
15781582 (file (buffer-file-name (or (buffer-base-buffer buffer) buffer)))
@@ -1645,6 +1649,7 @@ by their respective `org-store-link-plist' properties if present."
16451649 (setq buffer-file-name nil )
16461650 (setq mark-active nil )
16471651 (insert template)
1652+ (org-mode )
16481653 (goto-char (point-min ))
16491654 ; ; %[] insert contents of a file.
16501655 (save-excursion
You can’t perform that action at this time.
0 commit comments