From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Chris Feng Newsgroups: gmane.emacs.bugs Subject: bug#23980: 25.0.95; Events put in `unread-command-events' can be wrongly handled Date: Wed, 21 Feb 2018 15:40:35 +0800 Message-ID: <87po4yaiz0.fsf@gmail.com> References: <8660s871vt.fsf@gmail.com> <92f514d5-ca5e-e341-a625-8c94a85cb679@yandex.ru> <83y3jn7bi5.fsf@gnu.org> <83h8qb6kf4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1519198815 22749 195.159.176.226 (21 Feb 2018 07:40:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Feb 2018 07:40:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 23980@debbugs.gnu.org, Dmitry Gutov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 21 08:40:11 2018 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 1eoP0c-0005Od-NX for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Feb 2018 08:40:10 +0100 Original-Received: from localhost ([::1]:59496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoP2d-0008EH-8d for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Feb 2018 02:42:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoP2T-0008E6-GB for bug-gnu-emacs@gnu.org; Wed, 21 Feb 2018 02:42:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoP2Q-0002s7-D6 for bug-gnu-emacs@gnu.org; Wed, 21 Feb 2018 02:42:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45657) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoP2Q-0002s1-8D for bug-gnu-emacs@gnu.org; Wed, 21 Feb 2018 02:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eoP2Q-0005FZ-1o for bug-gnu-emacs@gnu.org; Wed, 21 Feb 2018 02:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chris Feng Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Feb 2018 07:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23980 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23980-submit@debbugs.gnu.org id=B23980.151919886420095 (code B ref 23980); Wed, 21 Feb 2018 07:42:01 +0000 Original-Received: (at 23980) by debbugs.gnu.org; 21 Feb 2018 07:41:04 +0000 Original-Received: from localhost ([127.0.0.1]:53554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoP1T-0005E3-W9 for submit@debbugs.gnu.org; Wed, 21 Feb 2018 02:41:04 -0500 Original-Received: from mail-it0-f48.google.com ([209.85.214.48]:55632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoP1R-0005DR-KN for 23980@debbugs.gnu.org; Wed, 21 Feb 2018 02:41:02 -0500 Original-Received: by mail-it0-f48.google.com with SMTP id n7so1192343ita.5 for <23980@debbugs.gnu.org>; Tue, 20 Feb 2018 23:41:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=ynZoV3+po2zc8VppZ7x85UcGgV2asBPRmEcVXemwxRI=; b=bUS7mbMUCfknmL/PBC8m1x/NkKp9vm72C6H7nwJMnsuaxzV4d7Ck2jOKzO969RyxG5 /kPwt98Se4GyHOgBrgk8M4rd0cPlhr2L8jmnMoR5P2pdAo+uXODxB9UgEhdC9ZL3G+rn Zddg++Wot2NyxiMT9TMpQsiuGnO9ddM6Qnqdm8VKo1yGhVpHfaW+6bTSQQEXKDmLWNNp lgRs4vynDVHGj0bOJtJb+b2ivCCHEcYoo50wTWKoVdMyq4USY+VBzE+Mobzx4MpzdZg5 eOvyWC5biy/tu1RTtUKA7uQIIZgm3Hxlbo4W3EJwSBnAXnURRJlZB8PV+GGDMo4XG7eo 5vLA== 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:in-reply-to:references :user-agent:date:message-id:mime-version; bh=ynZoV3+po2zc8VppZ7x85UcGgV2asBPRmEcVXemwxRI=; b=lHi/FeQ4qyqOLYQjW/7o9cx6nU+4LnoEwWRZ6PaCIEaijCxluWwBVIlzP5vsstYxDm 5inLlfPdpmrd25FFRNmkyys7dKq4QqKeXYiPIwxHu/yFcXKDPgkpL6gcBv78vXd99ESy tuJvIiBEisIWyTlFFScO8pTZKLe95UQtVbLQcDgsIoNy7cBfdhc8CNZFChbzGQZDMhPN laIQrhNJRRtHPMJ7ftd+D0ie+WmMGXEi2+yn5frxPprwwXKYtIaIhT3w2NTiI+7AENjB ZuKmI2YMZ2RkpGELSEgZ8JYihIfQx1+rbOZ4bPRD7d5D4zFKB/xhAIAGijX8wRo0rIHr Pqeg== X-Gm-Message-State: APf1xPC9XSplYLvVulkcoqdNAMh9HpwdQsEt/V4HT/bAOxQuhBmPNA2l yuBxPThnQs9dsE0ff+KD/Pzd86aJ X-Google-Smtp-Source: AG47ELsrC10gpL59aHRHBqN7NquEdGyEjk94HG7iBEAOA9LdiFgZ3CWXUXnmnK5pswd7KtJaIAqXhg== X-Received: by 10.36.129.212 with SMTP id q203mr2294417itd.105.1519198855821; Tue, 20 Feb 2018 23:40:55 -0800 (PST) Original-Received: from tpx ([209.141.62.125]) by smtp.gmail.com with ESMTPSA id 189sm4335460iob.55.2018.02.20.23.40.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Feb 2018 23:40:55 -0800 (PST) In-Reply-To: <83h8qb6kf4.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 21 Feb 2018 06:22:55 +0200") 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:143540 Archived-At: Eli Zaretskii writes: >> On 2/20/18 8:37 PM, Eli Zaretskii wrote: >> >> > I'd need someone (Chris?) to tell which situations cause (t SOMETHING) >> > be put into unread-command-events. If these situations are rare >> > enough, maybe we can risk it. >> >> At least one of the places that do that is sit-for. See the long comment >> at the end of its definition (I don't really understand its last >> sentence, FWIW). It seems to be the only use case in Emacs's source tree, but we can't tell how many packages do this trick in the wild nor can we predict that. > But then how come you have (t t . 45) there? Probably shortly after (t . 45) is unread another call to `sit-for' happens to read it out directly from `unread-command-events', and the event is further unread as (cons t '(t . 45)). Perhaps we may even get something like (t t t . 45) if lucky enough. PS. Many users will stick with the pre-26 releases in the next upcoming years so backporting this fix does not necessarily resolve the problem for company-mode. At least a workaround has to be come up with to deal with the situations where this fix is absent.