GNU bug report logs - #21867
25.0.50; lossage's log doesn't treat characters read by read-char as separate commands

Previous Next

Package: emacs;

Reported by: Zachary Kanfer <zkanfer <at> gmail.com>

Date: Mon, 9 Nov 2015 04:59:01 UTC

Severity: minor

Tags: confirmed

Found in version 25.0.50

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 21867 <at> debbugs.gnu.org, zkanfer <at> gmail.com
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
>   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





This bug report was last modified 5 years and 297 days ago.

Previous Next


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