From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#29478: 26.0.90; `C-h k' followed by mouse clicks no longer shows down event Date: Tue, 28 Nov 2017 22:10:36 +0000 Message-ID: <20171128221036.GC14868@ACM> References: <1b3879d6-f14e-47b0-970f-baf09598fcfd@default> <871skjnpd8.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1511907375 17206 195.159.176.226 (28 Nov 2017 22:16:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Nov 2017 22:16:15 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 29478@debbugs.gnu.org To: Noam Postavsky , Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 28 23:16:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJoAh-0003rQ-2g for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Nov 2017 23:16:07 +0100 Original-Received: from localhost ([::1]:40308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJoAm-00056N-Jf for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Nov 2017 17:16:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJoAg-00055A-Ar for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 17:16:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJoAd-0004mN-5d for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 17:16:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54791) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJoAd-0004mF-17 for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 17:16:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eJoAc-0006bW-66 for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 17:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Nov 2017 22:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 29478-submit@debbugs.gnu.org id=B29478.151190734125354 (code B ref 29478); Tue, 28 Nov 2017 22:16:02 +0000 Original-Received: (at 29478) by debbugs.gnu.org; 28 Nov 2017 22:15:41 +0000 Original-Received: from localhost ([127.0.0.1]:35239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJoAG-0006as-NJ for submit@debbugs.gnu.org; Tue, 28 Nov 2017 17:15:40 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:26038 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1eJoAE-0006ai-9w for 29478@debbugs.gnu.org; Tue, 28 Nov 2017 17:15:39 -0500 Original-Received: (qmail 864 invoked by uid 3782); 28 Nov 2017 22:15:36 -0000 Original-Received: from acm.muc.de (p548C73AE.dip0.t-ipconnect.de [84.140.115.174]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 28 Nov 2017 23:15:36 +0100 Original-Received: (qmail 22145 invoked by uid 1000); 28 Nov 2017 22:10:36 -0000 Content-Disposition: inline In-Reply-To: <871skjnpd8.fsf@users.sourceforge.net> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140507 Archived-At: Hello, Noam and Drew. On Mon, Nov 27, 2017 at 20:50:11 -0500, Noam Postavsky wrote: > tags 29272 + confirmed > quit > Drew Adams writes: > > The down mouse-button event is no longer listed along with the up > > event when you use `C-h k' with a click event. Dunno whether this was > > by design or is an oversight. I think if you press and hold the mouse button for (default) half a second, when you finally release it, C-h k will report the down mouse event. At least this is how GPM behaves for me on a Linux tty. This seems to make sense, because anything bound to a down mouse event is going to be something like a drag event, where the mouse button is held for an extended period of time. > Looks like oversight. Possibly related to Bug#29272. The following > seems to fix it for me, but I'm having trouble convincing myself that > it's the right thing. > --- c/lisp/help.el > +++ i/lisp/help.el > @@ -738,7 +738,7 @@ help-read-key-sequence > ;; spuriously trigger the `sit-for'. > (sleep-for 0.01) > (while (read-event nil nil 0.01)) > - (not (sit-for (/ double-click-time 1000.0) t)))))))) > + (sit-for (/ double-click-time 1000.0) t))))))) > (list > key > ;; If KEY is a down-event, read and include the > Alan, I believe you've been working on this code recently, any thoughts? That I'm redoing some of the underlying C code after a suboptimal patch some days ago, and this seems to have some effect on the mouse events reported for C-h c and C-h k. Eli has already reported that the proposed negation of that condition would break the patch and lead to annoying infinite loops with mouse events. I think this code still may have some way to go before reaching its final state. -- Alan Mackenzie (Nuremberg, Germany).