From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Francesco =?UTF-8?Q?Potort=C3=AC?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73469: 29.4; mouse passing on terminal window generates events Date: Sat, 19 Oct 2024 10:24:30 +0200 Organization: CNR-ISTI, via Moruzzi 1, I-56124 Pisa, +39-0503153058 Message-ID: References: <861q17d9f0.fsf@gnu.org> <86plop8kbk.fsf@gnu.org> <061a28e3635baae59f37a94bbe37d295@finder.org> <8f37fa3bd8db84dc9bd90346d88f4200@finder.org> <9132263fe833d4323f428460c2f3013e@finder.org> <8634ksmv46.fsf@gnu.org> Reply-To: Francesco =?UTF-8?Q?Potort=C3=AC?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31766"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73469@debbugs.gnu.org, Jared Finder To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 10:24:56 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t24la-00084J-Oo for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 10:24:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t24lM-0004qZ-Rb; Sat, 19 Oct 2024 04:24:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t24lK-0004qJ-PU for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 04:24:38 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t24lK-0003Zs-H0 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 04:24:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=vrAiScI53ETktN/fvi03/CiiaBAh0Di24O3wYMfva5c=; b=KxvGy+q4XLHxlQ+UY3PsV6ikVh2Xoe26wssLkPGMzTe4REBi8AcVCur/wQoUgfIYdei9EVdorrcuwAqJxK7uqhySuSGrhx/6xJhubSS2gogxo1MC10scD6IW4ngAMoLEhw033yr4p/4pqGdnu38ZACISBDVWjnXjsBz2ONDfg73J7ldxmfuAfTVpQabG74UpSXsXq+u5GnrRX1Q1h4bY9mtoHwNV2bAhSIUhc5evJAK5VEaY2SAVeVhSyvHJjVjETqbthJ62eUFelk7WnPL9bur8y10x2sLgsKiTWlRUWcHCAQO+6ciziYrwiFLrXIz6rh2oE26+cZB4HoOUgorzng==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t24lh-0002P0-S1 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 04:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Francesco =?UTF-8?Q?Potort=C3=AC?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 08:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73469 X-GNU-PR-Package: emacs Original-Received: via spool by 73469-submit@debbugs.gnu.org id=B73469.17293263009221 (code B ref 73469); Sat, 19 Oct 2024 08:25:01 +0000 Original-Received: (at 73469) by debbugs.gnu.org; 19 Oct 2024 08:25:00 +0000 Original-Received: from localhost ([127.0.0.1]:41297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t24lf-0002Of-CA for submit@debbugs.gnu.org; Sat, 19 Oct 2024 04:24:59 -0400 Original-Received: from smtp-clients1.isti.cnr.it ([146.48.28.36]:36354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t24lc-0002OT-CX for 73469@debbugs.gnu.org; Sat, 19 Oct 2024 04:24:58 -0400 Original-Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) (Authenticated sender: pot) by smtp-clients1.isti.cnr.it (Postfix) with ESMTPSA id 6B846515; Sat, 19 Oct 2024 10:24:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; d=isti.cnr.it; s=arc-smtp-clients1; t=1729326270; cv=none; b=E0IMlUtiB6Adc41/b5/NKjuATq59sn3XFDakNJmPZb12fKK6hoq6QC+2kZl3vRtQFwAhQBtsWyAlXmY6E9cJWoVMMGFsAC1wGEMBqV8SfKrovBpjv1bnbkhX4UyaoB/lv13wpTYu87D1U8GOWQnqExnbLTGm8TkLuocaIIG3n1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=isti.cnr.it; s=arc-smtp-clients1; t=1729326270; c=relaxed/relaxed; bh=vrAiScI53ETktN/fvi03/CiiaBAh0Di24O3wYMfva5c=; h=DKIM-Filter:DKIM-Signature:X-Virus-Status:X-Virus-Scanned: Received:From:Date:To:Cc:In-Reply-To:Subject:References: MIME-Version:Content-Type:Content-Transfer-Encoding:Organization: X-fingerprint:Message-Id; b=JKl0RWk2KWXtPB7lxxJd3zFpUCUdjSm1bHHW0e+VbpPKjEQ2LNFYMjr9JtJ3lrUnYYp3YO49gG89VKro3IlX12HPRBO3OWo/WJEOQmHwIJCOytErLCYDX0HO4UapnvU1iI3AHJqqcXChiF5W1QMELFE/k/q0bQtPD6gKy18KEOs= ARC-Authentication-Results: i=1; smtp-clients1.isti.cnr.it; none DKIM-Filter: OpenDKIM Filter v2.11.0 smtp-clients1.isti.cnr.it 6B846515 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isti.cnr.it; s=smtp-clients1; t=1729326270; bh=vrAiScI53ETktN/fvi03/CiiaBAh0Di24O3wYMfva5c=; h=From:Date:To:Cc:In-Reply-To:Subject:References:From; b=o0kRDZ9RLxQlgMgcLYBL+rEy/OUoOmTda6ReJIX7A0euR80uSySckGPu3RO2oySco 7PKdd3+w6zJe1hfQg/xDp0Ct8Qq9ozAtrKe4DPKJVp1RyzdNvlVTC4JiyZpgPcN/aD 8uw/iGtoGLx3betTSHjvafZxjS4acWGl5UHBd6ck= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at smtp-out.isti.cnr.it Original-Received: from pot by tucano.isti.cnr.it with local (Exim 4.98) (envelope-from ) id 1t24lC-00000005zEy-0pos; Sat, 19 Oct 2024 10:24:30 +0200 In-Reply-To: <8634ksmv46.fsf@gnu.org> (eliz@gnu.org) X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293849 Archived-At: >Ping! Francesco, could you please provide the additional info >requested by Jared? Sorry, i have traveled for work for the last two weeks and no time for anyt= hing else. I'll be back soon, but then I'll have to manage my backlog, so = I may be forced to delay this answer some more. >> Date: Sat, 05 Oct 2024 08:15:41 -0700 >> From: Jared Finder >> Cc: Eli Zaretskii , 73469@debbugs.gnu.org >>=20 >> On 2024-09-29 13:07, Francesco Potort=C3=AC wrote: >> >=20 >> > This is under Screen >> > ________________________________________________________________ >> > Sun Sep 29 21:38:26 CEST 2024 >> >=20 >> > ~$ echo -e "\e[?1000h" >> >=20 >> > ~$ echo -e "\e[?1003h" >> >=20 >> > ~$ echo -e "\e[?1006h" >> >=20 >> > ~$=20 >> > #35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40= ;5M35;40;6M35;40;6M35;40;7M35;40;7M35;40;7M35;40;7M35;40;7M35;40;8M35;40;8M= 35;40;8M35;40;8M35;40;8M35;40;8M35;40;8M35;40;9M35;40;9M >> > ~$ # above, I just moved the mouse pointer >>=20 >> This is odd and indicates of a bug outside of Emacs. >>=20 >> A mouse move with no buttons down should be sending lowercase m, not=20 >> uppercase M. This is aligned with what the Emacs lossage reported,=20 >> though we can't see the initial ESC [ M characters as the terminal tries= =20 >> to interpret that. >>=20 >> > ~$ # now, I will click left, then right, then center >> > ~$ #0;41;9M0;41;9m35;41;9M35;41;9M1;41;9M1;41;9m >> > ~$ # right did not work, as it is taken by mate-terminal >>=20 >> This may be ok; it depends on if it is prefixed with ESC [ M (bad!) or=20 >> ESC [ < (good!). >>=20 >> > ~$ # now, I rotate the wheel >> > ~$ #=20 >> > 64;41;9M64;41;9M64;41;9M65;41;9M65;41;9M65;41;9M65;41;9M64;41;9M64;41;= 9M65;41;9M65;41;9M >>=20 >> This is also odd. >>=20 >> The wheel is supposed to look mouse buttons 4 and 5 which is accurately= =20 >> represented here. However, the terminal is only sending button down=20 >> (suffixed with M) and no button up (suffixed with m). >>=20 >> > ~$ # now, disabling mode 1015 >> > ~$ echo -e "\e[?1015l" >>=20 >> All the events here looked the same. >>=20 >> > Now the same on the same terminal, but outside of Screen >>=20 >> Again, all the events here looked the same, though like before I=20 >> couldn't see if the prefix was ESC [ M (bad!) or ESC [ < (good!). >>=20 >> Thank you so much for all this testing. I'm fairly confident this is not= =20 >> an issue in Emacs and probably not in screen as well. That means we can= =20 >> rely on view-lossage for accurate character reporting to diagnose what's= =20 >> going on, which is nice because we can see the escape sequence prefix. >>=20 >>=20 >> For next steps I am considering adding a workaround and want to verify=20 >> the behavior is easy to implement and maintain. Unfortunately since I=20 >> can't reproduce your issue locally, I do need more info from you if you= =20 >> have time. I want to see those escape sequence prefixes for both today=20 >> and the state prior 0695c9e8599b5036a80361571e7cb0ea9fdead99 from 2020=20 >> which added mouse movement tracking. >>=20 >> Can you please report the lossage for the same mouse move, mouse button,= =20 >> and mouse wheel test within Emacs and report the lossage? You already=20 >> did mouse move earlier, so I'm just looking for mouse button click and=20 >> mouse wheel scroll. >>=20 >> After that, can you please try altering xterm-mouse--tracking-sequence,= =20 >> replacing 1003 with 1002 before enabling xterm-mouse-mode. (This was the= =20 >> state prior to mouse movement tracking being supported.) Please do this= =20 >> in a fresh Emacs session before enabling xterm-mouse-mode the first=20 >> time. Then report the same mouse move (I'm expecting no characters=20 >> here), mouse click, and mouse wheel lossage. >>=20 >> Thank you! >>=20 >> -- MJF >>=20 >