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: Sun, 29 Sep 2024 22:07:01 +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> Reply-To: Francesco =?UTF-8?Q?Potort=C3=AC?= Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20079"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 73469@debbugs.gnu.org To: Jared Finder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 29 22:07:59 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 1sv0Cz-00051G-OY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Sep 2024 22:07:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sv0Cg-0006yR-Vm; Sun, 29 Sep 2024 16:07:39 -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 1sv0CZ-0006y4-OD for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 16:07:31 -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 1sv0CZ-0003xY-Ak for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 16:07:31 -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=GaD+Ioe3ccZNJfdwj2GsWi+RawOUWrwwtWMOQkBSNTI=; b=CsW+NqfjdqR0PUapFlak5x5IN47SFIGH5CIdqQg49WOZgsYPHiN4errsThj56Z8lvVlcY8Id8v5OHnQ8Xo5Iiwjle+DCnpEM9/gDqjBGGr+sOaZrXfTjRkV7FVvTvnWD1DU6c4tBL+JcZEJwnPiXtkWkgf9BxVtGgGHlzmVTxe+vf8fLcQRjdUH3uBjhFg5YcAnPoIGENetlsRxCcUfYrIlxyzopWSyVEjQn9WJkNhPHs3EpL5gpXXeR/oqIjqel5svkzFHi+0uahhExOjc1/NGaklIJVPgM6E6nA1FRH71gicTQeWx02vogwTr8DiIDUxbaXuLoAXO2Dpguem1q8w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sv0D4-00021l-KH for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 16:08:02 -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: Sun, 29 Sep 2024 20:08:02 +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.17276404627653 (code B ref 73469); Sun, 29 Sep 2024 20:08:02 +0000 Original-Received: (at 73469) by debbugs.gnu.org; 29 Sep 2024 20:07:42 +0000 Original-Received: from localhost ([127.0.0.1]:42048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sv0Cj-0001zI-9j for submit@debbugs.gnu.org; Sun, 29 Sep 2024 16:07:41 -0400 Original-Received: from smtp-clients2.isti.cnr.it ([146.48.28.37]:55874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sv0Cd-0001yB-EG for 73469@debbugs.gnu.org; Sun, 29 Sep 2024 16:07:39 -0400 Original-Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) (Authenticated sender: pot) by smtp-clients2.isti.cnr.it (Postfix) with ESMTPSA id 3CA39B0841; Sun, 29 Sep 2024 22:07:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; d=isti.cnr.it; s=arc-smtp-clients2; t=1727640421; cv=none; b=YdZb+VJfDLoZoKfmL02IChP4dDLYeCq6mU6P64OLgk8N4cHg77/bsPM2NeFoy8PTvnnG6e/XqEc0AgLMhMIEjYRb1vCWdqOod+n1s0lGufE59jJ+oxjl6T7aXZ3RZ5vq+rRZ7r4nvDhQ/QbWvLcdqipQgl2SqWeHWoWMiLcyDho= ARC-Message-Signature: i=1; a=rsa-sha256; d=isti.cnr.it; s=arc-smtp-clients2; t=1727640421; c=relaxed/relaxed; bh=GaD+Ioe3ccZNJfdwj2GsWi+RawOUWrwwtWMOQkBSNTI=; 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=S7HFgGRhFSVPZsSIw46+afma3yauOM7tMCI13nnwVFEg9PKZAh8ic5Ses5DsNqYVPC3UVEJQlqRp+9BTMwKUWCrBuAk+jnqi1H4wnzR7Yw+nlZC0tWrOgHevqJpWIWQDGfdhm7PxdUCKuuYQZNmB1sNqY5a59PER6zci3aCnaFg= ARC-Authentication-Results: i=1; smtp-clients2.isti.cnr.it; none DKIM-Filter: OpenDKIM Filter v2.11.0 smtp-clients2.isti.cnr.it 3CA39B0841 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isti.cnr.it; s=smtp-clients2; t=1727640421; bh=GaD+Ioe3ccZNJfdwj2GsWi+RawOUWrwwtWMOQkBSNTI=; h=From:Date:To:Cc:In-Reply-To:Subject:References:From; b=djT5Hi/5ZQE8Ppnt3Qei3mqcv0Anh/YZ96lYYrdL0GjKpbUrVzYMhowp+uFLfJd6o MV9gROMh/cvNNs3q0yRHaVkPnphlM4wrOq6Rj+4hs3qB6sqy9OggdDXpGyKo6kWB6F xjNdnZt3RpEeOoCO9nAVrKeuKSZhC+rAjywRxasI= 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 1sv0C5-00000000WEZ-0TsV; Sun, 29 Sep 2024 22:07:01 +0200 In-Reply-To: <8f37fa3bd8db84dc9bd90346d88f4200@finder.org> (jared@finder.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:292666 Archived-At: >I suspect your terminal emulator or the screen utility is adding this=20 >additional mode. Can you try running the following commands outside of=20 >Emacs? I'm curious if a particular combination of screen and the=20 >terminal emulator is forcing mode 1015 on. > >To manually enable the modes, run the following commands at a shell: > >echo -e "\e[?1000h" # Enable mouse button down and up reporting >echo -e "\e[?1003h" # Enable mouse movement reporting >echo -e "\e[?1006h" # Change format to use printable numbers instead of=20 >encoded bytes > >At this point, moving a clicking the mouse will add characters to the=20 >input, similar to the lossage listed above. > >You can disable these mouse tracking modes by using "l" at the end=20 >instead of "h": > >echo -e "\e[?1000l" >echo -e "\e[?1003l" >echo -e "\e[?1006l" > >I'd also be curious if manually disabling mode 1015 does anything with=20 >the above modes activated. In a shell that's echo -e "\e[?1015l" and in=20 >Emacs that would be (send-string-to-terminal "\e[?1015l"). This is under Screen ________________________________________________________________ Sun Sep 29 21:38:26 CEST 2024 ~$ echo -e "\e[?1000h" ~$ echo -e "\e[?1003h" ~$ echo -e "\e[?1006h" ~$ #35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5= M35;40;6M35;40;6M35;40;7M35;40;7M35;40;7M35;40;7M35;40;7M35;40;8M35;40;8M35= ;40;8M35;40;8M35;40;8M35;40;8M35;40;8M35;40;9M35;40;9M ~$ # above, I just moved the mouse pointer ~$ ~$ # 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 ~$ ~$ # now, I rotate the wheel ~$ # 64;41;9M64;41;9M64;41;9M65;41;9M65;41;9M65;41;9M65;41;9M64;41;9M64;41;= 9M65;41;9M65;41;9M ~$ # now, disabling mode 1015 ~$ echo -e "\e[?1015l" ~$ # moving the mouse pointer: ~$ # 35;61;25M35;61;25M35;61;25M35;61;25M35;61;25M35;61;26M35;61;26M35;60;2= 6M35;60;26M35;60;26M35;60;26M35;60;26M35;60;27M35;60;27M35;60;27M35;60;27M3= 5;60;27M35;58;29M35;57;30M35;57;31M35;57;32M35;56;33M35;55;34M35;55;36M35;5= 5;37M35;55;37M35;55;37M35;54;37M35;54;36M35;55;35M35;55;35M35;55;35M35;56;3= 4M35;57;34M35;57;34M ~$ # left and centr clicks: ~$ # 0;57;34M0;57;34m1;57;34M1;57;34m ~$ # mouse wheel: ~$ # 64;57;34M64;57;34M64;57;34M65;57;34M65;57;34M65;57;34M65;57;34M Now the same on the same terminal, but outside of Screen ________________________________________________________________ pot@pot:~$ echo -e "\e[?1000h" pot@pot:~$ echo -e "\e[?1003h" pot@pot:~$ echo -e "\e[?1006h" pot@pot:~$ # now moving the pointer pot@pot:~$ #35;13;5M35;13;5M35;13;5M35;14;5M35;14;5M35;14;5M35;14;5M35;14;5= M35;14;5M35;14;5M35;14;5M35;15;5M35;15;5M35;15;5M35;15;5M35;15;5M35;15;5M35= ;15;5M35;15;5M35;15;5M35;15;5M35;15;6M35;16;6M35;16;6M35;16;6M35;16;6M35;16= ;6M35;16;6M35;16;6M35;16;6M35;17;6M35;17;6M35;17;6M35;17;6M35;17;6M35;17;6M= 35;17;6M35;17;6M35;17;6M35;18;6M35;18;6M35;18;6M35;18;6M pot@pot:~$ # left and center clicks: pot@pot:~$ #0;4;32M0;4;32m1;4;32M1;4;32m pot@pot:~$ # mouse wheel: pot@pot:~$ #64;4;32M65;4;32M64;4;32M64;4;32M65;4;32M65;4;32M pot@pot:~$ # now, disabling mode 1015 pot@pot:~$ echo -e "\e[?1015l" pot@pot:~$ # moving the mouse pointer: pot@pot:~$ # 35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;3= 2M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M3= 5;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;4= ;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32= M35;4;32M35;4;31M35;4;31M35;3;31M35;3;31M35;3;31M35;3;31M35;3;31M35;3;31M35= ;3;31M35;3;31M35;3;31M35;2;31M35;2;31M35;2;31M35;2;31M35;2;31M35;2;31M pot@pot:~$ # left and center clicks: pot@pot:~$ # 0;2;31M0;2;31m1;2;31M1;2;31m pot@pot:~$ # mouse wheel: pot@pot:~$ # 64;2;31M64;2;31M65;2;31M65;2;31M65;2;31M pot@pot:~$=20 >If you could try all of the above, in your shell both with and without=20 >screen running it would be helpful for narrowing down the source of the=20 >bug. I think I have done all. I can devise many other combinations of things to= try, but I am very short on time, sorry :( > And if evaluating the send-string-to-terminal expression fixes=20 >things No: I tried M-: (send-string-to-terminal "\e[?1015l") and the behaviour cha= nges in the sense that it is more consistent, but anyway a menu pops up.