Currently to insert internal org-mode org-id links, I navigate to a heading or pull it up in agenda view (C-a s heading test search RET), store the link with C-l (org-store-link), going back to where I want to insert the link, then insert the link with C-c C-l (org-insert-link).
Instead, I would prefer to map a key that allows me to insert a link at the current point using tab completion similar to org-refile (C-c C-w). The intended result would be an org-id internal link in the form:
[[id:d7534b2f-c221-4dea-8566-d5ce3e4e1b78][Example Link]]
Looking through org-id.el, it seems like org-id-get-with-outline-path-completion was designed for this purpose. I tried:
(global-set-key "\C-ci" (lambda () (interactive) (org-id-get-with-outline-path-completion)))
but it didn't work as intended.
I have the following in my init.el file:
;; Use global IDs
(require 'org-id)
(setq org-id-link-to-org-use-id t)
;; Update ID file .org-id-locations on startup
(org-id-update-id-locations)
;; Refile options
(setq org-refile-targets (quote ((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9))))
(setq org-refile-use-outline-path 'file)
(setq org-outline-path-complete-in-steps t)
(setq org-refile-allow-creating-parent-nodes t)
org-id-get-with outline-path-completion
. Is that the problem?