I've cleaned it up and turned it into a patch. It now correctly handles
(ignores) buffers without associated file names (which don't work with IDs).
>From 1861637d7b05f2e7ac11edf89f6939145c7be091 Mon Sep 17 00:00:00 2001
From: Steven Allen
Date: Wed, 27 Aug 2025 09:05:08 -0700
Subject: [PATCH] o
Rodolf,
Thanks for the feedback! Here's a fixed version:
(org-link-set-parameters
"id"
:complete
(lambda (&optional _prefix)
(unless org-id-locations (org-id-locations-load))
(when-let* ((id (org-id-get-with-outline-path-completion
'((nil
Rudolf Adamkovič writes:
> (2) [...]
I found yet-another bug:
(3) When my `notes.org' file is narrowed to a subtree with `C-x n s', ID
links inserted with your completion are given incorrect descriptions.
Rudy
--
"'Contrariwise,' continued Tweedledee, 'if it was so, it might be; and
if it wer
Steven Allen writes:
> If there's any interest, I'm happy to clean this up and submit a patch
> but I figured I'd ask first.
+1 This feature is long overdue. :)
That said, I tried your code, with a single large Org file, called
`notes.org', and would like to suggest two improvements:
(1) With
Samuel Wales writes:
> fyi, the behavior with your form for me is identical to the behavior without
> it.
Ah, sorry, I should have explained how it works:
1. C-c C-l (org-insert-link).
2. At the completion prompt, type "id:" followed by RET.
3. Pick from one of the provided links via completio
fyi, the behavior with your form for me is identical to the behavior without it.
for me, the completions in both cases show
1) an org id
- useless to me, because i think in terms of headings
2) followed by attachment:, eww:, rmail:, and a bunch of other prefixes
- useless to me because i nev
I use the following snippet to quickly link to headings by ID with
via org-insert-link. If there's any interest, I'm happy to clean this
up and submit a patch but I figured I'd ask first.
(org-link-set-parameters
"id"
:complete
(lambda (&optional _prefix)
(unless org-id-locat