GNU bug report logs - #78945
30.1; C-x 4 4 and C-x 5 5 do not work with `dired-mouse-find-file'

Previous Next

Package: emacs;

Reported by: Alcor <alcor <at> tilde.club>

Date: Wed, 2 Jul 2025 19:13:02 UTC

Severity: normal

Found in version 30.1

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Alcor <alcor <at> tilde.club>
Cc: 78945 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#78945: 30.1; C-x 4 4 and C-x 5 5 do not work with `dired-mouse-find-file'
Date: Thu, 03 Jul 2025 20:34:42 +0300
close 78945 31.0.50
thanks

> I just have a question regarding possible side effects: I understand
> that this change ignores `mouse-drag-region' events. I'm not sure
> whether it's possible to bind functions to these events, but if yes,
> wouldn't this preclude any commands/functions bound to
> `mouse-drag-region' from being affected by C-x 4 4 or C-x 5 5?

Indeed.  So I pushed a better patch that handles both
down-mouse-1 and mouse-1 events.  `dired-mouse-find-file'
is on mouse-1/2, so it's not ignored anymore:

diff --git a/lisp/window.el b/lisp/window.el
index af7680e4486..068b4d61f79 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -9672,7 +9679,10 @@ display-buffer-override-next-command
 		     (> (minibuffer-depth) minibuffer-depth)
 		     ;; But don't remove immediately after
 		     ;; adding the hook by the same command below.
-		     (eq this-command command))
+		     (eq this-command command)
+                     ;; Don't exit on mouse down event
+                     ;; in anticipation of mouse release event.
+                     (memq 'down (event-modifiers last-input-event)))
               (funcall exitfun))))
     ;; Call post-function after the next command finishes (bug#49057).
     (add-hook 'post-command-hook postfun)




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.