[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Adding target and custom id links doesn't ask for description
From: |
Carlos Pita |
Subject: |
Adding target and custom id links doesn't ask for description |
Date: |
Tue, 2 Aug 2022 14:44:58 -0300 |
Hi all,
When storing a <<target>> or CUSTOM_ID link with org-store-link and then adding
it with C-c C-l, org doesn’t ask for a description but automatically inserts an
ugly description like:
~/Desktop/Org/captures.org::target
or:
~/Desktop/Org/captures.org::#7EFBCEA1-0D17-45B9-A125-10FE581752F8
The entire path is inserted even when the target itself is simply “target”.
But, more importantly, no chance to change the description is given to the user.
This behavior is not observed when an ID link is stored, which seems pretty
inconsistent since there is no clear difference wrt the CUSTOM_ID case.
The inconvenience of this behavior and the inconsistent treatment of ID vs
CUSTOM_ID makes me believe that this is not intended but a bug (perhaps a
regression, but I’ve not been using org-mode for long enough to say).
The source of this behavior is in org-store-link:
;; If store function actually set `:description' property, use
;; it, even if it is nil. Otherwise, fallback to link value.
(setq desc (if (plist-member org-store-link-plist :description)
(plist-get org-store-link-plist :description)
link)))
so that auto-desc is later assumed in org-insert-link, even then the store
function has provided no description at all!
Best regards
—
Carlos
- Adding target and custom id links doesn't ask for description,
Carlos Pita <=