Max Nikulin <maniku...@gmail.com> writes: > When some heading has the CUSTOM_ID property > > ---- 8< ---- > * title > :PROPERTIES: > :CUSTOM_ID: a-heading > :END: > ---- >8 ---- > > M-x org-store-link adds 2 entries: > - [[*title][title]] > - [[#a-heading][title]] > > however `org-insert-link' (C-c C-l) removes from the stored link only > one of them. As a result the number of unused stored links increases > during an Emacs session.
Confirmed. Not Urgent. > My expectation is that > - either `org-store-links' adds a single option (my preference is > #custom_id) That could be a defcustom, maybe. > - or `org-insert-link' removes the whole group. > I have no idea how to implement second variant keeping backward > compatibility. We can, for example, group the links into sub-lists in org-stored-links. Or maintain a separate helper register that will keep track of the links to be removed together. That said, removing multiple lines by `org-insert-link' will most likely be unexpected for some users. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>