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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 03 Jul 2025 07:46:43 +0300

> Date: Wed, 02 Jul 2025 21:11:32 +0200
> From:  Alcor via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 
> Steps to reproduce:
> 
> 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-find-file via (define-key dired-mode-map
> (kbd "<mouse-2>") #'dired-find-file)
> 4a. Try C-x 4 4 and click on a filename
> OR
> 4b. Try C-x 5 5 and click on a filename
> 
> Expected behavior:
> 
> The file is opened in a new window (if 4a i.e. C-x 4 4) or a new frame
> (if 4b aka C-x 5 5).
> 
> Observed behavior:
> 
> C-x 4 4 or C-x 5 5 are ignored. `dired-find-file' always opens the
> clicked file in the same window.

I cannot reproduce this.  I tried both in Emacs 30.1 and in the
current pretest of Emacs 30.2, and I get the expected behavior in both
cases.  I'm not on Ubuntu, but I doubt if this could be specific to
Ubuntu or to X.

Can anyone else reproduce this?

P.S. Your Subject says dired-mouse-find-file, whereas the recipe uses
dired-find-file.  I tried both, and I get the expected behavior with
both.