From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Derek Upham via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72433: 29.4; Inconsistent "Loading" message suppression for batch mode Date: Fri, 02 Aug 2024 18:05:59 -0700 Message-ID: <877ccya008.fsf@priss.frightenedpiglet.com> Reply-To: Derek Upham Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12932"; mail-complaints-to="usenet@ciao.gmane.io" To: 72433@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 03 03:07:17 2024 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 1sa3Eq-0003C8-0T for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Aug 2024 03:07:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sa3ES-00057J-66; Fri, 02 Aug 2024 21:06:52 -0400 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 1sa3EL-000571-FU for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 21:06:45 -0400 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 1sa3EL-0008L6-2R for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 21:06:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=YAymU3bWmodo9LHMhsawDaK9Y0NGn3o/zLPb0RQMCqI=; b=LmV/p2idICiQ6QoUEPEUj614bIIu5a174qq8E3JFhZxCxkFFOG8pfc+mT9vEuyaopzsf1rD/R5hu8pyW7fnd+waLk22QmyvkLI1l80ubBGLANtwohSiRaPBOZb0+EkWAevyWwyV99gDx11HspvqlR1G2jkYU/64h2EUJZX9EplX1/UUqwuJEQCB+pOI3jYmlJADWpxl4enOdnJ6+WuHg800AJDrTUGmRC8VkpxnRXUcodImjzq2LYkNb/Tn4lKC7AEdj01AjKJd7wHd+Bp6fJ52B5lzsptYDrFefzw//XH3V18OvkYwYR/ncE8QLS2+uLnqywrRfdiYjMJJUdYrdrg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sa3Ec-0002Ug-G6 for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 21:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Derek Upham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Aug 2024 01:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72433 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17226472019552 (code B ref -1); Sat, 03 Aug 2024 01:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Aug 2024 01:06:41 +0000 Original-Received: from localhost ([127.0.0.1]:53890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sa3EG-0002U0-DI for submit@debbugs.gnu.org; Fri, 02 Aug 2024 21:06:40 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:57420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sa3EC-0002Tp-An for submit@debbugs.gnu.org; Fri, 02 Aug 2024 21:06:38 -0400 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 1sa3Ds-00055y-2v for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 21:06:16 -0400 Original-Received: from wilbur.contactoffice.com ([212.3.242.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sa3Dp-0008IE-4R for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 21:06:15 -0400 Original-Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by wilbur.contactoffice.com (Postfix) with ESMTP id 576E8643 for ; Sat, 3 Aug 2024 03:06:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1722647167; s=20240605-akrp; d=mailfence.com; i=derek_upham@mailfence.com; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=YAymU3bWmodo9LHMhsawDaK9Y0NGn3o/zLPb0RQMCqI=; b=l4nCP7Wrv8K7E5x7OkNFHxqw8huco5NWS7jlqhNhPzOKRG54y5Ue6D2g9iA+LdTj WbGluG3LkeIFgHm/R4LUQIl2Dy/M0VydkngsDFMdvgPy8LcVbAI43Ja0TgIGIzXlbxC 0ETrMrCrBRpwsds9a3TBU3VYDq+jAPadmVmMK3/lRQzXwzlsALf/aGhjnf0dQCMTG3j M0Y4j4jXtRRuMt2mceQqqRW6O7Ps8nzHFFoDrgfpil4gzSeZUgc29kiqVKA6ev5QVSb 9mRoWVYwM8fEaQMoubHemzbHvD6HiVhtsx3PKZupQVlUy4b2rM66yt1qssrWjb50S9R K92o3xAFYQ== Original-Received: by smtp.mailfence.com with ESMTPSA for ; Sat, 3 Aug 2024 03:06:02 +0200 (CEST) Original-Received: from [::1] (helo=priss.frightenedpiglet.com) by priss.frightenedpiglet.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97) (envelope-from ) id 1sa3Dc-00000000hwq-0Hsa for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 18:06:00 -0700 X-ContactOffice-Account: com:175140567 Received-SPF: pass client-ip=212.3.242.68; envelope-from=derek_upham@mailfence.com; helo=wilbur.contactoffice.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:289655 Archived-At: 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@mailfence.com