[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Keep the link if the command was cancelled
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] Keep the link if the command was cancelled |
Date: |
Mon, 03 Jul 2023 12:48:15 +0000 |
Evgenii Klimov <eugene.dev@lipklim.org> 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 writing the description.
Thanks!
This makes sense, but the patch may break removing stored link in
certain scenarios.
> - (when (funcall (if (equal complete-file '(64)) 'not 'identity)
> - (not org-link-keep-stored-after-insertion))
> - (setq org-stored-links (delq (assoc link org-stored-links)
> - org-stored-links)))
> -
> (when (and (string-match org-link-plain-re link)
> (not (string-match org-ts-regexp link)))
> ;; URL-like link, normalize the use of angular brackets.
> @@ -1995,6 +1990,10 @@ Use TAB to complete link prefixes, then RET for
> type-specific completion support
> (read-string "Description: " initial-input)
> initial-input)))
The code below the removed form can modify `link' variable. If such
modification does happen, your patch will fail to remove the link from
`org-stored-links' - (assoc link org-stored-links) will no longer return
non-nil.
--
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>
- [PATCH] Keep the link if the command was cancelled, Evgenii Klimov, 2023/07/03
- Re: [PATCH] Keep the link if the command was cancelled,
Ihor Radchenko <=
- Re: [PATCH] Keep the link if the command was cancelled, Max Nikulin, 2023/07/03
- Re: [PATCH] Keep the link if the command was cancelled, Ihor Radchenko, 2023/07/03
- Re: [PATCH] Keep the link if the command was cancelled, Max Nikulin, 2023/07/03
- Re: [PATCH] Keep the link if the command was cancelled, Ihor Radchenko, 2023/07/03
- Re: [PATCH] Keep the link if the command was cancelled, Evgenii Klimov, 2023/07/03
- Re: [PATCH] Keep the link if the command was cancelled, Ihor Radchenko, 2023/07/03
- Re: [PATCH] Keep the link if the command was cancelled, Max Nikulin, 2023/07/12
- Re: [PATCH] Keep the link if the command was cancelled, Ihor Radchenko, 2023/07/16
Re: [PATCH] Keep the link if the command was cancelled, Evgenii Klimov, 2023/07/03
Re: [PATCH v2] Keep the link if the command was cancelled, Evgenii Klimov, 2023/07/03