* bug#458: [PATCH] Restrain the load message when emacs running with --script option
@ 2009-07-05 5:10 Chong Yidong
2009-07-06 14:45 ` Joe Wells
0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2009-07-05 5:10 UTC (permalink / raw)
To: Kazuo YAGI; +Cc: Joe Wells, 458
> This is a very simple patch for "src/lread.c" to restrain emacs to
> printing the load message when running with --script option.
Could you explain why this is a good thing? If the load message is not
desired, the lisp code should call `load' with a NOERROR argument, or
use `require'.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#458: [PATCH] Restrain the load message when emacs running with --script option
2009-07-05 5:10 bug#458: [PATCH] Restrain the load message when emacs running with --script option Chong Yidong
@ 2009-07-06 14:45 ` Joe Wells
2009-07-06 14:52 ` Chong Yidong
0 siblings, 1 reply; 8+ messages in thread
From: Joe Wells @ 2009-07-06 14:45 UTC (permalink / raw)
To: Chong Yidong; +Cc: Kazuo YAGI, 458
Chong Yidong <cyd@stupidchicken.com> writes:
>> This is a very simple patch for "src/lread.c" to restrain emacs to
>> printing the load message when running with --script option.
>
> Could you explain why this is a good thing? If the load message is not
> desired, the lisp code should call `load' with a NOERROR argument, or
> use `require'.
For example, I have an Emacs script that prints these messages in the
middle of its run:
Loading subst-ksc...
Loading subst-gb2312...
Loading subst-big5...
Loading subst-jis...
These are not files I loaded directly. Some package which is not
under the control of ordinary users is loading them.
It is this kind of message that needs to be silenced.
I hope this helps.
--
Joe
P.S. I'm not entirely sure why I got CC-ed on this message, but I'm
happy to comment on it!
--
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#458: [PATCH] Restrain the load message when emacs running with --script option
2009-07-06 14:45 ` Joe Wells
@ 2009-07-06 14:52 ` Chong Yidong
2009-07-09 17:52 ` Joe Wells
0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2009-07-06 14:52 UTC (permalink / raw)
To: Joe Wells; +Cc: Kazuo YAGI, 458
Joe Wells <jbw@macs.hw.ac.uk> writes:
> For example, I have an Emacs script that prints these messages in the
> middle of its run:
>
> Loading subst-ksc...
> Loading subst-gb2312...
> Loading subst-big5...
> Loading subst-jis...
>
> These are not files I loaded directly. Some package which is not
> under the control of ordinary users is loading them.
Could you find out which package is performing this noisy loading?
Normally, packages should use `require', which does not emit messages
when loading.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#458: [PATCH] Restrain the load message when emacs running with --script option
2009-07-06 14:52 ` Chong Yidong
@ 2009-07-09 17:52 ` Joe Wells
2009-07-09 21:51 ` Dan Nicolaescu
0 siblings, 1 reply; 8+ messages in thread
From: Joe Wells @ 2009-07-09 17:52 UTC (permalink / raw)
To: Chong Yidong; +Cc: Kazuo YAGI, 458
Chong Yidong <cyd@stupidchicken.com> writes:
> Joe Wells <jbw@macs.hw.ac.uk> writes:
>
>> For example, I have an Emacs script that prints these messages in the
>> middle of its run:
>>
>> Loading subst-ksc...
>> Loading subst-gb2312...
>> Loading subst-big5...
>> Loading subst-jis...
>>
>> These are not files I loaded directly. Some package which is not
>> under the control of ordinary users is loading them.
>
> Could you find out which package is performing this noisy loading?
> Normally, packages should use `require', which does not emit messages
> when loading.
Sorry, don't have time to track this down. Other packages have other
problems. For example, on another system, I have a Emacs script that
emits these messages:
Loading /usr/share/emacs/site-lisp/site-start.d/auctex-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/auctex.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/ess-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/igrep-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/logo-mode.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/preview-latex.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/psgml-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)...
Loading /usr/local/share/emacs/site-lisp/sml-mode/sml-mode-startup.el (source)...
Loading subst-ksc...
Loading subst-gb2312...
Loading subst-big5...
Loading subst-jis...
Loading quail/latin-ltx...
Loading vc-cvs...
In this case, a bunch of extra loading messages get printed by
site-specific initialization files that come with extra packages (from
Fedora).
(By the way, I don't know what is printing the 3 blank lines in the
middle of the messages above.)
In general, it would be nice if there was a global variable which when
non-nil means “don't print any loading messages at all right now” and
if using the --script command-line option set this variable to t.
I hope this message helps.
--
Joe
--
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#458: [PATCH] Restrain the load message when emacs running with --script option
2009-07-09 17:52 ` Joe Wells
@ 2009-07-09 21:51 ` Dan Nicolaescu
2012-04-11 12:15 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2009-07-09 21:51 UTC (permalink / raw)
To: Joe Wells; +Cc: Chong Yidong, Kazuo YAGI, 458
Joe Wells <jbw@macs.hw.ac.uk> writes:
> Chong Yidong <cyd@stupidchicken.com> writes:
>
> > Joe Wells <jbw@macs.hw.ac.uk> writes:
> >
> >> For example, I have an Emacs script that prints these messages in the
> >> middle of its run:
> >>
> >> Loading subst-ksc...
> >> Loading subst-gb2312...
> >> Loading subst-big5...
> >> Loading subst-jis...
> >>
> >> These are not files I loaded directly. Some package which is not
> >> under the control of ordinary users is loading them.
> >
> > Could you find out which package is performing this noisy loading?
> > Normally, packages should use `require', which does not emit messages
> > when loading.
>
> Sorry, don't have time to track this down. Other packages have other
> problems. For example, on another system, I have a Emacs script that
> emits these messages:
>
> Loading /usr/share/emacs/site-lisp/site-start.d/auctex-init.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/auctex.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/ess-init.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/igrep-init.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/logo-mode.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/preview-latex.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/psgml-init.el (source)...
> Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)...
> Loading /usr/local/share/emacs/site-lisp/sml-mode/sml-mode-startup.el (source)...
These looks like a Fedora (or RedHat system) system, site-start.el loads
these files.
site-start.el is not provided by emacs, but by the distribution.
You can ask them to use the NOMESSAGE argument to `load' ...
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#458: [PATCH] Restrain the load message when emacs running with --script option
2009-07-09 21:51 ` Dan Nicolaescu
@ 2012-04-11 12:15 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-11 12:15 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: 458, Joe Wells, Kazuo YAGI
Dan Nicolaescu <dann@ics.uci.edu> writes:
> site-start.el is not provided by emacs, but by the distribution.
> You can ask them to use the NOMESSAGE argument to `load' ...
Yeah, this seems like a bug in the Fedora setup, and not something that
needs fixing in Emacs, so I'm closing this report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.13668.1214062038.18990.bug-gnu-emacs@gnu.org>]
* bug#458: [PATCH] Restrain the load message when emacs running with --script option
@ 2008-06-21 15:15 Kazuo YAGI
0 siblings, 0 replies; 8+ messages in thread
From: Kazuo YAGI @ 2008-06-21 15:15 UTC (permalink / raw)
To: bug-gnu-emacs,
八木和生(会社)
[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]
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
[-- Attachment #2: restrain-load-message.patch --]
[-- Type: text/x-diff, Size: 471 bytes --]
--- 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)...",
[-- Attachment #3: cat.el --]
[-- Type: text/plain, Size: 166 bytes --]
#!/usr/local/bin/emacs --script
(dolist (file command-line-args-left)
(with-current-buffer (find-file-noselect file)
(send-string-to-terminal (buffer-string))))
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-04-11 12:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-05 5:10 bug#458: [PATCH] Restrain the load message when emacs running with --script option Chong Yidong
2009-07-06 14:45 ` Joe Wells
2009-07-06 14:52 ` Chong Yidong
2009-07-09 17:52 ` Joe Wells
2009-07-09 21:51 ` Dan Nicolaescu
2012-04-11 12:15 ` Lars Magne Ingebrigtsen
[not found] <mailman.13668.1214062038.18990.bug-gnu-emacs@gnu.org>
2008-06-22 8:48 ` Joe Wells
-- strict thread matches above, loose matches on Subject: below --
2008-06-21 15:15 Kazuo YAGI
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.