branch: externals/org
commit 6d864526b798904454df205f8381566954cf2605
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>

    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.
---
 lisp/org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 29c9856728..d64b15477b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -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)

Reply via email to