Function: org-id-description
org-id-description is a byte-compiled function defined in
org-id.el.gz.
Signature
(org-id-description LINK DESC)
Documentation
Return a description for an ID link, derived from the linked headline.
Calling convention is similar to org-link-make-description-function.
DESC has higher priority and is returned if it is both non-nil and
non-empty. Otherwise, if the passed LINK is an ID link and can be
resolved to an existing headline, the target headline is returned. If
all else fails, DESC is returned as-is.
TODO keywords, tags, and priorities are stripped from the description.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-id.el.gz
(defun org-id-description (link desc)
"Return a description for an ID link, derived from the linked headline.
Calling convention is similar to `org-link-make-description-function'.
DESC has higher priority and is returned if it is both non-nil and
non-empty. Otherwise, if the passed LINK is an ID link and can be
resolved to an existing headline, the target headline is returned. If
all else fails, DESC is returned as-is.
TODO keywords, tags, and priorities are stripped from the description."
(or (org-string-nw-p desc)
(when-let* ((loc (org-id-find (string-remove-prefix "id:" link))))
(org-with-file-buffer (car loc)
(org-with-wide-buffer
(goto-char (cdr loc))
(org-link-display-format
(org-get-heading t t t t)))))
desc))