diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 9328f333c..9858df045 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -539,6 +539,11 @@ Currently implemented options are: tasks this technically violates the iCalendar spec, but some iCalendar programs support this usage. +*** Capture template expansion now supports ID links + +The capture template expansion element =%K= creates links using +~org-store-link~, which respects the values of ~org-id-link-to-use-id~. + ** New features *** =ob-plantuml.el=: Support tikz file format output diff --git a/lisp/org-capture.el b/lisp/org-capture.el index e482f667f..4bbe2c43a 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1675,11 +1675,8 @@ Expansion occurs in a temporary Org mode buffer." (org-no-properties org-clock-heading) "")) (v-K (if (marker-buffer org-clock-marker) - (org-link-make-string - (format "%s::*%s" - (buffer-file-name (marker-buffer org-clock-marker)) - v-k) - v-k) + (org-with-point-at org-clock-marker + (org-store-link nil nil)) "")) (v-f (or (org-capture-get :original-file-nondirectory) "")) (v-F (or (org-capture-get :original-file) ""))