[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#54371: 29.0.50; read-char does not reset idle timer in some cases
From: |
Eli Zaretskii |
Subject: |
bug#54371: 29.0.50; read-char does not reset idle timer in some cases |
Date: |
Fri, 01 Apr 2022 22:36:12 +0300 |
> From: Ignacio Casso <ignaciocasso@hotmail.com>
> Cc: larsi@gnus.org, 54371@debbugs.gnu.org
> Date: Fri, 01 Apr 2022 20:22:00 +0200
>
>
> 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.
Please send the patch, and let's take it from there.
Thanks.