From e757dd6e1af2b69f6173ce98abd8a0a921cb8e46 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Tue, 18 Nov 2025 20:09:03 +0100 Subject: [PATCH] Use builtin key in Org capture template to insert link to clock Seems more robust and is definitively more readable. --- init.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/init.el b/init.el index 4db1fe0..635f7e0 100644 --- a/init.el +++ b/init.el @@ -720,8 +720,6 @@ split horizontally again, but this extra work should not matter much." db/org-insert-checklist db/org-copy-body-from-item-to-point db/org-find-links-to-current-item - db/org-add-link-to-other-item - db/org-add-link-to-current-clock hydra-org-linking/body db/org-clock-goto-first-open-checkbox) :autoload (db/check-special-org-files-in-agenda @@ -1363,7 +1361,7 @@ accordingly." (file db/org-default-refile-file) ,(concat "* TODO [#B] %^{What}\n" ":PROPERTIES:\n:CREATED: %U\n:END:\n" - "\nVia %(with-temp-buffer (db/org-add-link-to-current-clock) (string-trim (buffer-string)))." + "\nVia %K." "%?") :empty-lines-before 1 :empty-lines-after 1) @@ -1392,7 +1390,7 @@ accordingly." entry (file db/org-default-refile-file) ,(concat "* GOTO [#B] %^{What} :DATE:\n%^{When}t\n" - "\nVia %(with-temp-buffer (db/org-add-link-to-current-clock) (string-trim (buffer-string))).\n" + "\nVia %K.\n" "%?") :empty-lines-before 1 :empty-lines-after 1) @@ -1401,7 +1399,7 @@ accordingly." (file db/org-default-refile-file) ,(concat "* DONE [#B] %^{What}\nCLOSED: %U\n" ":PROPERTIES:\n:CREATED: %U\n:END:\n" - "\nInterrupted %(with-temp-buffer (db/org-add-link-to-current-clock) (string-trim (buffer-string)))." + "\nInterrupted %K." "%?") :clock-in t :clock-resume t @@ -1410,7 +1408,7 @@ accordingly." ("q" "Quick note" plain (function db/goto-quick-notes) - "- [ ] %?" + "- [ ] %?\n\n Via %K" :empty-lines-before 1 :empty-lines-after 1))))