emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug] org-insert-link removes on one link from 2 added by org-store-


From: Ihor Radchenko
Subject: Re: [Bug] org-insert-link removes on one link from 2 added by org-store-link
Date: Sun, 02 Jul 2023 07:49:24 +0000

Max Nikulin <manikulin@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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]