From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67837: 29.1.90; inhibit-interaction breaks keyboard macros Date: Sat, 16 Dec 2023 12:18:48 -0500 Message-ID: References: <83le9vnvnn.fsf@gnu.org> <83jzpfnsle.fsf@gnu.org> <83h6kjnrzg.fsf@gnu.org> <83sf42ku3p.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20110"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: sbaugh@janestreet.com, larsi@gnus.org, control@debbugs.gnu.org, 67837@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 16 18:19:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rEYJv-00053F-VY for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Dec 2023 18:19:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEYJb-0000jy-9O; Sat, 16 Dec 2023 12:19:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEYJa-0000ji-4v for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 12:19:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rEYJZ-0001Yv-T0 for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 12:19:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEYJa-0002rl-GU for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 12:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Dec 2023 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67837 X-GNU-PR-Package: emacs Original-Received: via spool by 67837-submit@debbugs.gnu.org id=B67837.170274713811001 (code B ref 67837); Sat, 16 Dec 2023 17:19:02 +0000 Original-Received: (at 67837) by debbugs.gnu.org; 16 Dec 2023 17:18:58 +0000 Original-Received: from localhost ([127.0.0.1]:55881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEYJV-0002rL-VH for submit@debbugs.gnu.org; Sat, 16 Dec 2023 12:18:58 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEYJU-0002qw-B0; Sat, 16 Dec 2023 12:18:57 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 41CAC80B9B; Sat, 16 Dec 2023 12:18:50 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1702747129; bh=4tCQB6x5cG3oaxA/j31O6AKSHzdwf8gxhxOOO0SfmDc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=VowZUT4zzkJdlby0TSWtj2v54/jvFggfGFbpKESI2WeX5FVk7r8eaKLpWntzMT9D7 FhCpZ5HQetE4Xyc5j6lH5OyVEdEPGkJxCTEoBbCx4Fy986rrlTKngsw7Yb1Dc8L9T3 9jkg47JjRd7hwQX3QaUf+ysaUR2nUTqRr301tkigfi28sZXnstYiIU3MsGZfysEJsy fh5dE5wELTLUsLpsHyxDm6/BB8oSSNdvKO8O9NEZrJthE8vu0nHSKYFOKCRPsg2TzF dipbV07SNsn6vyET0St+X6heDU7mVZuRB4v9a7AAVYXGn2S2/ulvVFJ8lo1EY8iAc6 DZH9h9wmZb7tg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1D80C80B02; Sat, 16 Dec 2023 12:18:49 -0500 (EST) Original-Received: from pastel (65-110-221-238.cpe.pppoe.ca [65.110.221.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E032E120DC3; Sat, 16 Dec 2023 12:18:48 -0500 (EST) In-Reply-To: <83sf42ku3p.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Dec 2023 18:08:58 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276365 Archived-At: >> 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