From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: sbaugh@janestreet.com, larsi@gnus.org, control@debbugs.gnu.org,
67837@debbugs.gnu.org
Subject: bug#67837: 29.1.90; inhibit-interaction breaks keyboard macros
Date: Sat, 16 Dec 2023 12:18:48 -0500 [thread overview]
Message-ID: <jwvy1du137y.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83sf42ku3p.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Dec 2023 18:08:58 +0200")
>> Basically, I think since our test suite runs just fine in batch, we
>> should be able to run it with inhibit-interaction=t as well (which
>> would fix annoying problems when some test fails and ends up waiting
>> for user input).
> In general, yes. But the test suite can also be run interactively,
That's fine. My goal is to bind it in `ert-run-tests-batch-and-exit` or
as close to that as possible.
>> Note that trying to make the whole test suite runs with
>> `inhibit-interaction` non-nil is not at all straightforward, sadly:
>> there are several places where we do call things like `read-event`
>> without providing any keyboard input (i.e. without
>> `unread-command-event` or keyboard macros) and instead use a timeout
>> because this `read-event` is just there to force Emacs to wait while
>> some external process sends us some reply. Should these be considered
>> "interaction"? If not, then we open up a whole where some code may call
>> `read-event` with a relatively short timeout within a tight loop where
>> the purpose *is* to get user input and where the timeout is only present
>> to keep something else updated while we wait for that user's input.
>
> I see no reason to insist that everything in the test suite _must_ be
> runnable with inhibit-interaction non-nil.
As mentioned, my motivation is to better handle tests that hang instead
of failing. It's hard to know beforehand which ones of those tests
will/may do that. Also, where could we let-bind `inhibit-interaction`
such that it only affects those tests we decide need it?
> The only purpose of the test suite is to test whatever each test is
> testing, there are no other requirements. The code could be not very
> clean; if it does the job, that is fine from where I stand.
That's my opinion as well, and in my opinion `inhibit-interaction` is
mostly meant for tests, so in my current local patch that tries to make
it work for the whole test suite, I made that variable fairly lenient
(it doesn't signal an error if you `read-event` with a timeout).
Stefan
next prev parent reply other threads:[~2023-12-16 17:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 16:48 bug#67837: 29.1.90; inhibit-interaction breaks keyboard macros Spencer Baugh
2023-12-15 16:50 ` Spencer Baugh
2023-12-15 18:54 ` Eli Zaretskii
2023-12-15 19:48 ` Spencer Baugh
2023-12-15 20:01 ` Eli Zaretskii
2023-12-15 20:09 ` Spencer Baugh
2023-12-16 7:02 ` Eli Zaretskii
2023-12-16 13:22 ` sbaugh
2023-12-16 13:57 ` Eli Zaretskii
2023-12-15 20:14 ` Eli Zaretskii
2023-12-15 20:39 ` Spencer Baugh
2023-12-16 7:14 ` Eli Zaretskii
2023-12-16 15:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-16 16:08 ` Eli Zaretskii
2023-12-16 17:18 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-02-16 22:26 ` Spencer Baugh
2024-02-16 23:27 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-17 7:53 ` Eli Zaretskii
2024-02-17 14:13 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-17 14:35 ` Eli Zaretskii
2024-02-17 14:43 ` Eli Zaretskii
2024-02-17 15:15 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-17 16:07 ` Eli Zaretskii
2024-02-17 7:37 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvy1du137y.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=67837@debbugs.gnu.org \
--cc=control@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=sbaugh@janestreet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.