GNU bug report logs -
#54371
29.0.50; read-char does not reset idle timer in some cases
Previous Next
Reported by: Ignacio Casso <ignaciocasso <at> hotmail.com>
Date: Sun, 13 Mar 2022 08:47:01 UTC
Severity: normal
Tags: moreinfo
Found in version 29.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 54371 <at> debbugs.gnu.org (full text, mbox):
Hi again,
Since my other bug report has already been closed, I've picked up again
the next one in my pending list, which was this one.
> However, I still think this should be documented somewhere. The only
> thing I found was a comment in keyboard.c, and that was only after you
> pointed me to the right email thread.
After searching again, I've seen that this behavior is indeed documented
in the section of the Emacs Lisp manual describing `read-event'.
>
> And this is not only about the use of read-event inside timer
> functions. Currently the Idle Timers section of the manual would make
> any reader think that these two forms would produce the output "A\nB" if
> the user takes a few seconds to input a character, but only the first
> one would.
>
> (progn
> (run-with-idle-timer 1 nil (lambda () (message "A")))
> (read-char "Please wait for 2 seconds" nil nil)
> (message "B"))
>
> (progn
> (run-with-idle-timer 1 nil (lambda () (message "A")))
> (read-char "Please wait for 2 seconds" nil 20)
> (message "B"))
>
> So as I see it, the manual is incorrect right now, or at best incomplete
> or ambiguous, and a footnote could not hurt. What do you think?
So unless you see a problem with this, you can close this bug report. Or
if you want, I can send a patch to update that section of the manual
with a footnote, and maybe some other relevant docstrings.
This bug report was last modified 3 years and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.