Add simple helper function to find items linking to the current one
Only ID links are supported by now.master
parent
b1d82f875f
commit
a6f77f8d71
3
init.el
3
init.el
|
@ -715,7 +715,8 @@
|
|||
db/find-csv-in-org
|
||||
db/org-mark-current-default-task
|
||||
db/export-diary
|
||||
db/org-copy-template-for-periodic-task))
|
||||
db/org-copy-template-for-periodic-task
|
||||
db/org-find-items-linking-to-id))
|
||||
|
||||
(use-package org
|
||||
:pin "gnu"
|
||||
|
|
|
@ -592,6 +592,20 @@ This is done only if the value of this variable is not null."
|
|||
(org-icalendar-combine-agenda-files)
|
||||
(message "Exporting diary ... done.")))))))
|
||||
|
||||
|
||||
;;; Find items by link to current headline
|
||||
|
||||
(defun db/org-find-items-linking-to-id (&optional id)
|
||||
"List all Org Mode items that link to ID.
|
||||
Uses `org-search-view' to conduct the actual search. ID must be
|
||||
a UUID as generated by, e.g., `org-id-get-create'. If ID is not
|
||||
given, use the ID of the current item, if in Org Mode."
|
||||
(interactive (list (when (derived-mode-p 'org-mode)
|
||||
(org-id-get))))
|
||||
(if id
|
||||
(org-search-view nil (format "[id:%s]" id))
|
||||
(user-error "No ID given and not in Org Mode.")))
|
||||
|
||||
|
||||
;;; End
|
||||
|
||||
|
|
Loading…
Reference in New Issue