GNU bug report logs - #29150
26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Alex <agrambot@HIDDEN>; dated Sun, 5 Nov 2017 07:43:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 19:10:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 13 14:10:53 2017
Received: from localhost ([127.0.0.1]:38855 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eEK8D-0005GE-1p
	for submit <at> debbugs.gnu.org; Mon, 13 Nov 2017 14:10:53 -0500
Received: from mailout09.t-online.de ([194.25.134.84]:43972)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <olaf.rogalsky@HIDDEN>) id 1eEK8B-0005G5-Gu
 for 29150 <at> debbugs.gnu.org; Mon, 13 Nov 2017 14:10:51 -0500
Received: from fwd31.aul.t-online.de (fwd31.aul.t-online.de [172.20.26.136])
 by mailout09.t-online.de (Postfix) with SMTP id 6F7EE423805B;
 Mon, 13 Nov 2017 20:10:49 +0100 (CET)
Received: from blaubaer
 (X7cE1oZOwhg4R7k7sHVHX+KGx9XmRqzk13WTamukh6mAPSds2SJqCo687VGmCEoQV5@[84.57.184.143])
 by fwd31.t-online.de with (TLSv1.2:DHE-RSA-AES256-SHA256 encrypted)
 esmtp id 1eEK81-2jKYEa0; Mon, 13 Nov 2017 20:10:41 +0100
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN> <878tfjnkwg.fsf@HIDDEN>
 <834lq1p455.fsf@HIDDEN> <87tvxz3nv1.fsf@HIDDEN> <83tvxzn3tr.fsf@HIDDEN>
 <8760aenj0f.fsf@HIDDEN> <83mv3qkp38.fsf@HIDDEN>
From: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
In-reply-to: <83mv3qkp38.fsf@HIDDEN>
Date: Mon, 13 Nov 2017 20:09:58 +0100
Message-ID: <874lpyngft.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-ID: X7cE1oZOwhg4R7k7sHVHX+KGx9XmRqzk13WTamukh6mAPSds2SJqCo687VGmCEoQV5
X-TOI-MSGID: 804a33f0-4a03-4f2b-b414-122768e51914
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 29150
Cc: 29150 <at> debbugs.gnu.org, monnier@HIDDEN, agrambot@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)


> I think the problem is in help.el, not in mouse.el.
Oh yes, I meant help.el.

-- 
Olaf Rogalsky
Schwörhausgasse 5
89073 Ulm
Germany




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 18:31:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 13 13:31:32 2017
Received: from localhost ([127.0.0.1]:38823 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eEJW7-0004LI-8l
	for submit <at> debbugs.gnu.org; Mon, 13 Nov 2017 13:31:32 -0500
Received: from eggs.gnu.org ([208.118.235.92]:60737)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1eEJW6-0004L6-0g
 for 29150 <at> debbugs.gnu.org; Mon, 13 Nov 2017 13:31:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1eEJW0-0007GT-5C
 for 29150 <at> debbugs.gnu.org; Mon, 13 Nov 2017 13:31:24 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39574)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1eEJVs-0007Bn-Sm; Mon, 13 Nov 2017 13:31:16 -0500
Received: from [176.228.60.248] (port=2046 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1eEJVs-00025b-By; Mon, 13 Nov 2017 13:31:16 -0500
Date: Mon, 13 Nov 2017 20:31:23 +0200
Message-Id: <83mv3qkp38.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
In-reply-to: <8760aenj0f.fsf@HIDDEN> (message from Olaf Rogalsky on Mon, 
 13 Nov 2017 19:14:24 +0100)
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN> <878tfjnkwg.fsf@HIDDEN>
 <834lq1p455.fsf@HIDDEN> <87tvxz3nv1.fsf@HIDDEN> <83tvxzn3tr.fsf@HIDDEN>
 <8760aenj0f.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 29150
Cc: 29150 <at> debbugs.gnu.org, monnier@HIDDEN, agrambot@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
> Cc: Alex <agrambot@HIDDEN>, 29150 <at> debbugs.gnu.org, monnier@HIDDEN
> Date: Mon, 13 Nov 2017 19:14:24 +0100
> 
> >> >   C-h k C-mouse-3
> >> >
> >> > This pops up a menu; select any item from that menu.  The expected
> >> > result is to get the description of the menu item you selected, but
> >> > instead you get the prompt for "following key, mouse click, or menu
> >> > item" anew.
> >> 
> >> This worked fine in Emacs 25.2, FWIW.
> Hmm interesting.  There are quite a few differences between 25.2 and now
> in mouse.el.

I think the problem is in help.el, not in mouse.el.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 18:15:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 13 13:15:12 2017
Received: from localhost ([127.0.0.1]:38809 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eEJGK-0003wO-6Q
	for submit <at> debbugs.gnu.org; Mon, 13 Nov 2017 13:15:12 -0500
Received: from mailout08.t-online.de ([194.25.134.20]:32776)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <olaf.rogalsky@HIDDEN>) id 1eEJGI-0003wD-Kz
 for 29150 <at> debbugs.gnu.org; Mon, 13 Nov 2017 13:15:11 -0500
Received: from fwd15.aul.t-online.de (fwd15.aul.t-online.de [172.20.27.63])
 by mailout08.t-online.de (Postfix) with SMTP id B750A41CE435;
 Mon, 13 Nov 2017 19:15:08 +0100 (CET)
Received: from blaubaer
 (Sa1L2aZ-ohMzJ7iAiJ9bOuBCLlsZjGhEc3bw682SmwcR7h20aKH9eBbKFgG14ykZVr@[84.57.184.143])
 by fwd15.t-online.de with (TLSv1.2:DHE-RSA-AES256-SHA256 encrypted)
 esmtp id 1eEJGF-0fA6uO0; Mon, 13 Nov 2017 19:15:07 +0100
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN> <878tfjnkwg.fsf@HIDDEN>
 <834lq1p455.fsf@HIDDEN> <87tvxz3nv1.fsf@HIDDEN> <83tvxzn3tr.fsf@HIDDEN>
From: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
In-reply-to: <83tvxzn3tr.fsf@HIDDEN>
Date: Mon, 13 Nov 2017 19:14:24 +0100
Message-ID: <8760aenj0f.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-ID: Sa1L2aZ-ohMzJ7iAiJ9bOuBCLlsZjGhEc3bw682SmwcR7h20aKH9eBbKFgG14ykZVr
X-TOI-MSGID: e03c7405-9904-4ea2-a7e5-64131f605d4b
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 29150
Cc: 29150 <at> debbugs.gnu.org, monnier@HIDDEN, Alex <agrambot@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


Eli Zaretskii writes:
>> From: Alex <agrambot@HIDDEN>
>> Cc: Olaf Rogalsky <olaf.rogalsky@HIDDEN>,  29150 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
>> Date: Sun, 12 Nov 2017 02:25:22 -0600
>> 
>> > Thanks, I installed that patch on the release branch.
>> 
>> Should it use `read-key' instead?
>
> If that does TRT for xt-mouse, I'm okay with doing that.  But please
> wait for Olaf to respond, it's his code after all.
Yes, it does TRT. I wasn't aware of read-key and have a better
understanding of what read-key-event is doing. But using (read-key)
instead of (aref (read-event-vector nil) 0) seems to work equally well.

>> Perhaps the patch should be replaced on the master branch with one that
>> uses `read-key' in all cases?
>
> Why the rush?
I personally have no urgent desires.

>> > Btw, it seems like "C-h k" is not really working for complex mouse
>> > clicks even without xterm-mouse-mode.  For example, try this:
>> >
>> >   C-h k C-mouse-3
>> >
>> > This pops up a menu; select any item from that menu.  The expected
>> > result is to get the description of the menu item you selected, but
>> > instead you get the prompt for "following key, mouse click, or menu
>> > item" anew.
>> 
>> This worked fine in Emacs 25.2, FWIW.
Hmm interesting.  There are quite a few differences between 25.2 and now
in mouse.el.

-- 
Olaf Rogalsky
Schwörhausgasse 5
89073 Ulm
Germany




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 15:51:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 13 10:51:27 2017
Received: from localhost ([127.0.0.1]:38741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eEH1D-0000Vy-JR
	for submit <at> debbugs.gnu.org; Mon, 13 Nov 2017 10:51:27 -0500
Received: from eggs.gnu.org ([208.118.235.92]:59863)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1eEH1B-0000Vl-Eh
 for 29150 <at> debbugs.gnu.org; Mon, 13 Nov 2017 10:51:25 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1eEH12-0003Vt-GM
 for 29150 <at> debbugs.gnu.org; Mon, 13 Nov 2017 10:51:20 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60110)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1eEH12-0003Vf-Do; Mon, 13 Nov 2017 10:51:16 -0500
Received: from [176.228.60.248] (port=1666 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1eEH11-000803-TS; Mon, 13 Nov 2017 10:51:16 -0500
Date: Mon, 13 Nov 2017 17:51:23 +0200
Message-Id: <831sl2mb2c.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alex <agrambot@HIDDEN>
In-reply-to: <878tfbdp3a.fsf@HIDDEN> (message from Alex on Sun, 12 Nov 2017
 18:00:57 -0600)
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN> <878tfjnkwg.fsf@HIDDEN>
 <834lq1p455.fsf@HIDDEN> <87tvxz3nv1.fsf@HIDDEN>
 <83tvxzn3tr.fsf@HIDDEN> <878tfbdp3a.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 29150
Cc: olaf.rogalsky@HIDDEN, 29150 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Alex <agrambot@HIDDEN>
> Cc: olaf.rogalsky@HIDDEN,  29150 <at> debbugs.gnu.org
> Date: Sun, 12 Nov 2017 18:00:57 -0600
> 
> >> Perhaps the patch should be replaced on the master branch with one that
> >> uses `read-key' in all cases?
> >
> > Why the rush?
> 
> I don't mean to rush anything, but I figured that I should mention it
> before I forget about it.

The thing is, I'm not yet sure read-key is TRT in this case.  We have
a lousy record in our changes of input processing code: almost every
change caused subtle bugs that took many moons to find and fix.  I
think we should recognize this vulnerability and behave more
cautiously.

> > If you want this on the release branch, it should be affect only
> > xt-mouse.  If you propose this for master, see above.
> 
> Do you mean that I shouldn't rush the `read-key' change for
> `mouse-drag-secondary' in master, either?

I'd like first to see how it fares on the release branch (and on
master), when it is limited to xt-mouse.

> Would applying the previous diff for master and the following for
> emacs-26 be acceptable?

Looks OK for the release branch (from which it will be merged to
master).  I'd prefer to wait with a more radical change even on
master.  Maybe put a FIXME comment there, to the effect that we should
try removing the condition at some point.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 00:01:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 12 19:01:35 2017
Received: from localhost ([127.0.0.1]:37372 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eE2By-0004Em-UY
	for submit <at> debbugs.gnu.org; Sun, 12 Nov 2017 19:01:35 -0500
Received: from mail-io0-f175.google.com ([209.85.223.175]:52696)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <agrambot@HIDDEN>) id 1eE2Bx-0004EV-Fp
 for 29150 <at> debbugs.gnu.org; Sun, 12 Nov 2017 19:01:34 -0500
Received: by mail-io0-f175.google.com with SMTP id u42so792494ioi.9
 for <29150 <at> debbugs.gnu.org>; Sun, 12 Nov 2017 16:01:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=N7COLC/P0Vh0EhgLZd5BI94N6k6StAIRql1ZwG2McpU=;
 b=ExRfCza/ITk3LcWZV9ZNHKqixkfKWUUFDJRqoMM8fRrIDkQezpWdDEC+YUtxKUfQ/M
 buHMLA1yeLbOWBBgnAP1d8ye8Uq7/muWK1oVvWSCTAWqfZyav1E2/wzUOvE8haZal1rL
 jvdsm+MZAKZUjks/G0nwXLIhZdCKsl3snBHUFP5JMu/ipf6ueX1EfzMN1YC0nMBrsJB1
 CozfQ800t05cTpckhG3ixerxfdqQEoYGgkT5nMcScJ2OiFKVriGFnD8TqKcSr+/wavuf
 uhR35prl1zPNsj1QYUvtlAZBC69U+kCTl/mJkk7vP5cfl6tqz6zgW76vHoNTDMJnfDvv
 xI8A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=N7COLC/P0Vh0EhgLZd5BI94N6k6StAIRql1ZwG2McpU=;
 b=i/ORj+dmOTjHh37nKvZ6wDDyuGUyO4r0xgRRe+es9gt1I3X/CrmuY+s8XCgf4xRsIR
 VF91WFJ5Q2VX4dFO5yUwIlD8wnzrF+QWvOL9TOAyEvEfXYf9vbe2xuvMcnqNZpYQj6L5
 gj3ZFZ+/+5pKTXrGpXXEHRR8gpIu4jhLi5/yl7O77AtfsBYDrQkEF8xulyVXoEtWaa+8
 FKRpx4tWtdFOisSQpBg2Uvbmxq7f8iJuft951LOBeyizK4wnZWYAh9ABAvSfBwgP5Wa4
 DEyMSYuRF8PnPBLs5ZgH5TpsCj5luau37AHbhlDVzz7PPpgbIx+VNgx1N0kBitBRbfns
 tW1Q==
X-Gm-Message-State: AJaThX6uR/bCYrthWHTY/9qKcg/PqeP/0BvcFtYcti4a3txY2ihokkRt
 8NvFGBMuqlwLoBL4DgFBvrne/g==
X-Google-Smtp-Source: AGs4zMayrp9dQn+UpaePR6399BuGRGkMQdKxfFkqo1Lr5dBVDRlEIlIkrPZ7hv+QM1KZgfMnwI0h7w==
X-Received: by 10.107.24.135 with SMTP id 129mr2298480ioy.79.1510531287698;
 Sun, 12 Nov 2017 16:01:27 -0800 (PST)
Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59])
 by smtp.gmail.com with ESMTPSA id q1sm3518344itc.9.2017.11.12.16.01.25
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sun, 12 Nov 2017 16:01:26 -0800 (PST)
From: Alex <agrambot@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN> <878tfjnkwg.fsf@HIDDEN>
 <834lq1p455.fsf@HIDDEN> <87tvxz3nv1.fsf@HIDDEN>
 <83tvxzn3tr.fsf@HIDDEN>
Date: Sun, 12 Nov 2017 18:00:57 -0600
In-Reply-To: <83tvxzn3tr.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 12 Nov
 2017 13:17:52 +0200")
Message-ID: <878tfbdp3a.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 29150
Cc: olaf.rogalsky@HIDDEN, 29150 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--=-=-=
Content-Type: text/plain

Eli Zaretskii <eliz@HIDDEN> writes:

>> Perhaps the patch should be replaced on the master branch with one that
>> uses `read-key' in all cases?
>
> Why the rush?

I don't mean to rush anything, but I figured that I should mention it
before I forget about it.

>> > Should we close this bug now, or is there anything else to do with it?
>> 
>> The first issue is fixed, but not the second (`mouse-drag-secondary'
>> uses `read-event'). Here's a diff for the second:
>
> If you want this on the release branch, it should be affect only
> xt-mouse.  If you propose this for master, see above.

Do you mean that I shouldn't rush the `read-key' change for
`mouse-drag-secondary' in master, either?

Would applying the previous diff for master and the following for
emacs-26 be acceptable?


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=secondary.diff
Content-Description: secondary2

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5eeee1ec52..b9ff71402f 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1740,7 +1740,9 @@ mouse-drag-secondary
       (let (event end end-point)
 	(track-mouse
 	  (while (progn
-		   (setq event (read-event))
+		   (setq event (if (terminal-parameter nil 'xterm-mouse-mode)
+                                   (read-key)
+                                 (read-event)))
 		   (or (mouse-movement-p event)
 		       (memq (car-safe event) '(switch-frame select-window))))
 

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 12 Nov 2017 16:30:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 12 11:30:58 2017
Received: from localhost ([127.0.0.1]:37095 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eDv9u-0006ZX-La
	for submit <at> debbugs.gnu.org; Sun, 12 Nov 2017 11:30:58 -0500
Received: from pmta21.teksavvy.com ([76.10.157.36]:63878)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1eDv9t-0006ZH-H1
 for 29150 <at> debbugs.gnu.org; Sun, 12 Nov 2017 11:30:57 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2H9DABkdgha/xLpjBhbHAEBAQQBAQoBA?=
 =?us-ascii?q?YM1gVKDWoVYhgaONQGBfBQgAZgsCoU1BAIChEVEFAEBAQEBAQEBAQNoKIUfAQQ?=
 =?us-ascii?q?BViMFCws0EhQYDSQuiX8IrU6LBQEBAQcCASWDNIhviw8BBJJ7jy+XGYlXNYchl?=
 =?us-ascii?q?iSBOTYigXI0IQgygy6DEIFsI4w5AQEB?=
X-IPAS-Result: =?us-ascii?q?A2H9DABkdgha/xLpjBhbHAEBAQQBAQoBAYM1gVKDWoVYhga?=
 =?us-ascii?q?ONQGBfBQgAZgsCoU1BAIChEVEFAEBAQEBAQEBAQNoKIUfAQQBViMFCws0EhQYD?=
 =?us-ascii?q?SQuiX8IrU6LBQEBAQcCASWDNIhviw8BBJJ7jy+XGYlXNYchliSBOTYigXI0IQg?=
 =?us-ascii?q?ygy6DEIFsI4w5AQEB?=
X-IronPort-AV: E=Sophos;i="5.44,384,1505793600"; 
   d="scan'208";a="8818297"
Received: from 24-140-233-18.cpe.teksavvy.com (HELO fmsmemgm.homelinux.net)
 ([24.140.233.18])
 by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 12 Nov 2017 11:30:41 -0500
Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848)
 id 2F386AE113; Sun, 12 Nov 2017 11:30:36 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Alex <agrambot@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
Message-ID: <jwvpo8nv4x9.fsf-monnier+emacsbugs@HIDDEN>
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN> <878tfjnkwg.fsf@HIDDEN>
 <834lq1p455.fsf@HIDDEN> <87tvxz3nv1.fsf@HIDDEN>
Date: Sun, 12 Nov 2017 11:30:36 -0500
In-Reply-To: <87tvxz3nv1.fsf@HIDDEN> (Alex's message of "Sun, 12 Nov 2017
 02:25:22 -0600")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 29150
Cc: Eli Zaretskii <eliz@HIDDEN>, 29150 <at> debbugs.gnu.org,
 Olaf Rogalsky <olaf.rogalsky@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

> diff --git a/lisp/mouse.el b/lisp/mouse.el
> index 5eeee1ec52..c165e1b0d2 100644
> --- a/lisp/mouse.el
> +++ b/lisp/mouse.el
> @@ -1740,7 +1740,7 @@ mouse-drag-secondary
>        (let (event end end-point)
>  	(track-mouse
>  	  (while (progn
> -		   (setq event (read-event))
> +		   (setq event (read-key))
>  		   (or (mouse-movement-p event)
>  		       (memq (car-safe event) '(switch-frame select-window))))
>
> Stefan, the above is what I meant by "is using `read-key' inside of
> `track-mouse' an acceptable stopgap solution?".

Yes, it's better than nothing.
But maybe this can go to `master` since it's not an urgent matter, AFAIK.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 12 Nov 2017 11:18:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 12 06:18:02 2017
Received: from localhost ([127.0.0.1]:36054 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eDqH4-0003Vq-6X
	for submit <at> debbugs.gnu.org; Sun, 12 Nov 2017 06:18:02 -0500
Received: from eggs.gnu.org ([208.118.235.92]:37585)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1eDqH2-0003VK-MM
 for 29150 <at> debbugs.gnu.org; Sun, 12 Nov 2017 06:18:00 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1eDqGw-00087k-H5
 for 29150 <at> debbugs.gnu.org; Sun, 12 Nov 2017 06:17:55 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40058)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1eDqGr-00083A-2S; Sun, 12 Nov 2017 06:17:49 -0500
Received: from [176.228.60.248] (port=3856 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1eDqGq-0003iM-D4; Sun, 12 Nov 2017 06:17:48 -0500
Date: Sun, 12 Nov 2017 13:17:52 +0200
Message-Id: <83tvxzn3tr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alex <agrambot@HIDDEN>
In-reply-to: <87tvxz3nv1.fsf@HIDDEN> (message from Alex on Sun, 12 Nov 2017
 02:25:22 -0600)
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN> <878tfjnkwg.fsf@HIDDEN>
 <834lq1p455.fsf@HIDDEN> <87tvxz3nv1.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 29150
Cc: olaf.rogalsky@HIDDEN, 29150 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Alex <agrambot@HIDDEN>
> Cc: Olaf Rogalsky <olaf.rogalsky@HIDDEN>,  29150 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> Date: Sun, 12 Nov 2017 02:25:22 -0600
> 
> > Thanks, I installed that patch on the release branch.
> 
> Should it use `read-key' instead?

If that does TRT for xt-mouse, I'm okay with doing that.  But please
wait for Olaf to respond, it's his code after all.

> Perhaps the patch should be replaced on the master branch with one that
> uses `read-key' in all cases?

Why the rush?

> > Should we close this bug now, or is there anything else to do with it?
> 
> The first issue is fixed, but not the second (`mouse-drag-secondary'
> uses `read-event'). Here's a diff for the second:

If you want this on the release branch, it should be affect only
xt-mouse.  If you propose this for master, see above.

> > Btw, it seems like "C-h k" is not really working for complex mouse
> > clicks even without xterm-mouse-mode.  For example, try this:
> >
> >   C-h k C-mouse-3
> >
> > This pops up a menu; select any item from that menu.  The expected
> > result is to get the description of the menu item you selected, but
> > instead you get the prompt for "following key, mouse click, or menu
> > item" anew.
> 
> This worked fine in Emacs 25.2, FWIW.

Right, I will file a bug report for this regression.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 12 Nov 2017 08:25:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 12 03:25:45 2017
Received: from localhost ([127.0.0.1]:35971 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eDnaL-0007rV-Hy
	for submit <at> debbugs.gnu.org; Sun, 12 Nov 2017 03:25:45 -0500
Received: from mail-io0-f177.google.com ([209.85.223.177]:53536)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <agrambot@HIDDEN>) id 1eDnaJ-0007rE-RU
 for 29150 <at> debbugs.gnu.org; Sun, 12 Nov 2017 03:25:44 -0500
Received: by mail-io0-f177.google.com with SMTP id 189so17595216iow.10
 for <29150 <at> debbugs.gnu.org>; Sun, 12 Nov 2017 00:25:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=xF1DhPtmof7PC2nVxv39b27LaFMZN1kyT/RbrnRYQl0=;
 b=oCX+JLOEhVBD5xWhEzIrtqnhORiri66sqrXWrkqER21MVYvOvnuZaKbpPs5Nmkrabj
 XnSLPO6lsEc6cBfYfl1YewigjJ55/ZIMoUeis6DJ0/hacqkC+8cnOOolXrbeN/AVy1lV
 fYRmBGqMMqL5EdiEeEOZpRG4FP6DqC1dCDFNcBmBo8AI5thKR7IDCD4lHoys22pJV2T6
 YvHfcjm7LPg8Od/mm/HRgp+ft68NFnbK/kghoGvAE9PTIDUfM0ZnGXby5YykrCg8X94t
 9GP/rj3+Na4301FrQg4hIt42B7m2WlokIvkhOgsEaKh6etLLWl5e+dLgBsAidG4Lwp+i
 JsrQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=xF1DhPtmof7PC2nVxv39b27LaFMZN1kyT/RbrnRYQl0=;
 b=BeXRyD6cooVCXm5eRTc2qC7qfvaKMK96pzAfxc7ysb+QIteqL9RXzAOUUsHEwXV/Gs
 OgAOeXyQ8bM4/RZ3Ri9g1ZM7Rp7PKVy0AgASCrfxiWv2AmxlNhCUeuHSqYFgyzlE6CnD
 ed2t/qHlVwAvVDApW1DvQUc8xpeFtdJYkYs2lwCaaZ5kKEIVXGFtkTX0g0HCKpUs+fiH
 viRqpD37qNIEkxvlsG92Yxmxp6O9FSQzwRi50g3Y/xzi641vu3fmkVjFljFLog2AquPY
 fld1WhDbuH9CeT7FmwPwQbqKUTkzaEAZ67PG6cZzBGuLc+yKNCFLCPm/DlfHZAXz6F6W
 TjYQ==
X-Gm-Message-State: AJaThX6nKekObUOVWH4jgP06KNliXt8j9BbL1oGA6y7ofFeffFxFzkMA
 FS4KbeSHKi11qeEo4enfQUM=
X-Google-Smtp-Source: AGs4zMYrsHQGFh2hFJ6vMNMWlo+1jTk7mD87Duhb9YpMlYe1MKpZiSSQm+sentTKyxd4fQv2jgriCA==
X-Received: by 10.107.137.163 with SMTP id t35mr6091406ioi.198.1510475138120; 
 Sun, 12 Nov 2017 00:25:38 -0800 (PST)
Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59])
 by smtp.gmail.com with ESMTPSA id 23sm2912403itj.15.2017.11.12.00.25.35
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sun, 12 Nov 2017 00:25:36 -0800 (PST)
From: Alex <agrambot@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN> <878tfjnkwg.fsf@HIDDEN>
 <834lq1p455.fsf@HIDDEN>
Date: Sun, 12 Nov 2017 02:25:22 -0600
In-Reply-To: <834lq1p455.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 11 Nov
 2017 11:15:50 +0200")
Message-ID: <87tvxz3nv1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 29150
Cc: Olaf Rogalsky <olaf.rogalsky@HIDDEN>, 29150 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.8 (--)

--=-=-=
Content-Type: text/plain

Eli Zaretskii <eliz@HIDDEN> writes:

> Thanks, I installed that patch on the release branch.

Should it use `read-key' instead? See:
https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00245.html

Perhaps the patch should be replaced on the master branch with one that
uses `read-key' in all cases?

> Should we close this bug now, or is there anything else to do with it?

The first issue is fixed, but not the second (`mouse-drag-secondary'
uses `read-event'). Here's a diff for the second:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=secondary.diff
Content-Description: drag-secondary

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5eeee1ec52..c165e1b0d2 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1740,7 +1740,7 @@ mouse-drag-secondary
       (let (event end end-point)
 	(track-mouse
 	  (while (progn
-		   (setq event (read-event))
+		   (setq event (read-key))
 		   (or (mouse-movement-p event)
 		       (memq (car-safe event) '(switch-frame select-window))))
 

--=-=-=
Content-Type: text/plain


Stefan, the above is what I meant by "is using `read-key' inside of
`track-mouse' an acceptable stopgap solution?".

> Btw, it seems like "C-h k" is not really working for complex mouse
> clicks even without xterm-mouse-mode.  For example, try this:
>
>   C-h k C-mouse-3
>
> This pops up a menu; select any item from that menu.  The expected
> result is to get the description of the menu item you selected, but
> instead you get the prompt for "following key, mouse click, or menu
> item" anew.

This worked fine in Emacs 25.2, FWIW.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 11 Nov 2017 09:16:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 11 04:16:02 2017
Received: from localhost ([127.0.0.1]:34718 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eDRtR-0006rE-Qw
	for submit <at> debbugs.gnu.org; Sat, 11 Nov 2017 04:16:02 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33056)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1eDRtQ-0006qu-RF
 for 29150 <at> debbugs.gnu.org; Sat, 11 Nov 2017 04:16:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1eDRtG-0003Xv-DV
 for 29150 <at> debbugs.gnu.org; Sat, 11 Nov 2017 04:15:55 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54093)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1eDRtG-0003Xl-A5; Sat, 11 Nov 2017 04:15:50 -0500
Received: from [176.228.60.248] (port=1846 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1eDRtF-0001WW-D5; Sat, 11 Nov 2017 04:15:49 -0500
Date: Sat, 11 Nov 2017 11:15:50 +0200
Message-Id: <834lq1p455.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
In-reply-to: <878tfjnkwg.fsf@HIDDEN> (message from Olaf Rogalsky on Mon, 
 06 Nov 2017 22:43:11 +0100)
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN> <878tfjnkwg.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 29150
Cc: 29150 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
> Cc: 29150 <at> debbugs.gnu.org
> Date: Mon, 06 Nov 2017 22:43:11 +0100
> 
> > Thanks.  Do you understand why read-key-sequence-vector works with
> > xt-mouse, while read-event doesn't?  If so, can you elaborate on that?
> Unlike read-key-sequence and read-key-sequence-vector, read-event does
> not use input-decode-map.

Using or not using input-decode-map is exactly one reason of subtle
inconsistencies between the results.  I understand why using it would
be TRT for xterm-mouse-mode, but I'm afraid the consequences of using
input-decode-map for all the other input kinds is understood well
enough for us to do this, certainly not on the release branch.

> If you are still not convinced, that read-key-sequence-vector is
> harmless, then please find a modified patch below.

Thanks, I installed that patch on the release branch.  Should we close
this bug now, or is there anything else to do with it?

Btw, it seems like "C-h k" is not really working for complex mouse
clicks even without xterm-mouse-mode.  For example, try this:

  C-h k C-mouse-3

This pops up a menu; select any item from that menu.  The expected
result is to get the description of the menu item you selected, but
instead you get the prompt for "following key, mouse click, or menu
item" anew.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 9 Nov 2017 15:47:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 09 10:47:15 2017
Received: from localhost ([127.0.0.1]:60586 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eCp2x-0005kQ-AF
	for submit <at> debbugs.gnu.org; Thu, 09 Nov 2017 10:47:15 -0500
Received: from eggs.gnu.org ([208.118.235.92]:59043)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1eCp2v-0005kD-D9
 for 29150 <at> debbugs.gnu.org; Thu, 09 Nov 2017 10:47:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1eCp2k-0002Lc-Ey
 for 29150 <at> debbugs.gnu.org; Thu, 09 Nov 2017 10:47:08 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37940)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1eCp2k-0002LS-BK; Thu, 09 Nov 2017 10:47:02 -0500
Received: from [176.228.60.248] (port=2915 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1eCp2j-0006ay-FH; Thu, 09 Nov 2017 10:47:01 -0500
Date: Thu, 09 Nov 2017 17:47:15 +0200
Message-Id: <83tvy3qwsc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alex <agrambot@HIDDEN>
In-reply-to: <871sl8j7bv.fsf@HIDDEN> (message from Alex on Thu, 09 Nov 2017
 00:26:44 -0600)
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <87a7zwjxo6.fsf@HIDDEN> <8760akjw60.fsf@HIDDEN>
 <jwv1sl85sqa.fsf-monnier+emacsbugs@HIDDEN> <871sl8j7bv.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 29150
Cc: olaf.rogalsky@HIDDEN, 29150 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Alex <agrambot@HIDDEN>
> Cc: Olaf Rogalsky <olaf.rogalsky@HIDDEN>,  Eli Zaretskii <eliz@HIDDEN>,  29150 <at> debbugs.gnu.org
> Date: Thu, 09 Nov 2017 00:26:44 -0600
> 
> Assuming that no one ports evil-mode's code or updates the code in
> `mouse-drag-secondary' (there's already a FIXME for this there), is
> using `read-key' inside of `track-mouse' an acceptable stopgap solution?

It could be, but I don't think we understand all the consequences of
this to be sure.

> Is it brittle enough to not apply the change to emacs-26?

Yes, it's too risky for the release branch.  With all due respect to
xterm-mouse, it's a niche feature, so putting the vast majority of
mouse users at risk on its behalf doesn't sound justified.

So I think we should put that on master and see what happens.

> > In my experience, most uses of `read-event` are (latent) bugs, so maybe
> > it's in read-event's docstring that we should say something.
> 
> That sounds like a good idea.

Patches to this latter effect are welcome on emacs-26.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 9 Nov 2017 08:22:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 09 03:22:00 2017
Received: from localhost ([127.0.0.1]:59378 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eCi63-00015t-Vy
	for submit <at> debbugs.gnu.org; Thu, 09 Nov 2017 03:22:00 -0500
Received: from pmta31.teksavvy.com ([76.10.157.38]:65108)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1eCi62-00015g-4a
 for 29150 <at> debbugs.gnu.org; Thu, 09 Nov 2017 03:21:59 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EebABEDwRa/4XnjBhcHAEBAQQBAQoBA?=
 =?us-ascii?q?YM0gVKDWYVYhHmPQIF8mF6FRQKEf0MUAQEBAQEBAQEBA2gohR8BBAF5BQsLDSc?=
 =?us-ascii?q?SFBgxLooACKtkIQKKcwEBAQcCASWDMIIHhmeLDgWSdI8mlxOJUygNhxuXWjYig?=
 =?us-ascii?q?XE0IQgygy6DEIFsI4xAAQEB?=
X-IPAS-Result: =?us-ascii?q?A2EebABEDwRa/4XnjBhcHAEBAQQBAQoBAYM0gVKDWYVYhHm?=
 =?us-ascii?q?PQIF8mF6FRQKEf0MUAQEBAQEBAQEBA2gohR8BBAF5BQsLDScSFBgxLooACKtkI?=
 =?us-ascii?q?QKKcwEBAQcCASWDMIIHhmeLDgWSdI8mlxOJUygNhxuXWjYigXE0IQgygy6DEIF?=
 =?us-ascii?q?sI4xAAQEB?=
X-IronPort-AV: E=Sophos;i="5.44,368,1505793600"; 
   d="scan'208";a="8532550"
Received: from unknown (HELO pastel.home) ([24.140.231.133])
 by smtp.teksavvy.com with ESMTP; 09 Nov 2017 03:21:47 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 526CE612DB; Thu,  9 Nov 2017 03:21:47 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Alex <agrambot@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
Message-ID: <jwvy3nfx40k.fsf-monnier+emacsbugs@HIDDEN>
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <87a7zwjxo6.fsf@HIDDEN> <8760akjw60.fsf@HIDDEN>
 <jwv1sl85sqa.fsf-monnier+emacsbugs@HIDDEN> <871sl8j7bv.fsf@HIDDEN>
Date: Thu, 09 Nov 2017 03:21:47 -0500
In-Reply-To: <871sl8j7bv.fsf@HIDDEN> (Alex's message of "Thu, 09 Nov 2017
 00:26:44 -0600")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 29150
Cc: Olaf Rogalsky <olaf.rogalsky@HIDDEN>, 29150 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

>> I'm not sure why, or what it would say.  `read-key` is a reasonably good
>> replacement for `read-event`, but it's still pretty brittle.
>> The better solution is to not "read" anything and let the main loop do
>> it for you (which is why I changed mouse-drag-track to use
>> set-transient-map instead of mucking with `read-event` or `read-key`).

> Assuming that no one ports evil-mode's code or updates the code in
> `mouse-drag-secondary' (there's already a FIXME for this there), is
> using `read-key' inside of `track-mouse' an acceptable stopgap solution?

I'm not sure I understand the question, but I think so, yes.

> Is it brittle enough to not apply the change to emacs-26?

I think in the help.el case, it would be a clear improvement.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 9 Nov 2017 06:26:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 09 01:26:58 2017
Received: from localhost ([127.0.0.1]:59334 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eCgIj-0006bR-VS
	for submit <at> debbugs.gnu.org; Thu, 09 Nov 2017 01:26:58 -0500
Received: from mail-it0-f41.google.com ([209.85.214.41]:50699)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <agrambot@HIDDEN>) id 1eCgIh-0006bD-Ru
 for 29150 <at> debbugs.gnu.org; Thu, 09 Nov 2017 01:26:56 -0500
Received: by mail-it0-f41.google.com with SMTP id 72so9895350itl.5
 for <29150 <at> debbugs.gnu.org>; Wed, 08 Nov 2017 22:26:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=AU962asW7u6FMJr7Y7Q5HZsYhWKXAtGW+fCOYy0Nlt8=;
 b=ufEzTThIpPz3aVcexsC6cX4+2JbwxdGoERNvgVgynVOYvrUV6ouhpkhuu2kh1vis6d
 p7cDhWUvjKO7dQfCSwmIsH/b225epHmNKz91EICdpU04FHrQ5FOzYJoot00/iM1kBIw2
 cvcxwG9TjjJEiFhCdXm7sOU99PcjG/yH84hXitlHnAQCWmQtKlNMnvcwkV6Ex3hc1ecm
 xO0IMadAVAacOOtvkiJ/IdiNPgBdI1sV2Y8DGAcO9lLlzBSkDB8isorSaklnCslQ1bEi
 Kyt0WYuq3OMs2Ja6qSPdKWUAMXtO6Omeydjt32+g88dAKVSOHaMwzDwW/Yhz+T2yHbkB
 Utvg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=AU962asW7u6FMJr7Y7Q5HZsYhWKXAtGW+fCOYy0Nlt8=;
 b=WSlbYn3IngHTt7JT2vD2iUSPOz5uLoOrv4+THAWAx8b49hW+AkceMszccQPPL0dzeA
 nggItpnijC7rWh71N/VBoULQuDzNR+NKE9Pe6gzUHjXNoaeejXtq5BqfYIpqDug/4CeY
 QkO4nVA2Zl7mK9xyU4Bv/Ffyw6JT7I5BzRAm3q4oLZbcNuB7tArjh8o4nDSGNUGW+uj3
 pm9+ue/fkEJC3ua5U2kDSRz3Pf1dgJC8YUGQtb92L0hbOjzo+2rADrKMsi/MSh3aPM+A
 uPAcWMhCOH6SvvKREvEQ/onj2WUiElzbD5wStfiFa1b2s+/ssUP3QbtmIKuV9O7Qk9yw
 co6Q==
X-Gm-Message-State: AJaThX5/WWV3+SJvjCmZ08/ny6NKGPkuaEx5w3psNF80MZ1YpGSTJu8N
 sSF0rr5+i0NGUIltSerE6mgqYA==
X-Google-Smtp-Source: ABhQp+SA8jLvZp+GFvSmCBcZSiK+GEN51f4aFvLS0jC7T0s4mRs1EQvchslDErmmIB2lvgp1y37I8Q==
X-Received: by 10.36.123.149 with SMTP id q143mr3864792itc.122.1510208810010; 
 Wed, 08 Nov 2017 22:26:50 -0800 (PST)
Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59])
 by smtp.gmail.com with ESMTPSA id x137sm3306597itb.37.2017.11.08.22.26.48
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 08 Nov 2017 22:26:49 -0800 (PST)
From: Alex <agrambot@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <87a7zwjxo6.fsf@HIDDEN> <8760akjw60.fsf@HIDDEN>
 <jwv1sl85sqa.fsf-monnier+emacsbugs@HIDDEN>
Date: Thu, 09 Nov 2017 00:26:44 -0600
In-Reply-To: <jwv1sl85sqa.fsf-monnier+emacsbugs@HIDDEN> (Stefan Monnier's
 message of "Wed, 08 Nov 2017 17:13:32 -0500")
Message-ID: <871sl8j7bv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 29150
Cc: Olaf Rogalsky <olaf.rogalsky@HIDDEN>, 29150 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

Stefan Monnier <monnier@HIDDEN> writes:

> I'm not sure why, or what it would say.  `read-key` is a reasonably good
> replacement for `read-event`, but it's still pretty brittle.
> The better solution is to not "read" anything and let the main loop do
> it for you (which is why I changed mouse-drag-track to use
> set-transient-map instead of mucking with `read-event` or `read-key`).

Assuming that no one ports evil-mode's code or updates the code in
`mouse-drag-secondary' (there's already a FIXME for this there), is
using `read-key' inside of `track-mouse' an acceptable stopgap solution?
Is it brittle enough to not apply the change to emacs-26?

> In my experience, most uses of `read-event` are (latent) bugs, so maybe
> it's in read-event's docstring that we should say something.

That sounds like a good idea.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 8 Nov 2017 22:12:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 08 17:12:19 2017
Received: from localhost ([127.0.0.1]:59051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eCYa3-0000oh-7N
	for submit <at> debbugs.gnu.org; Wed, 08 Nov 2017 17:12:19 -0500
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53951)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1eCYa1-0000oZ-Bk
 for 29150 <at> debbugs.gnu.org; Wed, 08 Nov 2017 17:12:17 -0500
Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242])
 by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id vA8MCF9J021563;
 Wed, 8 Nov 2017 17:12:15 -0500
Received: by lechazo.home (Postfix, from userid 20848)
 id 939C3605C1; Wed,  8 Nov 2017 17:13:32 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Alex <agrambot@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
Message-ID: <jwv1sl85sqa.fsf-monnier+emacsbugs@HIDDEN>
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <87a7zwjxo6.fsf@HIDDEN> <8760akjw60.fsf@HIDDEN>
Date: Wed, 08 Nov 2017 17:13:32 -0500
In-Reply-To: <8760akjw60.fsf@HIDDEN> (Alex's message of "Wed, 08 Nov 2017
 15:30:15 -0600")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 2 Rules triggered
	EDT_SA_DN_PASS=0, RV6154=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6154> : inlines <6166> : streams
 <1769732> : uri <2530542>
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: 29150
Cc: Olaf Rogalsky <olaf.rogalsky@HIDDEN>, 29150 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.3 (-)

> Wait, isn't this just `read-key'? So instead of the above
> aref/read-key-sequence-vector, it should just be `read-key'?

Most likely, yes.

> Perhaps the docstring of `input-decode-map' should mention `read-key' as
> well?

I'm not sure why, or what it would say.  `read-key` is a reasonably good
replacement for `read-event`, but it's still pretty brittle.
The better solution is to not "read" anything and let the main loop do
it for you (which is why I changed mouse-drag-track to use
set-transient-map instead of mucking with `read-event` or `read-key`).

In my experience, most uses of `read-event` are (latent) bugs, so maybe
it's in read-event's docstring that we should say something.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 8 Nov 2017 21:30:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 08 16:30:25 2017
Received: from localhost ([127.0.0.1]:59020 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eCXvV-0008FA-LE
	for submit <at> debbugs.gnu.org; Wed, 08 Nov 2017 16:30:25 -0500
Received: from mail-it0-f47.google.com ([209.85.214.47]:55775)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <agrambot@HIDDEN>) id 1eCXvU-0008Ey-1v
 for 29150 <at> debbugs.gnu.org; Wed, 08 Nov 2017 16:30:24 -0500
Received: by mail-it0-f47.google.com with SMTP id l196so8228135itl.4
 for <29150 <at> debbugs.gnu.org>; Wed, 08 Nov 2017 13:30:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=ESW3isR1+R+p2NPSdJm8zU3cQj26Hf0YbpZpUeRS42U=;
 b=c8skBZNW8BHk10eFjuDnHw8duzP1KXpNGBBdeVZGbuVtMOwNpw8QLf2PV5TgTZeQkN
 TFLTdiprN/TXic4gt1E4/Ov1SKNLUNVGjH3PLGTg6wnV8n131OzHHiGVCbP6MgpRfLsj
 PmA/Iql6gx58PucDIOwF/eeofAX7xvkLJPSdkxvrAVIC/p1zBQlsm+tCw569/YLxT0Gq
 p/7ps6geiZ0EruMp2KzaZheGTRH6Bx+84Z3RuYTD98WsrFy1qPPCnDhAVDydg05uAhoT
 Q4TiF75u7CupvJ9fUGNAM2wgOTPWSxqWprFws5PbZbnCv/P1Ovp+O3nmgOnxHIyR2ior
 9ugg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=ESW3isR1+R+p2NPSdJm8zU3cQj26Hf0YbpZpUeRS42U=;
 b=Pypwlfy9ba+z84sFhnjgIGzV2Z1DCdKq+2neeQwsmSG8s6qt8G1J7ZLAxKAOpbvJTH
 nlBNVaIIlGD7ZN5ZUxolYXzyygHoBN4uB7Nm+o9CcdVlSov8BJCcDKwaKGbkhzMG73RN
 U0xubrTk/vUbBogJSeLgskK5fNJD2BIFUV5v0IUk9tqvpsLp0J5IxgV9DfnE4iIUzbgU
 6OZEaN4Wyx13WpqUDozVAz7T8OL+AT8zZsHJhoh+FJl02c0MvOJptzDpVizh9A2Wx6wR
 TOQVruEinDE7nDwwr1yk9atiwqN10FKEenyg1aYdab4b1L2vkRciD5v8w5YxADJL4c5j
 vENg==
X-Gm-Message-State: AJaThX6XyJHp/2CajfvJhigYz+/e0D5xDAXc2JVb4BMS06t0TqorSIq6
 73KT1g4eGGLrcD/KdUF7hBc=
X-Google-Smtp-Source: ABhQp+SY61T5ppF/0ITPSdhQ83robRidWXAODZCdVWl2iHD5Qge0l8eQmlihboKucp8TZkIeSvgGzg==
X-Received: by 10.36.26.150 with SMTP id 144mr2629745iti.38.1510176618291;
 Wed, 08 Nov 2017 13:30:18 -0800 (PST)
Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59])
 by smtp.gmail.com with ESMTPSA id e142sm2682195ite.28.2017.11.08.13.30.16
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 08 Nov 2017 13:30:17 -0800 (PST)
From: Alex <agrambot@HIDDEN>
To: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <87a7zwjxo6.fsf@HIDDEN>
Date: Wed, 08 Nov 2017 15:30:15 -0600
In-Reply-To: <87a7zwjxo6.fsf@HIDDEN> (Alex's message of "Wed, 08 Nov 2017
 14:57:45 -0600")
Message-ID: <8760akjw60.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 29150
Cc: Eli Zaretskii <eliz@HIDDEN>, 29150 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

Alex <agrambot@HIDDEN> writes:

> This old code uses `read-event', which, as you mentioned in your other
> reply, doesn't use `input-decode-map'. Replacing it with:
>
>   (aref (read-key-sequence-vector nil) 0)
>
> fixes Bug#29143.
>
> Eli, Stefan, does it make sense that `read-event' doesn't take into
> account `input-decode-map'? If so, then is there a better alternative to
> the above workaround? Perhaps there could be a new optional argument to
> `read-event'?

Wait, isn't this just `read-key'? So instead of the above
aref/read-key-sequence-vector, it should just be `read-key'?

Perhaps the docstring of `input-decode-map' should mention `read-key' as
well?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 8 Nov 2017 20:57:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 08 15:57:55 2017
Received: from localhost ([127.0.0.1]:58984 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eCXQ3-0005TV-Mz
	for submit <at> debbugs.gnu.org; Wed, 08 Nov 2017 15:57:55 -0500
Received: from mail-io0-f171.google.com ([209.85.223.171]:47764)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <agrambot@HIDDEN>) id 1eCXQ2-0005TH-8N
 for 29150 <at> debbugs.gnu.org; Wed, 08 Nov 2017 15:57:54 -0500
Received: by mail-io0-f171.google.com with SMTP id h70so7437726ioi.4
 for <29150 <at> debbugs.gnu.org>; Wed, 08 Nov 2017 12:57:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=ju0jSBOQRq/eT+sVqqvPfJsZ65vV9xScDba8azSaG3I=;
 b=qLSkb0AU/LLEvUlavKRzErn3YMCwYp0DizS+jwyt02J160haEq8Z9CbvzNLW7t0+SY
 TsqNj6/8Dqqo4Vo8nmWRtmFP42K3m8wP77U65ZHSVcbEr+SOVrFasuPYmaV2L13cNmS3
 uk2w6K2mLOPQDWIgjrmVcZTfOMv7VZuWlJYlQ68Km7GEcSadZwmvfyJLo4AxbM6B9rpn
 uVyjoYeSwHtIzE7/IfyGEfOfs2TzmZXBzv9gBfrHTemFKEtV5dtOLO6osHQZwJhIgiOM
 NPHtvPweX/LTDWhQ4qbXUMxMcC25SZ3JV7/xgwpXbZR+YKBwW+D0ZOSqDfzw0nQDJROh
 KkEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=ju0jSBOQRq/eT+sVqqvPfJsZ65vV9xScDba8azSaG3I=;
 b=PIZuzeKuVo6xd6w7v6nMlygmyNhuCXeE7z16Wdn7ZoiUSqmedPkewlHvOryQ/5IBp1
 1BdWSJbUieKiuotqoGNIZWzBJLJMbTbV4/AwvpuPQxj1JqcCbAvedxxDvan7o95SyMXm
 AICtyo2oZ6o8o3FMA/eSVWNjho2wEBRdWNupifNDitmhiAjeWjlKolNjZJtkCd2FcCEv
 gERJZ8ipwWhfM/q+LMGosGpFYYXXZnvyOOnHRYnQmBPkEFg97XqaRydoV8wGBZXBDwIa
 9F/AuQkVKHtRkL07GG//IQt1wglThoUZSmCK93i65HJW85gorJAYwAoOasb6Wi6hkBfc
 ucWg==
X-Gm-Message-State: AJaThX5zbbUUyxqUuiSZkPQgF3G/H3rRmnaQOXJg4CPn7KfF4RGQlLOq
 9cdVGMo7eLi0NGwJUDLFlYU=
X-Google-Smtp-Source: AGs4zMY7v1X7cACtIAH1BUjn56gX9Moe2JXdSRBu5sgYEWDMhGFmNR+6KIVJsdXNneseUXrCgeSAYg==
X-Received: by 10.107.107.6 with SMTP id g6mr2380315ioc.149.1510174668425;
 Wed, 08 Nov 2017 12:57:48 -0800 (PST)
Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59])
 by smtp.gmail.com with ESMTPSA id p190sm2621979itp.36.2017.11.08.12.57.46
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 08 Nov 2017 12:57:47 -0800 (PST)
From: Alex <agrambot@HIDDEN>
To: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
Date: Wed, 08 Nov 2017 14:57:45 -0600
In-Reply-To: <87wp34a2i1.fsf@HIDDEN> (Olaf Rogalsky's message of "Sun, 05
 Nov 2017 21:34:30 +0100")
Message-ID: <87a7zwjxo6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 29150
Cc: Eli Zaretskii <eliz@HIDDEN>, 29150 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Olaf Rogalsky <olaf.rogalsky@HIDDEN> writes:

> Hi,

Hi,

Thanks for looking into this. It looks like the only issue remaining is
#2 (M-mouse-1).

> PSS: I don't think, that #29143 is related. Both, `Evil-mode' *and*
>      `xterm-mouse-mode' fool around with the ?\e prefix in the
>      `input-decode-map', but they obviously do it in an incompatible
>      way.

It's not that. I checked out evil-mode's code and found out that it uses
a modified ~6 year old version of `mouse-drag-track', which evidently
doesn't play too well with recent Emacs versions.

For example, try using the definitions of `mouse-drag-region' and
`mouse-drag-track' of Emacs 24 in Emacs 25/26. Then in
`xterm-mouse-mode', releasing `mouse-1' inserts the control sequence
into the current buffer (which is what Bug#29143 is, except in
evil-mode, the characters in the sequence are not all bound to
`self-insert-command').

This old code uses `read-event', which, as you mentioned in your other
reply, doesn't use `input-decode-map'. Replacing it with:

  (aref (read-key-sequence-vector nil) 0)

fixes Bug#29143.

Eli, Stefan, does it make sense that `read-event' doesn't take into
account `input-decode-map'? If so, then is there a better alternative to
the above workaround? Perhaps there could be a new optional argument to
`read-event'?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 6 Nov 2017 21:43:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 06 16:43:43 2017
Received: from localhost ([127.0.0.1]:54712 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eBpBH-0008Mg-Bm
	for submit <at> debbugs.gnu.org; Mon, 06 Nov 2017 16:43:43 -0500
Received: from mailout06.t-online.de ([194.25.134.19]:55220)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <olaf.rogalsky@HIDDEN>) id 1eBpBF-0008MX-D7
 for 29150 <at> debbugs.gnu.org; Mon, 06 Nov 2017 16:43:41 -0500
Received: from fwd12.aul.t-online.de (fwd12.aul.t-online.de [172.20.26.241])
 by mailout06.t-online.de (Postfix) with SMTP id F2DA641CFECF;
 Mon,  6 Nov 2017 22:43:39 +0100 (CET)
Received: from blaubaer
 (rIJ--sZJ8hQHPzB7ecKu1QXzNeU5gATDctokM6xUCD9xxaSwwEkB8gpgNdcEZ5MgDU@[84.57.184.143])
 by fwd12.t-online.de with (TLSv1.2:DHE-RSA-AES256-SHA256 encrypted)
 esmtp id 1eBpBC-1mDJLc0; Mon, 6 Nov 2017 22:43:38 +0100
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
 <83y3njs8i1.fsf@HIDDEN>
From: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
In-reply-to: <83y3njs8i1.fsf@HIDDEN>
Date: Mon, 06 Nov 2017 22:43:11 +0100
Message-ID: <878tfjnkwg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-ID: rIJ--sZJ8hQHPzB7ecKu1QXzNeU5gATDctokM6xUCD9xxaSwwEkB8gpgNdcEZ5MgDU
X-TOI-MSGID: 666db8bd-9a33-4b08-8c3f-ee6cfe432dfe
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 29150
Cc: 29150 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


Eli Zaretskii writes:

>> in case of a button down event, `describe-key' has some trickery to also
>> read the forthcoming up event. The following patch makes this trickery
>> work with xterm-mouse-mode.
>
> Thanks.  Do you understand why read-key-sequence-vector works with
> xt-mouse, while read-event doesn't?  If so, can you elaborate on that?
Unlike read-key-sequence and read-key-sequence-vector, read-event does
not use input-decode-map.  xterm-mouse-mode relies on input-decode-map to
convert special byte sequences (starting with "\e[") into proper mouse
events. read-event stops reading after the first character ("\e") of the
byte sequence -- the remaining charcters are then inserted into the
current buffer.

> Also, I take it that you assume there will be only one element in the
> array returned by read-key-sequence-vector, is that right?  If so, how
> sure are we that this will always be the case?  Because if the
> assumption could be false, this change will have Emacs wait for some
> other input, and the user might think that Emacs hanged.
Yes, that was my assumption. read-key-sequence-vector is called after a
mouse-down event was read.  If someone presses a prefix key before
releasing the mouse or if the up event is a prefix to some binding, then
strange things may happen.  I wasn't able to think of and construct a
case, in which, after the user releases the mouse button,
read-key-sequence-vector still tries to read additional characters. In
any case, \C-g will interrupt read-key-sequence-vector.  But see below.

> Anyway, in general, I'm wary of such changes, which replace one API
> for reading input by another, which works subtly differently.  We had
> in the recent past several incidents where similar changes seemed to
> work, only to reveal many moons later that some rarely-used but useful
> functionality stopped working or became semi-broken.  So I think I'd
> prefer a fix that is specific to xt-mouse (assuming that we can
> reliably detect that the clicks come from xt-mouse), and leave the
> other use cases alone.  If such a solution is possible and makes
> sense, we could even install it on the release branch.
If you are still not convinced, that read-key-sequence-vector is
harmless, then please find a modified patch below.  There I check, as
suggested, that the mouse-down event under consideration was generated
by xterm-mouse-mode.  This is quite easy to accomplish, because
xterm-mouse anyway remembers the last mouse-down event in a terminal
paramerter.

diff --git a/lisp/help.el b/lisp/help.el
index bc8035db0e..fbb9fc8cbe 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -717,7 +717,7 @@ help-read-key-sequence
         (cursor-in-echo-area t)
         saved-yank-menu)
     (unwind-protect
-        (let (key)
+        (let (key down-ev)
           ;; If yank-menu is empty, populate it temporarily, so that
           ;; "Select and Paste" menu can generate a complete event.
           (when (null (cdr yank-menu))
@@ -743,17 +743,21 @@ help-read-key-sequence
                 (let ((last-idx (1- (length key))))
                   (and (eventp (aref key last-idx))
                        (memq 'down (event-modifiers (aref key last-idx)))))
-                (or (and (eventp (aref key 0))
-                         (memq 'down (event-modifiers (aref key 0)))
+                (or (and (eventp (setq down-ev (aref key 0)))
+                         (memq 'down (event-modifiers down-ev))
                          ;; However, for the C-down-mouse-2 popup
                          ;; menu, there is no subsequent up-event.  In
                          ;; this case, the up-event is the next
                          ;; element in the supplied vector.
                          (= (length key) 1))
                     (and (> (length key) 1)
-                         (eventp (aref key 1))
-                         (memq 'down (event-modifiers (aref key 1)))))
-                (read-event))))
+                         (eventp (setq down-ev (aref key 1)))
+                         (memq 'down (event-modifiers down-ev))))
+                (if (and (terminal-parameter nil 'xterm-mouse-mode)
+                         (equal (terminal-parameter nil 'xterm-mouse-last-down)
+                                down-ev))
+                    (aref (read-key-sequence-vector nil) 0)
+                  (read-event)))))
       ;; Put yank-menu back as it was, if we changed it.
       (when saved-yank-menu
         (setq yank-menu (copy-sequence saved-yank-menu))

>> PS: It would be nice, if that person also can have a look at patch #29104
>
> It's in my queue, if no one else beats me to it.  And there, too, more
> detailed description of what you saw and what led you to your proposed
> solution might go a long way towards admitting the change sooner.
Thanks a lot.  I will comment on that patch in a separate email.

Olaf

-- 
Olaf Rogalsky
Schwörhausgasse 5
89073 Ulm
Germany




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 6 Nov 2017 15:59:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 06 10:59:58 2017
Received: from localhost ([127.0.0.1]:54410 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eBjoc-00026D-13
	for submit <at> debbugs.gnu.org; Mon, 06 Nov 2017 10:59:58 -0500
Received: from eggs.gnu.org ([208.118.235.92]:47125)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1eBjoZ-00025y-Rz
 for 29150 <at> debbugs.gnu.org; Mon, 06 Nov 2017 10:59:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1eBjoP-0005ws-HX
 for 29150 <at> debbugs.gnu.org; Mon, 06 Nov 2017 10:59:50 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41831)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1eBjoP-0005wn-E9; Mon, 06 Nov 2017 10:59:45 -0500
Received: from [176.228.60.248] (port=2876 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1eBjoO-0007mx-7C; Mon, 06 Nov 2017 10:59:45 -0500
Date: Mon, 06 Nov 2017 17:59:50 +0200
Message-Id: <83y3njs8i1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
In-reply-to: <87wp34a2i1.fsf@HIDDEN> (message from Olaf Rogalsky on Sun, 
 05 Nov 2017 21:34:30 +0100)
Subject: Re: bug#29150: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
References: <87y3nka4ez.fsf@HIDDEN> <87wp34a2i1.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 29150
Cc: 29150 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
> Date: Sun, 05 Nov 2017 21:34:30 +0100
> 
> in case of a button down event, `describe-key' has some trickery to also
> read the forthcoming up event. The following patch makes this trickery
> work with xterm-mouse-mode.

Thanks.  Do you understand why read-key-sequence-vector works with
xt-mouse, while read-event doesn't?  If so, can you elaborate on that?

Also, I take it that you assume there will be only one element in the
array returned by read-key-sequence-vector, is that right?  If so, how
sure are we that this will always be the case?  Because if the
assumption could be false, this change will have Emacs wait for some
other input, and the user might think that Emacs hanged.

Anyway, in general, I'm wary of such changes, which replace one API
for reading input by another, which works subtly differently.  We had
in the recent past several incidents where similar changes seemed to
work, only to reveal many moons later that some rarely-used but useful
functionality stopped working or became semi-broken.  So I think I'd
prefer a fix that is specific to xt-mouse (assuming that we can
reliably detect that the clicks come from xt-mouse), and leave the
other use cases alone.  If such a solution is possible and makes
sense, we could even install it on the release branch.

> PS: It would be nice, if that person also can have a look at patch #29104

It's in my queue, if no one else beats me to it.  And there, too, more
detailed description of what you saw and what led you to your proposed
solution might go a long way towards admitting the change sooner.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at 29150 <at> debbugs.gnu.org:


Received: (at 29150) by debbugs.gnu.org; 5 Nov 2017 20:34:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 05 15:34:57 2017
Received: from localhost ([127.0.0.1]:52654 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eBRdB-0008QB-PC
	for submit <at> debbugs.gnu.org; Sun, 05 Nov 2017 15:34:57 -0500
Received: from mailout04.t-online.de ([194.25.134.18]:41314)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <olaf.rogalsky@HIDDEN>) id 1eBRdA-0008Q3-3g
 for 29150 <at> debbugs.gnu.org; Sun, 05 Nov 2017 15:34:56 -0500
Received: from fwd15.aul.t-online.de (fwd15.aul.t-online.de [172.20.27.63])
 by mailout04.t-online.de (Postfix) with SMTP id 3E197419900E
 for <29150 <at> debbugs.gnu.org>; Sun,  5 Nov 2017 21:34:54 +0100 (CET)
Received: from blaubaer
 (TJ5tJsZboh0s58IALJViGYObJYGTNPUuHRthcDf9VhjkpeuHuK5IB7MRs8bDGfMgVv@[84.57.184.143])
 by fwd15.t-online.de with (TLSv1.2:DHE-RSA-AES256-SHA256 encrypted)
 esmtp id 1eBRd8-1VsHAm0; Sun, 5 Nov 2017 21:34:54 +0100
References: <87y3nka4ez.fsf@HIDDEN>
From: Olaf Rogalsky <olaf.rogalsky@HIDDEN>
To: 29150 <at> debbugs.gnu.org
Subject: Fwd: 26.0.90;
 Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
Date: Sun, 05 Nov 2017 21:34:30 +0100
Message-ID: <87wp34a2i1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-ID: TJ5tJsZboh0s58IALJViGYObJYGTNPUuHRthcDf9VhjkpeuHuK5IB7MRs8bDGfMgVv
X-TOI-MSGID: 7dce9c54-b019-4731-8717-d2dc23b735d4
X-Spam-Score: 1.7 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi, in case of a button down event, `describe-key' has some
 trickery to also read the forthcoming up event. The following patch makes
 this trickery work with xterm-mouse-mode. I don't have write permission to
 the repositiory. I therefore would appreciate it very much, if someone else
 could review und submit the patch. [...] 
 Content analysis details:   (1.7 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source
 [194.25.134.18 listed in dnsbl.sorbs.net]
 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net
 [Blocked - see <http://www.spamcop.net/bl.shtml?194.25.134.18>]
 -0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [194.25.134.18 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [194.25.134.18 listed in list.dnswl.org]
 -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain
 -0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 29150
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.7 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hi, in case of a button down event, `describe-key' has some
    trickery to also read the forthcoming up event. The following patch makes
    this trickery work with xterm-mouse-mode. I don't have write permission to
    the repositiory. I therefore would appreciate it very much, if someone else
    could review und submit the patch. [...] 
 
 Content analysis details:   (1.7 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net
                [Blocked - see <http://www.spamcop.net/bl.shtml?194.25.134.18>]
  0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source
                             [194.25.134.18 listed in dnsbl.sorbs.net]
 -0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [194.25.134.18 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [194.25.134.18 listed in list.dnswl.org]
 -0.0 RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain
 -0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders

Hi,

in case of a button down event, `describe-key' has some trickery to also
read the forthcoming up event. The following patch makes this trickery
work with xterm-mouse-mode.

I don't have write permission to the repositiory. I therefore would
appreciate it very much, if someone else could review und submit the
patch.

PS: It would be nice, if that person also can have a look at patch #29104

PSS: I don't think, that #29143 is related. Both, `Evil-mode' *and*
     `xterm-mouse-mode' fool around with the ?\e prefix in the
     `input-decode-map', but they obviously do it in an incompatible
     way.


diff --git a/lisp/help.el b/lisp/help.el
index bc8035db0e..247f060f24 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -753,7 +753,7 @@ help-read-key-sequence
                     (and (> (length key) 1)
                          (eventp (aref key 1))
                          (memq 'down (event-modifiers (aref key 1)))))
-                (read-event))))
+                (aref (read-key-sequence-vector nil) 0))))
       ;; Put yank-menu back as it was, if we changed it.
       (when saved-yank-menu
         (setq yank-menu (copy-sequence saved-yank-menu))

-- 
Olaf Rogalsky
Schwörhausgasse 5
89073 Ulm
Germany




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Nov 2017 07:43:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 05 02:43:01 2017
Received: from localhost ([127.0.0.1]:51164 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eBFa8-0007YU-V3
	for submit <at> debbugs.gnu.org; Sun, 05 Nov 2017 02:43:01 -0500
Received: from eggs.gnu.org ([208.118.235.92]:48853)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <agrambot@HIDDEN>) id 1eBFa6-0007YB-Ua
 for submit <at> debbugs.gnu.org; Sun, 05 Nov 2017 02:42:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <agrambot@HIDDEN>) id 1eBFa0-00082S-QN
 for submit <at> debbugs.gnu.org; Sun, 05 Nov 2017 02:42:53 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:34091)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <agrambot@HIDDEN>) id 1eBFa0-00082M-My
 for submit <at> debbugs.gnu.org; Sun, 05 Nov 2017 02:42:52 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39814)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <agrambot@HIDDEN>) id 1eBFZz-0006yh-AF
 for bug-gnu-emacs@HIDDEN; Sun, 05 Nov 2017 02:42:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <agrambot@HIDDEN>) id 1eBFZw-00080J-89
 for bug-gnu-emacs@HIDDEN; Sun, 05 Nov 2017 02:42:51 -0500
Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]:49890)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <agrambot@HIDDEN>) id 1eBFZw-0007za-1b
 for bug-gnu-emacs@HIDDEN; Sun, 05 Nov 2017 02:42:48 -0500
Received: by mail-io0-x22d.google.com with SMTP id n137so12651882iod.6
 for <bug-gnu-emacs@HIDDEN>; Sun, 05 Nov 2017 00:42:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version;
 bh=BW1Vp34tnMjueKKktySt0S3VOAd9w9BUtaHdChbGLn8=;
 b=j8Eab0KYHutxi88qBWRIM3uYUWt24wSK0GDAhydYwZ3bjCSTd7JmCmrKRO4V6OpLCa
 ty5z5Oxtrkry3PnIMQqGKhtyo9f2k92uqRJGD5o7qujkvww3+BzXCG1iLc5H4XqqJ2i+
 QmBLxFC0xJLtr0wN3RbEZAxYB/KyGrtLrnnpYfNkdsCF4Fu/9s3FzzxAHm/VBhVcxo2C
 wxCpBigCz7UyWIrPrtsqVrRzXFBRwm96FdE9/Y8UfPkUbfg6ckryp6aFOVDEbVRAFwbU
 us3o1AtbMghgr52+ZDraPA6WGMtWNNk4REYh6oylqV7GLPzwVkq8b4NHS/rzKUvWZnJI
 bvIw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=BW1Vp34tnMjueKKktySt0S3VOAd9w9BUtaHdChbGLn8=;
 b=EupOx4MWW26F6WDnJNajQueTow9MNFkG+CjS7L/xEI92P+BFz1n95xPM1JN/ZeydGv
 maz+z0JHdOXk9b3/L6UkUGMdfyRDChUewrCZ9ftHCCx7z+FUKkzTxfHqCoYMT0hsCHG9
 BzUVhPQeP9KeUZN8m9oiZ+SBbV1uvDwsodpd5J5kcrd908+1z7l2oUCNzgL0gTi9Qvng
 bdvKl9QeBrOMQCuF/VAf52CVe6kY3SxkOdo3TbHEQWhIdV4j1M1mqJUyKK4h3WjaDHMZ
 piKtxDJ0rcddrDmKm7jjtYwlaYyGqqjCN/q1HCRU8MLtyIiiOQlwOD0UAR4OwO7Iopds
 CZJw==
X-Gm-Message-State: AMCzsaUSOT3eQR1FQt+ny1BI+kyn4YfgzeafMdaQyW/XnSk83ZCyyoAO
 up+m9SabfyAS3fQbQ+S8y26OtQ==
X-Google-Smtp-Source: ABhQp+SvEp5AXJ166pnAh/5TowpcI2KRV48HMbCBWDS/+sgNEMOK+Rz3dCMfla7Qx7sGftS9zOAfzA==
X-Received: by 10.107.112.11 with SMTP id l11mr12806926ioc.214.1509867766873; 
 Sun, 05 Nov 2017 00:42:46 -0700 (PDT)
Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59])
 by smtp.gmail.com with ESMTPSA id b185sm4641650ioa.24.2017.11.05.00.42.45
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sun, 05 Nov 2017 00:42:45 -0700 (PDT)
From: Alex <agrambot@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode)
Date: Sun, 05 Nov 2017 01:42:02 -0600
Message-ID: <87zi81yxx1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

I don't know how to reproduce this outside of `xterm-mouse-mode', but
this seems to be an issue with `input-decode-map' in TTY.

Examples (from emacs -Q -nw with `xterm-mouse-mode' enabled):

1. C-h k <mouse-1>

This will open the help buffer for the click, but also insert the
control sequence for the click.

This also happens when modifying the click with Alt xor Ctrl.

2. <M-mouse-1>

This will insert the click control sequence when releasing the button.

3. I'm not sure, but I wouldn't be surprised if Bug#29143 is also an
example of this. I don't know why it only happens in evil-mode, though.


I don't see anything on the `xterm-mouse-mode' side that would cause the
above since in `turn-on-xterm-mouse-tracking-on-terminal' "\e[<" (the
prefix of the control sequences inserted above) is added to
`input-decode-map', and its binding, `xterm-mouse--read-event-sequence',
isn't called whenever the sequence is inserted.




Acknowledgement sent to Alex <agrambot@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#29150; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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