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>

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 09:35:18 +0300
> For completeness, the corrected reproducer looks like this:
>
> 1. Start a fresh emacs -Q process
> 2. Open some directory in dired via e.g. C-x C-f /tmp RET
> 3. Rebind <mouse-2> to dired-mouse-find-file via (define-key dired-mode-map
> (kbd "<mouse-2>") #'dired-mouse-find-file)
> 4a. Try C-x 4 4 and single-click (<mouse-1>) on a filename
> OR
> 4b. Try C-x 5 5 and single-click (<mouse-1>) on a filename

Thanks for the corrected reproducer.  The 'C-h l' (view-lossage)
shows that 'mouse-drag-region' gets in the way:

 C-x 5 5          ;; other-frame-prefix
 <down-mouse-1>   ;; mouse-drag-region
 <mouse-1>        ;; dired-mouse-find-file
 C-h l            ;; view-lossage

If there are no better ideas, maybe it should be ignored explicitly:

diff --git a/lisp/window.el b/lisp/window.el
index af7680e4486..3e245741caa 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -9672,7 +9679,8 @@ 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)
+		     (memq this-command '(mouse-drag-region)))
               (funcall exitfun))))
     ;; Call post-function after the next command finishes (bug#49057).
     (add-hook 'post-command-hook postfun)




This bug report was last modified 28 days ago.

Previous Next


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