From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 02:43:01 2017 Received: (at submit) by debbugs.gnu.org; 5 Nov 2017 07:43:01 +0000 Received: from localhost ([127.0.0.1]:51164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBFa8-0007YU-V3 for submit@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 ) id 1eBFa6-0007YB-Ua for submit@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 ) id 1eBFa0-00082S-QN for submit@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 ) id 1eBFa0-00082M-My for submit@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 ) id 1eBFZz-0006yh-AF for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2017 02:42:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBFZw-00080J-89 for bug-gnu-emacs@gnu.org; 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 ) id 1eBFZw-0007za-1b for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2017 02:42:48 -0500 Received: by mail-io0-x22d.google.com with SMTP id n137so12651882iod.6 for ; 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 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2017 00:42:45 -0700 (PDT) From: Alex To: bug-gnu-emacs@gnu.org 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@gmail.com> 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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 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. 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 15:34:57 2017 Received: (at 29150) by debbugs.gnu.org; 5 Nov 2017 20:34:58 +0000 Received: from localhost ([127.0.0.1]:52654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBRdB-0008QB-PC for submit@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 ) id 1eBRdA-0008Q3-3g for 29150@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@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@t-online.de> From: Olaf Rogalsky To: 29150@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@t-online.de> 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 ] -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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 ] 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 06 10:59:58 2017 Received: (at 29150) by debbugs.gnu.org; 6 Nov 2017 15:59:58 +0000 Received: from localhost ([127.0.0.1]:54410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBjoc-00026D-13 for submit@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 ) id 1eBjoZ-00025y-Rz for 29150@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 ) id 1eBjoP-0005ws-HX for 29150@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Olaf Rogalsky In-reply-to: <87wp34a2i1.fsf@t-online.de> (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@t-online.de> <87wp34a2i1.fsf@t-online.de> 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Olaf Rogalsky > 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 06 16:43:43 2017 Received: (at 29150) by debbugs.gnu.org; 6 Nov 2017 21:43:43 +0000 Received: from localhost ([127.0.0.1]:54712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBpBH-0008Mg-Bm for submit@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 ) id 1eBpBF-0008MX-D7 for 29150@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@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> From: Olaf Rogalsky To: Eli Zaretskii Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) In-reply-to: <83y3njs8i1.fsf@gnu.org> Date: Mon, 06 Nov 2017 22:43:11 +0100 Message-ID: <878tfjnkwg.fsf@t-online.de> 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 08 15:57:55 2017 Received: (at 29150) by debbugs.gnu.org; 8 Nov 2017 20:57:56 +0000 Received: from localhost ([127.0.0.1]:58984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCXQ3-0005TV-Mz for submit@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 ) id 1eCXQ2-0005TH-8N for 29150@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@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 To: Olaf Rogalsky Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> Date: Wed, 08 Nov 2017 14:57:45 -0600 In-Reply-To: <87wp34a2i1.fsf@t-online.de> (Olaf Rogalsky's message of "Sun, 05 Nov 2017 21:34:30 +0100") Message-ID: <87a7zwjxo6.fsf@gmail.com> 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 , 29150@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Olaf Rogalsky 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'? From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 08 16:30:25 2017 Received: (at 29150) by debbugs.gnu.org; 8 Nov 2017 21:30:26 +0000 Received: from localhost ([127.0.0.1]:59020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCXvV-0008FA-LE for submit@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 ) id 1eCXvU-0008Ey-1v for 29150@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@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 To: Olaf Rogalsky Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> <87a7zwjxo6.fsf@gmail.com> Date: Wed, 08 Nov 2017 15:30:15 -0600 In-Reply-To: <87a7zwjxo6.fsf@gmail.com> (Alex's message of "Wed, 08 Nov 2017 14:57:45 -0600") Message-ID: <8760akjw60.fsf@gmail.com> 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 , 29150@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Alex 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? From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 08 17:12:19 2017 Received: (at 29150) by debbugs.gnu.org; 8 Nov 2017 22:12:19 +0000 Received: from localhost ([127.0.0.1]:59051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCYa3-0000oh-7N for submit@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 ) id 1eCYa1-0000oZ-Bk for 29150@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 To: Alex Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) Message-ID: References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> <87a7zwjxo6.fsf@gmail.com> <8760akjw60.fsf@gmail.com> Date: Wed, 08 Nov 2017 17:13:32 -0500 In-Reply-To: <8760akjw60.fsf@gmail.com> (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 , 29150@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 09 01:26:58 2017 Received: (at 29150) by debbugs.gnu.org; 9 Nov 2017 06:26:58 +0000 Received: from localhost ([127.0.0.1]:59334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCgIj-0006bR-VS for submit@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 ) id 1eCgIh-0006bD-Ru for 29150@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@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 To: Stefan Monnier Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> <87a7zwjxo6.fsf@gmail.com> <8760akjw60.fsf@gmail.com> Date: Thu, 09 Nov 2017 00:26:44 -0600 In-Reply-To: (Stefan Monnier's message of "Wed, 08 Nov 2017 17:13:32 -0500") Message-ID: <871sl8j7bv.fsf@gmail.com> 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 , 29150@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Stefan Monnier 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 09 03:22:00 2017 Received: (at 29150) by debbugs.gnu.org; 9 Nov 2017 08:22:00 +0000 Received: from localhost ([127.0.0.1]:59378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCi63-00015t-Vy for submit@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 ) id 1eCi62-00015g-4a for 29150@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 To: Alex Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) Message-ID: References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> <87a7zwjxo6.fsf@gmail.com> <8760akjw60.fsf@gmail.com> <871sl8j7bv.fsf@gmail.com> Date: Thu, 09 Nov 2017 03:21:47 -0500 In-Reply-To: <871sl8j7bv.fsf@gmail.com> (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 , 29150@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 09 10:47:15 2017 Received: (at 29150) by debbugs.gnu.org; 9 Nov 2017 15:47:15 +0000 Received: from localhost ([127.0.0.1]:60586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCp2x-0005kQ-AF for submit@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 ) id 1eCp2v-0005kD-D9 for 29150@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 ) id 1eCp2k-0002Lc-Ey for 29150@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <871sl8j7bv.fsf@gmail.com> (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@t-online.de> <87wp34a2i1.fsf@t-online.de> <87a7zwjxo6.fsf@gmail.com> <8760akjw60.fsf@gmail.com> <871sl8j7bv.fsf@gmail.com> 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@t-online.de, 29150@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Cc: Olaf Rogalsky , Eli Zaretskii , 29150@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. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 11 04:16:02 2017 Received: (at 29150) by debbugs.gnu.org; 11 Nov 2017 09:16:02 +0000 Received: from localhost ([127.0.0.1]:34718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDRtR-0006rE-Qw for submit@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 ) id 1eDRtQ-0006qu-RF for 29150@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 ) id 1eDRtG-0003Xv-DV for 29150@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Olaf Rogalsky In-reply-to: <878tfjnkwg.fsf@t-online.de> (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@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Olaf Rogalsky > Cc: 29150@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. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 12 03:25:45 2017 Received: (at 29150) by debbugs.gnu.org; 12 Nov 2017 08:25:45 +0000 Received: from localhost ([127.0.0.1]:35971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDnaL-0007rV-Hy for submit@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 ) id 1eDnaJ-0007rE-RU for 29150@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@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 To: Eli Zaretskii Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> Date: Sun, 12 Nov 2017 02:25:22 -0600 In-Reply-To: <834lq1p455.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 11 Nov 2017 11:15:50 +0200") Message-ID: <87tvxz3nv1.fsf@gmail.com> 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 , 29150@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) --=-=-= Content-Type: text/plain Eli Zaretskii 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. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 12 06:18:02 2017 Received: (at 29150) by debbugs.gnu.org; 12 Nov 2017 11:18:02 +0000 Received: from localhost ([127.0.0.1]:36054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDqH4-0003Vq-6X for submit@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 ) id 1eDqH2-0003VK-MM for 29150@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 ) id 1eDqGw-00087k-H5 for 29150@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <87tvxz3nv1.fsf@gmail.com> (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@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> <87tvxz3nv1.fsf@gmail.com> 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@t-online.de, 29150@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Cc: Olaf Rogalsky , 29150@debbugs.gnu.org, Stefan Monnier > 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 12 11:30:58 2017 Received: (at 29150) by debbugs.gnu.org; 12 Nov 2017 16:30:58 +0000 Received: from localhost ([127.0.0.1]:37095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDv9u-0006ZX-La for submit@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 ) id 1eDv9t-0006ZH-H1 for 29150@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 To: Alex Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) Message-ID: References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> <87tvxz3nv1.fsf@gmail.com> Date: Sun, 12 Nov 2017 11:30:36 -0500 In-Reply-To: <87tvxz3nv1.fsf@gmail.com> (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 , 29150@debbugs.gnu.org, Olaf Rogalsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 12 19:01:35 2017 Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 00:01:35 +0000 Received: from localhost ([127.0.0.1]:37372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eE2By-0004Em-UY for submit@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 ) id 1eE2Bx-0004EV-Fp for 29150@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@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 To: Eli Zaretskii Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> <87tvxz3nv1.fsf@gmail.com> <83tvxzn3tr.fsf@gnu.org> Date: Sun, 12 Nov 2017 18:00:57 -0600 In-Reply-To: <83tvxzn3tr.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 12 Nov 2017 13:17:52 +0200") Message-ID: <878tfbdp3a.fsf@gmail.com> 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@t-online.de, 29150@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Eli Zaretskii 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)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 13 10:51:27 2017 Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 15:51:27 +0000 Received: from localhost ([127.0.0.1]:38741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEH1D-0000Vy-JR for submit@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 ) id 1eEH1B-0000Vl-Eh for 29150@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 ) id 1eEH12-0003Vt-GM for 29150@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <878tfbdp3a.fsf@gmail.com> (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@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> <87tvxz3nv1.fsf@gmail.com> <83tvxzn3tr.fsf@gnu.org> <878tfbdp3a.fsf@gmail.com> 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@t-online.de, 29150@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Cc: olaf.rogalsky@t-online.de, 29150@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. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 13 13:15:12 2017 Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 18:15:12 +0000 Received: from localhost ([127.0.0.1]:38809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEJGK-0003wO-6Q for submit@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 ) id 1eEJGI-0003wD-Kz for 29150@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@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> <87tvxz3nv1.fsf@gmail.com> <83tvxzn3tr.fsf@gnu.org> From: Olaf Rogalsky To: Eli Zaretskii Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) In-reply-to: <83tvxzn3tr.fsf@gnu.org> Date: Mon, 13 Nov 2017 19:14:24 +0100 Message-ID: <8760aenj0f.fsf@t-online.de> 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@debbugs.gnu.org, monnier@IRO.UMontreal.CA, Alex X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Eli Zaretskii writes: >> From: Alex >> Cc: Olaf Rogalsky , 29150@debbugs.gnu.org, Stefan Monnier >> 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 13 13:31:32 2017 Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 18:31:32 +0000 Received: from localhost ([127.0.0.1]:38823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEJW7-0004LI-8l for submit@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 ) id 1eEJW6-0004L6-0g for 29150@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 ) id 1eEJW0-0007GT-5C for 29150@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Olaf Rogalsky In-reply-to: <8760aenj0f.fsf@t-online.de> (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@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> <87tvxz3nv1.fsf@gmail.com> <83tvxzn3tr.fsf@gnu.org> <8760aenj0f.fsf@t-online.de> 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@debbugs.gnu.org, monnier@IRO.UMontreal.CA, agrambot@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Olaf Rogalsky > Cc: Alex , 29150@debbugs.gnu.org, monnier@IRO.UMontreal.CA > 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 13 14:10:53 2017 Received: (at 29150) by debbugs.gnu.org; 13 Nov 2017 19:10:53 +0000 Received: from localhost ([127.0.0.1]:38855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEK8D-0005GE-1p for submit@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 ) id 1eEK8B-0005G5-Gu for 29150@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@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> <87tvxz3nv1.fsf@gmail.com> <83tvxzn3tr.fsf@gnu.org> <8760aenj0f.fsf@t-online.de> <83mv3qkp38.fsf@gnu.org> From: Olaf Rogalsky To: Eli Zaretskii Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) In-reply-to: <83mv3qkp38.fsf@gnu.org> Date: Mon, 13 Nov 2017 20:09:58 +0100 Message-ID: <874lpyngft.fsf@t-online.de> 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@debbugs.gnu.org, monnier@IRO.UMontreal.CA, agrambot@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 10 12:25:33 2020 Received: (at 29150) by debbugs.gnu.org; 10 Aug 2020 16:25:33 +0000 Received: from localhost ([127.0.0.1]:37315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5Ac9-0001KX-9M for submit@debbugs.gnu.org; Mon, 10 Aug 2020 12:25:33 -0400 Received: from mail-yb1-f180.google.com ([209.85.219.180]:35473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5Ac6-0001KI-JS for 29150@debbugs.gnu.org; Mon, 10 Aug 2020 12:25:31 -0400 Received: by mail-yb1-f180.google.com with SMTP id y134so5464141yby.2 for <29150@debbugs.gnu.org>; Mon, 10 Aug 2020 09:25:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=0yUwyCh9Jh5p1pPIjXhIkC0uoQY92pMmsK7WdEn+kSc=; b=bFskWJClMD0kqcpdbP2vmE6LVOHaqmFFmb/um0BGBOfTSbf8B/zXEukkecaFU4qYGk MP97cFKtmW5U33M1luzEy20/GBaP3Shdbs0ZGvk4LDx236+zmqQRPTvPB7VH3QBb/Mc8 HcwrLejysqXjWZJO1MzWTcVZ4GWthSKmqQJE8SN6PHUJZTdHb096rVCDjs5S8TjYWj3n eo/YHT17deMiEGptQ5lOkf9Sncr3SmZSrbId+gliajzxGsrZnsmIoSb/qpoPiFG+fv38 VFVysnsRDubW50eq3a+sNtzF91SiDri0kmgD7dNdZcL1+4XuKIOVOgZpfq0/JZ2LHBJP KBPQ== X-Gm-Message-State: AOAM530SI0VO1mOCVdLH3/d5FLyEcXMqhUQ05rPbyC+oZfErqjfbKHoN 1rTTNV7YvE079GmPCw7+B1SX3iLefs037kk/wzU= X-Google-Smtp-Source: ABdhPJyCq9hS8Zlar10PS3E9utEpzECRzXu/j9PLZ1lNO16vBf3cY8iiKGjjtfIC6bddAHy4uJm+SenlijbxVsMXSFI= X-Received: by 2002:a25:880e:: with SMTP id c14mr42364715ybl.181.1597076725274; Mon, 10 Aug 2020 09:25:25 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 10 Aug 2020 09:25:24 -0700 From: Stefan Kangas In-Reply-To: (Stefan Monnier's message of "Sun, 12 Nov 2017 11:30:36 -0500") References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> <87tvxz3nv1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Mon, 10 Aug 2020 09:25:24 -0700 Message-ID: Subject: Re: bug#29150: Fwd: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) To: Stefan Monnier Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 29150 Cc: Eli Zaretskii , 29150@debbugs.gnu.org, Olaf Rogalsky , Alex X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> 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. (That was almost three years ago.) This patch was never installed. Is it still relevant? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 08:50:49 2020 Received: (at control) by debbugs.gnu.org; 1 Oct 2020 12:50:49 +0000 Received: from localhost ([127.0.0.1]:34686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNy2q-0006dd-WA for submit@debbugs.gnu.org; Thu, 01 Oct 2020 08:50:49 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:42466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNy2o-0006dJ-3G for control@debbugs.gnu.org; Thu, 01 Oct 2020 08:50:46 -0400 Received: by mail-ed1-f48.google.com with SMTP id j2so5484059eds.9 for ; Thu, 01 Oct 2020 05:50:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=S9jVL32k86LAOgJEwRVLVlQRP3uABY87e3svZnjUlnQ=; b=U8TguJuT7bfEdAZlAaG5a5GKdGgTlFxrx7+cfdKvtmrWd7m0JqPwETYquoJivsvi3b D5b6fInxHyPweSkLanWVJ4kP/eeCms1BXuw4CtZ/knGvN6bdRMlberlqxlkDjSRiTP8A uctJLXRtFJJlJ4sBr/zh6IqvztnygJGAnDUA3fT61EvSvoXCxZ7qTxA6GiRthSiged3g PYMkgJbefNDoux+CnemHsuXjrxkIwluIzQLvBdP6jJFwvqAQ+w7WpAPbCSneXnbC+FRm DKdXRXhcV/N/+RA5+7iiclHUn4jAbn4g7IDDjNEokmm2lss+dAzalh4lfwnZov7Wmam6 ZyFQ== X-Gm-Message-State: AOAM532Y5XRgSyGD3m4sPAz7+FAZyFe1DIraMCwu2BJqr1LxmEaqMcAP R6alkR/LmurUuRfEjMxbNtD3UGSdu3Mt4NUKavkr1UrYQjk= X-Google-Smtp-Source: ABdhPJwbASIzIflAkzwrYzSBE3EOZ6+29CteGBGdM5wPZGy+nPXsoQlRue0mYp3fq5+e4TIFUzRIU3lFesJVXgGDa/8= X-Received: by 2002:a50:e68a:: with SMTP id z10mr8385236edm.100.1601556640193; Thu, 01 Oct 2020 05:50:40 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 1 Oct 2020 05:50:39 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Thu, 1 Oct 2020 05:50:39 -0700 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.3 (++) 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: tags 29150 + patch thanks Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.48 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.48 listed in wl.mailspike.net] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 2.0 BLANK_SUBJECT Subject is present but empty 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) 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: tags 29150 + patch thanks Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.48 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.48 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 2.0 BLANK_SUBJECT Subject is present but empty 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager tags 29150 + patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon May 10 08:14:26 2021 Received: (at 29150) by debbugs.gnu.org; 10 May 2021 12:14:26 +0000 Received: from localhost ([127.0.0.1]:57615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg4nq-0005oz-3X for submit@debbugs.gnu.org; Mon, 10 May 2021 08:14:26 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg4no-0005oV-5u for 29150@debbugs.gnu.org; Mon, 10 May 2021 08:14:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8izi21awZLztpS0qUQVg0P4y16HKrmDh2tNCEgFDL44=; b=aGnLyezVbJE24zU+4L3b1cmGbQ lQQWR8ObIa2dNBenczquSZVlnTbfMnQGcrvQ1uWR2f6D5UtsD+K8udcmfsS221+ok3Y9MLpcMwpIo EJ4/vkiLyIL9Ac/iEm26GfEYvrtXdztfi8RBJkuCP2KxQ44RE1cKyKL3ORdPp8rEVr4M=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lg4ne-00083q-T5; Mon, 10 May 2021 14:14:17 +0200 From: Lars Ingebrigtsen To: Alex Subject: Re: bug#29150: 26.0.90; Input decoding is sometimes skipped in TTY (xterm-mouse-mode) References: <87y3nka4ez.fsf@t-online.de> <87wp34a2i1.fsf@t-online.de> <83y3njs8i1.fsf@gnu.org> <878tfjnkwg.fsf@t-online.de> <834lq1p455.fsf@gnu.org> <87tvxz3nv1.fsf@gmail.com> X-Now-Playing: Alva Noto and Ryuichi Sakamoto's _Two_: "Scape I" Date: Mon, 10 May 2021 14:14:14 +0200 In-Reply-To: <87tvxz3nv1.fsf@gmail.com> (Alex's message of "Sun, 12 Nov 2017 02:25:22 -0600") Message-ID: <87lf8mrdk9.fsf_-_@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Alex writes: > (track-mouse > (while (progn > - (setq event (read-event)) > + (setq event (read-key)) > (or (mouse-movement-p event) It looks like this change was made as part of Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 29150 Cc: Eli Zaretskii , 29150@debbugs.gnu.org, Olaf Rogalsky , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alex writes: > (track-mouse > (while (progn > - (setq event (read-event)) > + (setq event (read-key)) > (or (mouse-movement-p event) It looks like this change was made as part of commit c62ced5b4d48e5aeef9c3b4d9c6f1b687a9aaa79 Author: Tak Kunihiro AuthorDate: Sun Dec 17 11:19:19 2017 +0100 a month after this discussion, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon May 10 08:14:35 2021 Received: (at control) by debbugs.gnu.org; 10 May 2021 12:14:35 +0000 Received: from localhost ([127.0.0.1]:57618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg4nz-0005pN-Ao for submit@debbugs.gnu.org; Mon, 10 May 2021 08:14:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg4nx-0005p8-Jj for control@debbugs.gnu.org; Mon, 10 May 2021 08:14:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=SUNgs/7WfC9I/96ZyTq+SRvlSwjk/en5g8kPM6Gh6RM=; b=iqi8Bz53wjseanzK4HO9weWsjT RO0KupktY2s/QV/xKs3VQK8WtWotMMqsljtbTdvBC2X1a5jtDOtmklnkbHpw/D4PYR50yg1xqZjGx tnPJabyzdkb6Xts6TDdEIvJppH0Zj5jWUpGyatev/zD9lrY/ZyX7V7hPqqqD7PRVB4x4=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lg4nq-00084I-6V for control@debbugs.gnu.org; Mon, 10 May 2021 14:14:28 +0200 Date: Mon, 10 May 2021 14:14:25 +0200 Message-Id: <87k0o6rdjy.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #29150 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: close 29150 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 29150 quit From unknown Sat Aug 16 18:46:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 08 Jun 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator