GNU bug report logs - #59317
29.0.50; Feature idea: suppress `message' output in ert batch test output

Previous Next

Package: emacs;

Reported by: Matt Armstrong <matt <at> rfc20.org>

Date: Wed, 16 Nov 2022 18:53:01 UTC

Severity: wishlist

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Matt Armstrong <matt <at> rfc20.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 59317 <at> debbugs.gnu.org
Subject: bug#59317: 29.0.50; Feature idea: suppress `message' output in ert batch test output
Date: Wed, 16 Nov 2022 21:51:46 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Matt Armstrong <matt <at> rfc20.org>
>> Date: Wed, 16 Nov 2022 10:52:11 -0800
>>
>> A good number of Emacs tests exercise parts of Emacs that call
>> `message'.
>
> Are you sure?  Many Emacs features display text that doesn't go
> through 'message'.
>
>> Idea: hide `message' output when running in batch mode, printing them
>> only for failed tests.
>
> We have set-message-function that could be used for this purpose, I
> think?  If indeed 'message' is the culprit.

It looks like the set-message-function(s) hooks are bypassed in
non-interactive mode.  In that case message3_nolog in xdisp.c calls
message_to_stderr, instead of calling set_message.  It is set_message
that ultimately uses the set-message-function machinery.

After looking at this more I agree with your suspicions.  It looks like
good amount of C level code calls various message functions without
going through Fmessage.  Also, I spot no easy way to modify ert.el to
temporarily redirect stderr elsewhere.  In noninteractive mode Emacs
seems hard coded to print to stderr.

I proposed this thinking it would be an easy and simple change.  At this
point I'm thinking the effort and complexity here isn't worth it.  If
nobody else wants to champion this idea I'll go ahead and close it.




This bug report was last modified 2 years and 204 days ago.

Previous Next


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