Package: emacs;
Reported by: Aaron Zeng <azeng <at> janestreet.com>
Date: Mon, 25 Aug 2025 20:24:01 UTC
Severity: normal
Found in version 30.1.90
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Aaron Zeng <azeng <at> janestreet.com> To: bug-gnu-emacs <at> gnu.org Subject: 30.1.90; Setting mouse-1-click-in-non-selected-windows nil has no effect because target window is selected too soon Date: Mon, 25 Aug 2025 16:22:59 -0400
Setting mouse-1-click-in-non-selected-windows to nil doesn't seem to have the effect described by the documentation: > If nil, a Mouse-1 click on a link in a non-selected window performs > the normal mouse-1 binding, typically selects the window and sets > point at the click position. My understanding from this is that, if I see some button in a buffer whose window is not selected, and click on the button with mouse-1, the selected window should change but the button should not be followed. However, instead I observe the button's link being followed as if I had clicked mouse-2, or if I had first selected the buffer's window and then clicked mouse-1. Reproduction steps: 1. emacs -Q 2. M-: (setopt mouse-1-click-in-non-selected-windows nil) 3. C-x 4 4 C-h C-a (open *About GNU Emacs* buffer in another window) 4. Click the left mouse button on "Authors" After step 3, I see the AUTHORS file as though I had pressed C-x o to select the window displaying "*About GNU Emacs*" before clicking on the button. I would have expected that after clicking, window merely becomes selected and point is moved to whichever character in "Authors" I clicked on. I did some very cursory investigation, but it seems that by the time mouse--click-1-maybe-follows-link is called, the "new window" is already selected, so the following check always evaluates to non-nil, even if mouse-1-click-in-non-selected-windows is nil: (or mouse-1-click-in-non-selected-windows (eq (selected-window) (posn-window (event-start last-input-event)))) In GNU Emacs 30.1.90 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2025-08-14 built on igm-qws-u22796a Repository revision: c7ee7707212c0b7c2892d2d9da039375f624799c Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Rocky Linux 8.10 (Green Obsidian) Configured using: 'configure --with-x-toolkit=lucid --without-gpm --without-gconf --without-selinux --without-imagemagick --with-modules --with-gif=no --with-cairo --with-rsvg --without-compress-install --with-tree-sitter --with-native-compilation=aot --prefix=/usr/local/home/garnish/raw-emacs/30-20250814_124249' Configured features: CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $EMACSLOADPATH: /usr/local/home/azeng/workspaces/24833141-bffb-3c99-a9d6-c366d37c4f5e/+share+/app/emacs/elisp:/usr/local/home/azeng/workspaces/24833141-bffb-3c99-a9d6-c366d37c4f5e/+share+/app/emacs/site-lisp:/usr/local/home/azeng/workspaces/24833141-bffb-3c99-a9d6-c366d37c4f5e/+share+/app/emacs/lib/ecaml_plugin/bin: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr dabbrev emacsbug message yank-media dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail noutline outline emacs-authors-mode view textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check cl-extra gnutls network-stream url-http mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw nsm url-cache url-auth format-spec eww xdg url-queue shr pixel-fill kinsoku url-file svg xml dom puny mm-url gnus nnheader gnus-util text-property-search mail-utils range mm-util mail-prsvr browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json map url-vars mailcap time-date subr-x cus-edit pp cus-start cus-load icons wid-edit cl-print byte-opt gv bytecomp byte-compile mouse-copy mouse-drag thingatpt help-fns radix-tree help-mode cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs regexp-opt faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 294700 30951) (symbols 48 11900 2) (strings 32 59044 2522) (string-bytes 1 1429172) (vectors 16 41469) (vector-slots 8 579798 44183) (floats 8 95 128) (intervals 56 4218 0) (buffers 992 16))
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.