Re: [PATCH] Keep the link if the command was cancelled

2023-07-16 Thread Ihor Radchenko
Max Nikulin writes: > On 03/07/2023 22:28, Ihor Radchenko wrote: >> If necessary, removing stored links without inserting can be made as an >> effect of negative prefix argument in `org-insert-link' or in >> `org-insert-all-links'. > > I do not think it would be a noticeable improvement. It incre

Re: [PATCH] Keep the link if the command was cancelled

2023-07-12 Thread Max Nikulin
On 03/07/2023 22:28, Ihor Radchenko wrote: If necessary, removing stored links without inserting can be made as an effect of negative prefix argument in `org-insert-link' or in `org-insert-all-links'. I do not think it would be a noticeable improvement. It increases code complexity, but `org-i

Re: [PATCH] Keep the link if the command was cancelled

2023-07-03 Thread Ihor Radchenko
Evgenii Klimov writes: >> If necessary, removing stored links without inserting can be made as an >> effect of negative prefix argument in `org-insert-link' or in >> `org-insert-all-links'. > > I tried `org-insert-link' with the negative prefix argument, but the > link was inserted though. > > An

Re: [PATCH] Keep the link if the command was cancelled

2023-07-03 Thread Evgenii Klimov
Ihor Radchenko writes: > Max Nikulin writes: [...] >> I had it in mind when I was writing my message. I had even tried to find >> another command that allows to remove stored links. > > If necessary, removing stored links without inserting can be made as an > effect of negative prefix argumen

Re: [PATCH] Keep the link if the command was cancelled

2023-07-03 Thread Evgenii Klimov
Ihor Radchenko writes: > Evgenii Klimov writes: >> ... > > This makes sense, but the patch may break removing stored link in > certain scenarios. Thanks for response, I'll look into this issue and try to avoid this breakage.

Re: [PATCH] Keep the link if the command was cancelled

2023-07-03 Thread Ihor Radchenko
Max Nikulin writes: >> This argument sounds like https://xkcd.com/1172/ to me. > > I had it in mind when I was writing my message. I had even tried to find > another command that allows to remove stored links. If necessary, removing stored links without inserting can be made as an effect of neg

Re: [PATCH] Keep the link if the command was cancelled

2023-07-03 Thread Max Nikulin
On 03/07/2023 22:11, Ihor Radchenko wrote: Max Nikulin writes: Sometimes I am using it as a feature to remove a link stored by mistake or due to ... This argument sounds like https://xkcd.com/1172/ to me. I had it in mind when I was writing my message. I had even tried to find another comm

Re: [PATCH] Keep the link if the command was cancelled

2023-07-03 Thread Ihor Radchenko
Max Nikulin writes: > Sometimes I am using it as a feature to remove a link stored by mistake > or due to ... This argument sounds like https://xkcd.com/1172/ to me. It is unexpected and undocumented that not inserting the link, but stopping in the middle removes it from the store list. -- Ih

Re: [PATCH] Keep the link if the command was cancelled

2023-07-03 Thread Max Nikulin
On 03/07/2023 19:48, Ihor Radchenko wrote: Evgenii Klimov writes: * lisp/ol.el (org-insert-link): Keep the link in `org-stored-links' if the command was interrupted by the user during the reading of a description from the minibuffer. --- Currently the link is lost if the user chooses the link b

Re: [PATCH] Keep the link if the command was cancelled

2023-07-03 Thread Ihor Radchenko
Evgenii Klimov writes: > * lisp/ol.el (org-insert-link): Keep the link in `org-stored-links' if > the command was interrupted by the user during the reading of a > description from the minibuffer. > --- > Currently the link is lost if the user chooses the link but cancells > the comand while writ

[PATCH] Keep the link if the command was cancelled

2023-07-03 Thread Evgenii Klimov
* lisp/ol.el (org-insert-link): Keep the link in `org-stored-links' if the command was interrupted by the user during the reading of a description from the minibuffer. --- Currently the link is lost if the user chooses the link but cancells the comand while writing the description. lisp/ol.el | 9