branch: externals/exwm
commit 536486005f5d43c644a8dfcf86b703324fad704d
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    exwm-manage--unmanage-window: Do not exit active minibuffer
    
    `exit-minibuffer' was called to avoid "Selecting deleted buffer" messages if
    buffers are killed from the minibuffer. Unfortunately this breaks Embark 
actions
    if `embark-quit-after-action' is nil, since it always forces a quit. This 
hurts
    buffer management via Embark.
    
    The "Selecting deleted buffer" error seems harmless and can also occur for
    non-EXWM buffers. Therefore EXWM should not be handled specially. The error 
can
    also occur with Embark, Helm actions, or Ido actions from other buffers. For
    example select the scratch buffer, run C-x b, run embark-act, kill the 
scratch
    buffer, quit with C-g. Since the scratch buffer has been selected before 
C-x b,
    Emacs will try to select it again after quitting the minibuffer, triggering 
the
    error.
    
    For these reasons, let's test `exwm-manage--unmanage-window' without
    `exit-minibuffer' for now. Please report regressions due to this change.
    
    * exwm-manage.el (exwm-manage--unmanage-window): Do not call 
`exit-minibuffer'.
---
 exwm-manage.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/exwm-manage.el b/exwm-manage.el
index 6cbe93ff49..7254996513 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -500,9 +500,7 @@ manager is shutting down."
                (with-current-buffer buffer
                  (let ((kill-buffer-query-functions nil))
                    (kill-buffer buffer))))))
-        (exwm--defer 0 kill-buffer-func buffer)
-        (when (active-minibuffer-window)
-          (exit-minibuffer))))))
+        (exwm--defer 0 kill-buffer-func buffer)))))
 
 (defun exwm-manage--scan ()
   "Search for existing windows and try to manage them."

Reply via email to