Manually insert link when invoking interruption capture template

The provided %K shortcut inserts text links an not id: links.
This commit is contained in:
Daniel - 2022-07-22 18:21:55 +02:00
parent c91a6d36db
commit 46d968d316
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625
2 changed files with 2 additions and 5 deletions

View File

@ -1254,7 +1254,7 @@ respectively."
(file db/org-default-refile-file)
,(concat "* DONE [#B] %^{What}\nCLOSED: %U\n"
":PROPERTIES:\n:CREATED: %U\n:END:\n"
"\nInterrupted %K\n\n%?")
"\nInterrupted %(with-temp-buffer (db/org-add-link-to-current-clock) (buffer-string))\n\n%?")
:clock-in t :clock-resume t :empty-lines-after 1)
("r" "respond"
entry

View File

@ -956,11 +956,8 @@ variables `org-agenda-files' and
(defun db/org-add-link-to-current-clock ()
"Insert link to currently clocked-in item at point.
Error out when not in an Org Mode buffer or when the clock is not
active."
Error out when the clock is not active."
(interactive)
(unless (derived-mode-p 'org-mode)
(user-error "Not in Org Mode, aborting"))
(unless org-clock-marker
(user-error "No clocked-in task, aborting"))
(db/org-insert-link-to-pom org-clock-marker))