GNU bug report logs - #72433
29.4; Inconsistent "Loading" message suppression for batch mode

Previous Next

Package: emacs;

Reported by: Derek Upham <derek_upham <at> mailfence.com>

Date: Sat, 3 Aug 2024 01:07:02 UTC

Severity: normal

Tags: notabug, wontfix

Found in version 29.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72433 in the body.
You can then email your comments to 72433 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#72433; Package emacs. (Sat, 03 Aug 2024 01:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Derek Upham <derek_upham <at> mailfence.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 03 Aug 2024 01:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Derek Upham <derek_upham <at> mailfence.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.4; Inconsistent "Loading" message suppression for batch mode
Date: Fri, 02 Aug 2024 18:05:59 -0700
The relevant function is "load" (a.k.a "Fload").

The relevant file is "src/lread.c".

This exists in the current emacs-30 branch HEAD commit 94fe5894d99.

The function "load" has two code blocks that display progress messages
when loading files.  First:

  if (NILP (nomessage) || force_load_messages)
    {
      if (is_module)
        message_with_string ("Loading %s (module)...", file, 1);
      else if (is_native_elisp)
        message_with_string ("Loading %s (native compiled elisp)...", file, 1);
      else if (!compiled)
	message_with_string ("Loading %s (source)...", file, 1);
      else if (newer)
	message_with_string ("Loading %s (compiled; note, source file is newer)...",
		 file, 1);
      else /* The typical case; compiled file newer than source file.  */
	message_with_string ("Loading %s...", file, 1);
    }

Second:

  if (!noninteractive && (NILP (nomessage) || force_load_messages))
    {
      if (is_module)
        message_with_string ("Loading %s (module)...done", file, 1);
      else if (is_native_elisp)
	message_with_string ("Loading %s (native compiled elisp)...done", file, 1);
      else if (!compiled)
	message_with_string ("Loading %s (source)...done", file, 1);
      else if (newer)
	message_with_string ("Loading %s (compiled; note, source file is newer)...done",
		 file, 1);
      else /* The typical case; compiled file newer than source file.  */
	message_with_string ("Loading %s...done", file, 1);
    }

This pair follows the standard Emacs practice of an initial progress
message, a long activity, and then then the same message with "done" on
the end.

The second block's test skips the body if the "noninteractive" flag is
set.  (The "-batch" command line argument sets that flag, in "main()".)
But the first block's test does not take "noninteractive" into account.
That means that batch mode produces loading "half-messages".

  Loading /etc/emacs/site-start.d/00debian.el (source)...
  Loading /etc/emacs/site-start.d/50autoconf.el (source)...
  Loading /etc/emacs/site-start.d/50bbdb3.el (source)...

We probably want consistent non-display in batch mode, which we can get
by adding a similar "!noninteractive" test to the first progress block.




In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.42,
 cairo version 1.18.0) of 2024-06-29, modified by Debian built on sbuild
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/libexec
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/29.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/29.4/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils
 --with-native-compilation --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/libexec
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/29.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/29.4/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils
 --with-native-compilation --with-cairo --with-x=yes
 --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -Werror=implicit-function-declaration
 -ffile-prefix-map=/build/reproducible-path/emacs-29.4+1=. -fstack-protector-strong
 -fstack-clash-protection -Wformat -Werror=format-security
 -fcf-protection -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
 LDFLAGS=-Wl,-z,relro'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2
XPM GTK3 ZLIB

-- 
Derek Upham
derek_upham <at> mailfence.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72433; Package emacs. (Sat, 03 Aug 2024 06:06:01 GMT) Full text and rfc822 format available.

Message #8 received at 72433 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Derek Upham <derek_upham <at> mailfence.com>
Cc: 72433 <at> debbugs.gnu.org
Subject: Re: bug#72433: 29.4;
 Inconsistent "Loading" message suppression for batch mode
Date: Sat, 03 Aug 2024 09:04:55 +0300
tags 72433 notabug wontfix
thanks

> Date: Fri, 02 Aug 2024 18:05:59 -0700
> From:  Derek Upham via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 
> The second block's test skips the body if the "noninteractive" flag is
> set.  (The "-batch" command line argument sets that flag, in "main()".)
> But the first block's test does not take "noninteractive" into account.
> That means that batch mode produces loading "half-messages".
> 
>   Loading /etc/emacs/site-start.d/00debian.el (source)...
>   Loading /etc/emacs/site-start.d/50autoconf.el (source)...
>   Loading /etc/emacs/site-start.d/50bbdb3.el (source)...

Yes, and this is done on purpose: in batch mode the second line is
redundant because all the lines remain visible on the screen, whereas
in the interactive case the user can only see the last message (in the
echo area), and thus leaving the "Loading..." message there could be
misinterpreted as if the load is still in progress.

> We probably want consistent non-display in batch mode, which we can get
> by adding a similar "!noninteractive" test to the first progress block.

No, we don't want consistency in this case, at least not this kind of
consistency.

This is not a bug.




Added tag(s) wontfix and notabug. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 03 Aug 2024 06:06:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72433; Package emacs. (Sat, 03 Aug 2024 16:09:01 GMT) Full text and rfc822 format available.

Message #13 received at 72433 <at> debbugs.gnu.org (full text, mbox):

From: Derek Upham <derek_upham <at> mailfence.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72433 <at> debbugs.gnu.org
Subject: Re: bug#72433: 29.4; Inconsistent "Loading" message suppression for
 batch mode
Date: Sat, 3 Aug 2024 18:08:02 +0200 (CEST)
[Message part 1 (text/plain, inline)]
On Aug 2, 2024 at 11:04 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:Yes, and this is done on purpose: in batch mode the second line is
redundant because all the lines remain visible on the screen, whereas
in the interactive case the user can only see the last message (in the
echo area), and thus leaving the "Loading..." message there could be
misinterpreted as if the load is still in progress.
Got it.  Is it worth turning this into a code comment, before that second block?

/* Support interactive users with extra progress messages,
   following minibuffer conventions. */

-- 
Sent with https://mailfence.com
Secure and private email
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 04 Aug 2024 09:00:01 GMT) Full text and rfc822 format available.

Notification sent to Derek Upham <derek_upham <at> mailfence.com>:
bug acknowledged by developer. (Sun, 04 Aug 2024 09:00:02 GMT) Full text and rfc822 format available.

Message #18 received at 72433-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Derek Upham <derek_upham <at> mailfence.com>
Cc: 72433-done <at> debbugs.gnu.org
Subject: Re: bug#72433: 29.4; Inconsistent "Loading" message suppression for
 batch mode
Date: Sun, 04 Aug 2024 11:58:47 +0300
> Date: Sat, 3 Aug 2024 18:08:02 +0200 (CEST)
> From: Derek Upham <derek_upham <at> mailfence.com>
> Cc: 72433 <at> debbugs.gnu.org
> 
> Got it.  Is it worth turning this into a code comment, before that second block?
> 
> /* Support interactive users with extra progress messages,
>    following minibuffer conventions. */

Done, and closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 01 Sep 2024 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 288 days ago.

Previous Next


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