1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-02 08:22:16 +00:00

org-offer-links-in-entry: Kill *Select Link* buffer on C-g

* lisp/org.el (org-offer-links-in-entry): When selection is aborted
via C-g, kill *Select Link* buffer.  This is useful when the location
of the buffer is customized via `display-buffer-alist' to be not in
the same frame - then, `save-window-configuration' is not enough get
rid of the temporary window.
This commit is contained in:
Ihor Radchenko 2024-04-07 16:03:10 +03:00
parent be80f4319f
commit 6d864526b7
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -8781,8 +8781,8 @@ there is one, return it."
(match-string 1 l)))))))
(org-fit-window-to-buffer (get-buffer-window "*Select Link*"))
(message "Select link to open, RET to open all:")
(setq c (read-char-exclusive))
(and (get-buffer "*Select Link*") (kill-buffer "*Select Link*"))))
(unwind-protect (setq c (read-char-exclusive))
(and (get-buffer "*Select Link*") (kill-buffer "*Select Link*")))))
(when (equal c ?q) (user-error "Abort"))
(if (equal c ?\C-m)
(setq link links)