Allow adding links to Org items also in non-Org-mode buffers

The relevant use-case (for me at least) is to insert links to Org items in the
minibuffer when capturing new items.
This commit is contained in:
Daniel - 2023-05-26 18:08:22 +02:00
parent 113f3f4495
commit f8caaae071
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625
1 changed files with 0 additions and 4 deletions

View File

@ -1537,16 +1537,12 @@ with a file. If ARG is non-nil, include all files in the
variables `org-agenda-files' and
`org-agenda-text-search-extra-files' in this search."
(interactive "P")
(unless (derived-mode-p 'org-mode)
(user-error "Not in Org Mode"))
(db/org-insert-link-to-pom (db/org-get-location arg)))
(defun db/org-add-link-to-current-clock ()
"Insert link to currently clocked-in item at point.
Error out when the clock is not active."
(interactive)
(unless org-clock-marker
(user-error "No clocked-in task, aborting"))
(db/org-insert-link-to-pom org-clock-marker))
(defun db/org-add-link-to-org-clock-select-task ()