From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#21867: 25.0.50; lossage's log doesn't treat characters read by read-char as separate commands Date: Fri, 02 Aug 2019 16:16:37 -0400 Message-ID: References: <87blx8iwwm.fsf@mouse.gnus.org> <83o918hhli.fsf@gnu.org> <87tvb0hgov.fsf@mouse.gnus.org> <83mugshg86.fsf@gnu.org> <877e7whfv9.fsf@mouse.gnus.org> <83lfwcheyy.fsf@gnu.org> <87k1bwg01u.fsf@mouse.gnus.org> <83ef24gjby.fsf@gnu.org> <8736ijak7u.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="94534"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 21867@debbugs.gnu.org, zkanfer@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 02 22:17:20 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htdzL-000OOb-Ft for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Aug 2019 22:17:20 +0200 Original-Received: from localhost ([::1]:37312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htdzJ-0000Rt-Oe for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Aug 2019 16:17:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58693) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htdzA-0000RW-Gr for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 16:17:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htdz7-0003JE-MR for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 16:17:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49007) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htdz4-0003Fj-Ff for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 16:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1htdz4-0006YA-9c for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 16:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Aug 2019 20:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21867 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed patch Original-Received: via spool by 21867-submit@debbugs.gnu.org id=B21867.156477700724381 (code B ref 21867); Fri, 02 Aug 2019 20:17:02 +0000 Original-Received: (at 21867) by debbugs.gnu.org; 2 Aug 2019 20:16:47 +0000 Original-Received: from localhost ([127.0.0.1]:57828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htdyp-0006Kt-58 for submit@debbugs.gnu.org; Fri, 02 Aug 2019 16:16:47 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htdyn-0006F0-4g for 21867@debbugs.gnu.org; Fri, 02 Aug 2019 16:16:45 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C5499445C32; Fri, 2 Aug 2019 16:16:39 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7EEAB445C30; Fri, 2 Aug 2019 16:16:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1564776998; bh=1CIuPnsrW54vO/joHyjFG3XwiUNX02b87z9wDtMVWnA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=plvE/czn2Vf1lG8X2LuHNPJcdgyA4JDTW8WnBXpCnGgam/OiUe8GUY4l080ElGyPg Pmgnc9JrIimOxv2oK27PxmM/g2n7ekFic1C7pxe5q59pTdNZwbzPGylGpxWWpyxl+R q3EZUFqPPndP5oXEN1nx920DEGPWK986P2NiEDU8U4QF3yF1mHBfF+8jqu9tKa97k9 07gE64nckIaCxeCaOiWsz0i8/p2LOK45Dji8NJTRHiaei27bPWWhBiJmIBlA+CMxHA M96Q3589WvavSVd9mAPB5ktLEbAQ9jx99EvQfvbJj+Zh5JKORd5Kz2+houEVWa3rpy GkHyDFOMdoFdg== Original-Received: from pastel (unknown [45.72.135.224]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 282341202D5; Fri, 2 Aug 2019 16:16:38 -0400 (EDT) In-Reply-To: <8736ijak7u.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Fri, 02 Aug 2019 13:19:01 +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: 209.51.188.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:164394 Archived-At: > retry: > do > - val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0, > - NUMBERP (seconds) ? &end_time : NULL); > + { > + val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0, > + NUMBERP (seconds) ? &end_time : NULL); > + record_char (Qnon_command_character); > + } Currently, the view-lossage doesn't actually say `a C-h l` resulted in running view-lossage contrarily to what Lars seems to assume (and I guess, contrarily to what the display suggests). Instead it just says we saw `a` then `C-h` then `l` then view-lossage was run I think considering this problem as specific to `read-char` is kinda wrong (after all, `read-char` can be called as part of input-decode-map in which case the event still very much belongs to "the events that resulted in running a particular command"; this happens for example for mouse-clicks in xterm-mouse-mode). So I think maybe a better way to look at it is to add marker pseudo-events like `end-of-command` (e.g. after running post-command-hook), so we can discover that `a` was processed as part of the execution of the command bound to `C-x C-e` rather than as part of the sequence of events that triggered view-lossage. Stefan