From 4a133f0c5a7fef18ea1dfb38e2e1539da1db834e Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Sun, 15 Aug 2021 12:48:00 -0400 Subject: [PATCH] org-capture.el: Upgrade file+headline template target syntax * lisp/org-capture.el (org-capture-upgrade-templates): Upgrade templates which utilize file+headline target syntax to file+heading --- lisp/org-capture.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 831c3e1f4..28b3e33f4 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -109,7 +109,8 @@ "Update the template list to the new format. TEMPLATES is a template list, as in `org-capture-templates'. The new format unifies all the date/week tree targets into one that -also allows for an optional outline path to specify a target." +also allows for an optional outline path to specify a target. +It also accounts for renaming `headline` to `heading`." (let ((modified-templates (mapcar (lambda (entry) @@ -128,6 +129,9 @@ also allows for an optional outline path to specify a target." (`(,key ,desc ,type (file+weektree+prompt . ,path) ,tpl . ,props) `(,key ,desc ,type (file+olp+datetree ,@path) ,tpl :tree-type week :time-prompt t ,@props)) + ;; Rename "headline" to "heading" + (`(,key ,desc ,type (file+headline . ,file+heading) ,tpl . ,props) + `(,key ,desc ,type (file+heading ,@file+heading) ,tpl ,@props)) ;; Other templates are left unchanged. (_ entry))) templates))) -- 2.32.0