Function: org-id--get-id-to-store-link

org-id--get-id-to-store-link is a byte-compiled function defined in org-id.el.gz.

Signature

(org-id--get-id-to-store-link &optional CREATE)

Documentation

Get or create the relevant ID for storing a link.

Optional argument CREATE is passed to org-id-get.

Inherited IDs are only considered when org-id-link-consider-parent-id, org-id-link-use-context and org-link-context-for-files are all enabled, since inherited IDs are confusing without the additional search string context.

Note that this function resets the org-entry-property-inherited-from marker: it will either point to nil (if the id was not inherited) or to the point it was inherited from.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-id.el.gz
;; id link type

(defun org-id--get-id-to-store-link (&optional create)
  "Get or create the relevant ID for storing a link.

Optional argument CREATE is passed to `org-id-get'.

Inherited IDs are only considered when
`org-id-link-consider-parent-id', `org-id-link-use-context' and
`org-link-context-for-files' are all enabled, since inherited IDs
are confusing without the additional search string context.

Note that this function resets the
`org-entry-property-inherited-from' marker: it will either point
to nil (if the id was not inherited) or to the point it was
inherited from."
  (let* ((inherit-id (and org-id-link-consider-parent-id
                          org-id-link-use-context
                          org-link-context-for-files)))
    (move-marker org-entry-property-inherited-from nil)
    (org-id-get nil create nil inherit-id)))