GNU bug report logs - #53353
29.0.50; spurious <tab-bar> <mouse-movement> events generated by mouse motion in tab-bar

Previous Next

Package: emacs;

Reported by: Mark Kennedy <mark.t.kennedy <at> gmail.com>

Date: Wed, 19 Jan 2022 01:04:01 UTC

Severity: normal

Found in version 29.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53353 in the body.
You can then email your comments to 53353 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53353; Package emacs. (Wed, 19 Jan 2022 01:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mark Kennedy <mark.t.kennedy <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 19 Jan 2022 01:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mark Kennedy <mark.t.kennedy <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; spurious <tab-bar> <mouse-movement> events generated by
 mouse motion in tab-bar
Date: Tue, 18 Jan 2022 20:02:52 -0500
This bug occurs in LSP clients (observed for both scala and python) with
many minor modes in effect.  Not feasible to reproduce from -Q.  Mouse motion in
the tab bar (over both a tab name or the white space between them)
generates unwanted "<tab-bar> <mouse-motion>" input events (which are
unbound).  Eli, if this isn't sufficient info, feel free to point me at
where to start looking again.  Thanks.


In GNU Emacs 29.0.50 (build 43, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4)
 of 2022-01-17 built on x1.mofjwutu.com
Repository revision: 2dad332a1439b59a62cd5ed0d8e3626d9e91e3e5
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 35 (Workstation Edition)

Configured using:
 'configure --with-native-compilation'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE
XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Scala

Minor modes in effect:
  shell-dirtrack-mode: t
  lsp-headerline-breadcrumb-mode: t
  lsp-diagnostics-mode: t
  lsp-modeline-workspace-status-mode: t
  lsp-modeline-diagnostics-mode: t
  lsp-modeline-code-actions-mode: t
  lsp-completion-mode: t
  indent-guide-mode: t
  subword-mode: t
  save-place-mode: t
  desktop-save-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  beacon-mode: t
  pcre-mode: t
  dynamic-completion-mode: t
  msb-mode: t
  winner-mode: t
  savehist-mode: t
  which-function-mode: t
  global-page-break-lines-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  icomplete-mode: t
  dap-tooltip-mode: t
  dap-ui-many-windows-mode: t
  dap-ui-controls-mode: t
  dap-ui-mode: t
  auto-revert-mode: t
  lsp-ui-mode: t
  lsp-ui-doc-mode: t
  lsp-ui-sideline-mode: t
  company-mode: t
  treemacs-filewatch-mode: t
  treemacs-follow-mode: t
  treemacs-git-mode: t
  treemacs-fringe-indicator-mode: t
  lsp-lens-mode: t
  dap-auto-configure-mode: t
  dap-mode: t
  lsp-managed-mode: t
  lsp-mode: t
  yas-minor-mode: t
  flycheck-mode: t
  override-global-mode: t
  hl-todo-mode: t
  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
  tab-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/mtk/.emacs.d/elpa/transient-20220117.1122/transient hides /usr/local/share/emacs/29.0.50/lisp/transient

Features:
(shadow emacsbug names edebug autoload rfc2104 magit-utils crm jka-compr
novice mailalias sort mail-extr smtpmail sendmail cus-start python
tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat shell pcomplete parse-time iso8601 ls-lisp format-spec teco
cl-print debug backtrace shortdoc help-fns radix-tree bs hippie-exp
misearch multi-isearch add-log mm-archive message yank-media rfc822 mml
mml-sec epa derived gnus-util mailabbrev gmm-utils mm-decode mm-bodies
mm-encode lsp-headerline lsp-icons vc bug-reference dired-aux dired
dired-loaddefs url-http url-gw url-cache url-auth mule-util time-date
lsp-diagnostics lsp-modeline vc-git diff-mode vc-dispatcher
company-oddmuse company-keywords company-etags etags fileloop generator
company-gtags company-dabbrev-code company-dabbrev company-files
company-clang company-capf company-cmake company-semantic
company-template company-bbdb lsp-zig lsp-steep lsp-svelte lsp-sqls
lsp-yaml lsp-xml lsp-vimscript lsp-vhdl lsp-vetur lsp-html lsp-verilog
lsp-vala lsp-v lsp-toml lsp-terraform lsp-tex lsp-sorbet lsp-solargraph
lsp-rust lsp-rf lsp-r lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php
lsp-perl lsp-ocaml lsp-nix lsp-nim lsp-nginx lsp-markdown lsp-lua
lsp-kotlin lsp-json lsp-javascript lsp-haxe lsp-groovy lsp-hack
lsp-graphql lsp-go lsp-completion lsp-gdscript lsp-fsharp lsp-fortran
lsp-eslint lsp-erlang lsp-elixir lsp-elm lsp-dockerfile lsp-dhall lsp-d
lsp-css lsp-csharp gnutls lsp-crystal lsp-cmake lsp-clojure
lsp-semantic-tokens lsp-clangd dom lsp-beancount lsp-bash lsp-angular
lsp-ada lsp-actionscript ccls ccls-member-hierarchy
ccls-inheritance-hierarchy ccls-call-hierarchy ccls-tree ccls-code-lens
ccls-semantic-highlight ccls-common scala-mode
scala-mode-prettify-symbols scala-mode-imenu scala-mode-map
scala-mode-fontlock scala-mode-indent scala-mode-paragraph
scala-mode-syntax scala-mode-lib disp-table indent-guide hlinum linum
cap-words superword subword saveplace desktop frameset
display-line-numbers beacon pcre2el rxt re-builder completion msb winner
savehist which-func page-break-lines hi-lock avoid icomplete server
lsp-pyright dap-mouse dap-ui gdb-mi gud bui bui-list bui-info bui-entry
bui-core bui-history bui-button bui-utils cus-edit pp cus-load dap-java
lsp-java request mailheader autorevert mail-utils cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
lsp-ui lsp-ui-flycheck lsp-ui-doc goto-addr lsp-ui-imenu lsp-ui-peek
lsp-ui-sideline lsp-ui-util face-remap company hydra flycheck-package
package-lint let-alist finder finder-inf projectile lisp-mnt mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr grep ibuf-ext
ibuffer ibuffer-loaddefs lsp-metals view lsp-metals-treeview
lsp-treemacs lsp-treemacs-themes treemacs treemacs-header-line
treemacs-compatibility treemacs-mode treemacs-interface
treemacs-extensions treemacs-mouse-interface treemacs-tags
treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode
treemacs-rendering treemacs-async treemacs-workspaces treemacs-dom
treemacs-visuals treemacs-fringe-indicator treemacs-scope pulse
treemacs-faces treemacs-icons treemacs-themes treemacs-core-utils
pfuture hl-line treemacs-logging treemacs-customization treemacs-macros
lsp-metals-protocol lsp-lens dap-mode dap-launch posframe dap-overlays
which-key lsp-mode lsp-protocol aws-snippets go-snippets
yasnippet-snippets yasnippet xref project tree-widget wid-edit spinner
pcase network-stream puny nsm rmc markdown-mode color thingatpt noutline
outline lv inline imenu ht filenotify ewoc epg rfc6068 epg-config
compile text-property-search comint ring flycheck-eldev flycheck
ansi-color find-func use-package-bind-key bind-key easy-mmode
importmagic f dash s epc ctable edmacro kmacro concurrent deferred
hl-todo use-package-ensure ialign align use-package-core tab-line comp
comp-cstr cl-extra help-mode trim page-menu cperl-mode facemenu warnings
rx cl advice info package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json map url-vars seq gv subr-x
byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl
tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt 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 cl-generic
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 simple abbrev obarray
cl-preloaded nadvice button loaddefs 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 move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 2213757 1808274)
 (symbols 48 70393 1138)
 (strings 32 431706 277233)
 (string-bytes 1 17004484)
 (vectors 16 240645)
 (vector-slots 8 4030196 877167)
 (floats 8 934 7751)
 (intervals 56 216050 127208)
 (buffers 992 61))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53353; Package emacs. (Wed, 19 Jan 2022 01:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 53353 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Mark Kennedy <mark.t.kennedy <at> gmail.com>
Cc: 53353 <at> debbugs.gnu.org
Subject: Re: bug#53353: 29.0.50; spurious <tab-bar> <mouse-movement> events
 generated by mouse motion in tab-bar
Date: Wed, 19 Jan 2022 09:52:20 +0800
Mark Kennedy <mark.t.kennedy <at> gmail.com> writes:

> This bug occurs in LSP clients (observed for both scala and python) with
> many minor modes in effect.  Not feasible to reproduce from -Q.  Mouse motion in
> the tab bar (over both a tab name or the white space between them)
> generates unwanted "<tab-bar> <mouse-motion>" input events (which are
> unbound).

What is the value of `track-mouse' when the bug occurs?  Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53353; Package emacs. (Wed, 19 Jan 2022 01:57:01 GMT) Full text and rfc822 format available.

Message #11 received at 53353 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Mark Kennedy <mark.t.kennedy <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 53353 <at> debbugs.gnu.org
Subject: Re: bug#53353: 29.0.50; spurious <tab-bar> <mouse-movement> events
 generated by mouse motion in tab-bar
Date: Wed, 19 Jan 2022 09:56:09 +0800
Po Lu <luangruo <at> yahoo.com> writes:

> What is the value of `track-mouse' when the bug occurs?  Thanks.

I can reproduce this problem by setting `track-mouse' to t.  IMO, the
best solution would probably be to bind <tab-bar> <mouse-movement> to
`ignore', like we do with the rest of the mouse movement events.

Eli, WDYT?

Thanks in advance.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53353; Package emacs. (Wed, 19 Jan 2022 07:53:01 GMT) Full text and rfc822 format available.

Message #14 received at 53353 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 53353 <at> debbugs.gnu.org, mark.t.kennedy <at> gmail.com
Subject: Re: bug#53353: 29.0.50; spurious <tab-bar> <mouse-movement> events
 generated by mouse motion in tab-bar
Date: Wed, 19 Jan 2022 09:52:24 +0200
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: 53353 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> Date: Wed, 19 Jan 2022 09:56:09 +0800
> 
> Po Lu <luangruo <at> yahoo.com> writes:
> 
> > What is the value of `track-mouse' when the bug occurs?  Thanks.
> 
> I can reproduce this problem by setting `track-mouse' to t.  IMO, the
> best solution would probably be to bind <tab-bar> <mouse-movement> to
> `ignore', like we do with the rest of the mouse movement events.
> 
> Eli, WDYT?

I'm not sure I understand: bind to 'ignore' where?

The usual protocol is that Lisp programs that enable mouse tracking
are those that bind mouse-movement events to 'ignore' as they see
fit.  If that is what you propose, then it follows that LSP should do
that if it doesn't want to support mouse-movement on the tab bar.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53353; Package emacs. (Wed, 19 Jan 2022 09:32:01 GMT) Full text and rfc822 format available.

Message #17 received at 53353 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53353 <at> debbugs.gnu.org, mark.t.kennedy <at> gmail.com
Subject: Re: bug#53353: 29.0.50; spurious <tab-bar> <mouse-movement> events
 generated by mouse motion in tab-bar
Date: Wed, 19 Jan 2022 17:31:07 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> The usual protocol is that Lisp programs that enable mouse tracking
> are those that bind mouse-movement events to 'ignore' as they see
> fit.  If that is what you propose, then it follows that LSP should do
> that if it doesn't want to support mouse-movement on the tab bar.

bindings.el binds mouse-movement events to `ignore', so I think the same
should be done with the tab bar (and tool bar) mouse-movement events.

But either way, this is probably not a bug in Emacs.  Mark, can you
verify whether or not `track-mouse' is not nil when those spurious
events are generated?  Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53353; Package emacs. (Wed, 19 Jan 2022 11:39:02 GMT) Full text and rfc822 format available.

Message #20 received at 53353 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 53353 <at> debbugs.gnu.org, mark.t.kennedy <at> gmail.com
Subject: Re: bug#53353: 29.0.50; spurious <tab-bar> <mouse-movement> events
 generated by mouse motion in tab-bar
Date: Wed, 19 Jan 2022 13:37:36 +0200
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: mark.t.kennedy <at> gmail.com,  53353 <at> debbugs.gnu.org
> Date: Wed, 19 Jan 2022 17:31:07 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > The usual protocol is that Lisp programs that enable mouse tracking
> > are those that bind mouse-movement events to 'ignore' as they see
> > fit.  If that is what you propose, then it follows that LSP should do
> > that if it doesn't want to support mouse-movement on the tab bar.
> 
> bindings.el binds mouse-movement events to `ignore'

That's only for the text area, not for the other elements of the Emacs
display.

> so I think the same should be done with the tab bar (and tool bar)
> mouse-movement events.

And scroll bar, and mode-line, and header-line, and tab-line,
etc. etc.  Where does all this end?

The global binding of mouse-movement in bindings.el is very old, and I
have no idea what were the reasons for it.  But we don't do anything
like that for any other mouse-movement gesture, so I don't think I
agree we should do it now.  If LSP doesn't want these events, it
should bind them to 'ignore' inside the track-mouse forms.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53353; Package emacs. (Wed, 19 Jan 2022 11:55:02 GMT) Full text and rfc822 format available.

Message #23 received at 53353 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53353 <at> debbugs.gnu.org, mark.t.kennedy <at> gmail.com
Subject: Re: bug#53353: 29.0.50; spurious <tab-bar> <mouse-movement> events
 generated by mouse motion in tab-bar
Date: Wed, 19 Jan 2022 19:54:14 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> The global binding of mouse-movement in bindings.el is very old, and I
> have no idea what were the reasons for it.  But we don't do anything
> like that for any other mouse-movement gesture, so I don't think I
> agree we should do it now.  If LSP doesn't want these events, it
> should bind them to 'ignore' inside the track-mouse forms.

That's reasonable, thanks.

I'll close this bug if Mark confirms that it's not Emacs who is setting
track-mouse to t.




Reply sent to Po Lu <luangruo <at> yahoo.com>:
You have taken responsibility. (Thu, 20 Jan 2022 01:00:02 GMT) Full text and rfc822 format available.

Notification sent to Mark Kennedy <mark.t.kennedy <at> gmail.com>:
bug acknowledged by developer. (Thu, 20 Jan 2022 01:00:02 GMT) Full text and rfc822 format available.

Message #28 received at 53353-done <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Mark Kennedy <mark.t.kennedy <at> gmail.com>
Cc: 53353-done <at> debbugs.gnu.org
Subject: Re: bug#53353: 29.0.50; spurious <tab-bar> <mouse-movement> events
 generated by mouse motion in tab-bar
Date: Thu, 20 Jan 2022 08:58:55 +0800
(Please use "Reply All" to reply to bug reports, because otherwise your
messages don't reach the bug tracker.)

Mark Kennedy <mark.t.kennedy <at> gmail.com> writes:

> it is not emacs that is setting track-mouse to t.  so please close my
> erroneous report.  binding "<tab-bar> <mouse-movement>" to ignore
> works around the problem.  i had tried this before i submitted the bug
> report but did not use keymap-local-set so thought it didn't work.

Thanks, I'm closing this bug.

> how do you change the value of a buffer-local variable once it has
> been set?  (this is just curiosity on my part since i wasn't able to
> do it).

You just `setq' inside the buffer.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 17 Feb 2022 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 39 days ago.

Previous Next


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