unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jared Finder via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Francesco Potortì" <Potorti@isti.cnr.it>, 73469@debbugs.gnu.org
Subject: bug#73469: 29.4; mouse passing on terminal window generates events
Date: Sat, 28 Sep 2024 10:50:53 -0700	[thread overview]
Message-ID: <061a28e3635baae59f37a94bbe37d295@finder.org> (raw)
In-Reply-To: <86plop8kbk.fsf@gnu.org>

On 2024-09-27 03:25, Eli Zaretskii wrote:
>> From: Francesco Potortì <Potorti@isti.cnr.it>
>> Date: Fri, 27 Sep 2024 09:48:24 +0200
>> Cc: 73469@debbugs.gnu.org
>> 
>> I have found the culprit: it is xterm-mouse-mode.

Could you please reshare the lossage, making sure you are moving the 
mouse around over an otherwise empty buffer and not holding any 
modifiers or mouse buttons? I saw in the original bug report that the 
report included lossage containing lines like

ESC [ M 3 5 ; C-<mouse-1>  1 2 0 ; 2 1 M

There are two things that are surprising here, hence my ask for fresh 
logs:

The most surprising thing is the "ESC [ M" prefix. My read of 
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-X10-compatibility-mode 
is that prefix indicates a three byte mouse state should follow but it 
appears that (if I ignore the C-<mouse-1> in the middle) this is 
actually an SGR mouse state. However, SGR mouse state is supposed to be 
reported with an "ESC [ <" prefix and end with "M" only if a mouse 
button is down. If no mouse button is down, it should end with "m".

The C-<mouse-1> in the middle is surprising as well, though I'm noticing 
it's always exactly three bytes after the "ESC [ M prefix".

For comparison, my M-x view lossage for an emacs -Q -nw invocation where 
I enable xterm-mouse-mode and then move the mouse around over an empty 
buffer looks like this:

  ; 2 m ESC [ < 3 5 ; 3 1 ; 2 m ESC [ < 3 5 ; 3 0 ; 2 m ESC [ < 3 5 ; 2 9 
; 2 m ESC [ < 3 5 ; 2 8 ; 2 m ESC [ < 3 5 ; 2
7 ; 2 m ESC [ < 3 5 ; 2 6 ; 2 m ESC [ < 3 5 ; 2 6 ; 3 m ESC [ < 3 5 ; 2 
5 ; 3 m ESC [ < 3 5 ; 2 5 ; 4 m ESC [ < 3 5 ; 2
  6 ; 4 m ESC [ < 3 5 ; 2 6 ; 5 m ESC [ < 3 5 ; 2 7 ; 5 m ESC [ < 3 5 ; 2 
8 ; 6 m ESC [ < 3 5 ; 2 9 ; 6 m ESC [ < 3 5 ;
3 0 ; 6 m ESC [ < 3 5 ; 3 1 ; 6 m ESC [ < 3 5 ; 3 2 ; 6 m ESC [ < 3 5 ; 
3 3 ; 6 m ESC [ < 3 5 ; 3 4 ; 5 m ESC [ < 3 5 ;
  3 5 ; 5 m ESC [ < 3 5 ; 3 5 ; 4 m ESC [ < 3 5 ; 3 6 ; 4 m ESC [ < 3 5 ; 
3 6 ; 3 m ESC [ < 3 5 ; 3 6 ; 2 m ESC x ;; exe
cute-extended-command

   -- MJF





  reply	other threads:[~2024-09-28 17:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25 12:23 bug#73469: 29.4; mouse passing on terminal window generates events Francesco Potortì via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-25 15:45 ` Eli Zaretskii
2024-09-27  7:48   ` Francesco Potortì via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-27 10:25     ` Eli Zaretskii
2024-09-28 17:50       ` Jared Finder via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-09-29  8:52         ` Francesco Potortì via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-29 19:10           ` Jared Finder via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-29 20:07             ` Francesco Potortì via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=061a28e3635baae59f37a94bbe37d295@finder.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73469@debbugs.gnu.org \
    --cc=Potorti@isti.cnr.it \
    --cc=eliz@gnu.org \
    --cc=jared@finder.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).