mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-04 11:40:40 +00:00
Capture: Expand template file name
This commit is contained in:
parent
75192f263e
commit
c80d5b9c27
@ -659,13 +659,14 @@ already gone."
|
||||
(let* ((txt (org-capture-get :template))
|
||||
(reversed (org-capture-get :prepend))
|
||||
(target-entry-p (org-capture-get :target-entry-p))
|
||||
level beg end)
|
||||
level beg end file)
|
||||
|
||||
;; Get the full template
|
||||
(cond
|
||||
((and (listp txt) (eq (car txt) 'file))
|
||||
(if (file-exists-p (nth 1 txt))
|
||||
(setq txt (org-file-contents (nth 1 txt)))
|
||||
(if (file-exists-p
|
||||
(setq file (expand-file-name (nth 1 txt) org-directory)))
|
||||
(setq txt (org-file-contents file))
|
||||
(setq txt (format "Template file %s not found" (nth 1 txt)))))
|
||||
((and (listp txt) (eq (car txt) 'function))
|
||||
(if (fboundp (nth 1 txt))
|
||||
|
Loading…
Reference in New Issue
Block a user