Manually insert link when invoking interruption capture template
The provided %K shortcut inserts text links an not id: links.
This commit is contained in:
parent
c91a6d36db
commit
46d968d316
2
init.el
2
init.el
|
@ -1254,7 +1254,7 @@ respectively."
|
||||||
(file db/org-default-refile-file)
|
(file db/org-default-refile-file)
|
||||||
,(concat "* DONE [#B] %^{What}\nCLOSED: %U\n"
|
,(concat "* DONE [#B] %^{What}\nCLOSED: %U\n"
|
||||||
":PROPERTIES:\n:CREATED: %U\n:END:\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)
|
:clock-in t :clock-resume t :empty-lines-after 1)
|
||||||
("r" "respond"
|
("r" "respond"
|
||||||
entry
|
entry
|
||||||
|
|
|
@ -956,11 +956,8 @@ variables `org-agenda-files' and
|
||||||
|
|
||||||
(defun db/org-add-link-to-current-clock ()
|
(defun db/org-add-link-to-current-clock ()
|
||||||
"Insert link to currently clocked-in item at point.
|
"Insert link to currently clocked-in item at point.
|
||||||
Error out when not in an Org Mode buffer or when the clock is not
|
Error out when the clock is not active."
|
||||||
active."
|
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless (derived-mode-p 'org-mode)
|
|
||||||
(user-error "Not in Org Mode, aborting"))
|
|
||||||
(unless org-clock-marker
|
(unless org-clock-marker
|
||||||
(user-error "No clocked-in task, aborting"))
|
(user-error "No clocked-in task, aborting"))
|
||||||
(db/org-insert-link-to-pom org-clock-marker))
|
(db/org-insert-link-to-pom org-clock-marker))
|
||||||
|
|
Loading…
Reference in New Issue