GNU bug report logs -
#458
[PATCH] Restrain the load message when emacs running with --script option
Previous Next
Reported by: Kazuo YAGI <kyagi <at> miraclelinux.com>
Date: Sat, 21 Jun 2008 15:20:03 UTC
Severity: wishlist
Tags: patch
Merged with 4237
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi guys,
This is a very simple patch for "src/lread.c" to restrain emacs
to printing the load message when running with --script option.
I also attached the test script(cat.el) to reproduce this bug,
and show how emacs works before/after applying this patch below.
/// BEFORE PATCHED ///////////////////////////////////////////////////
$ ./cat.el cat.el
Loading subst-ksc...
Loading subst-gb2312...
Loading subst-big5...
Loading subst-jis...
#!/usr/local/bin/emacs --script
(dolist (file command-line-args-left)
(with-current-buffer (find-file-noselect file)
(send-string-to-terminal (buffer-string))))
/// AFTER PATCHED ///////////////////////////////////////////////////
$ ./cat.el cat.el
#!/usr/local/bin/emacs --script
(dolist (file command-line-args-left)
(with-current-buffer (find-file-noselect file)
(send-string-to-terminal (buffer-string))))
Thanks,
- Kazuo YAGI
; In GNU Emacs 22.2.2 (i686-pc-linux-gnu)
; of 2008-06-21 on teresa
; Windowing system distributor `The X.Org Foundation', version 11.0.10400090
[restrain-load-message.patch (text/x-diff, inline)]
--- emacs-22.2/src/lread.c 2008-01-10 21:16:15.000000000 +0900
+++ emacs-22.2tmp/src/lread.c 2008-06-21 22:20:52.000000000 +0900
@@ -1003,7 +1003,7 @@ Return t if the file exists and loads su
if (! NILP (Vpurify_flag))
Vpreloaded_file_list = Fcons (file, Vpreloaded_file_list);
- if (NILP (nomessage))
+ if (!noninteractive && NILP (nomessage))
{
if (!safe_p)
message_with_string ("Loading %s (compiled; note unsafe, not compiled in Emacs)...",
[cat.el (text/plain, inline)]
#!/usr/local/bin/emacs --script
(dolist (file command-line-args-left)
(with-current-buffer (find-file-noselect file)
(send-string-to-terminal (buffer-string))))
This bug report was last modified 13 years and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.