From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jadamson@partners.org (Joel J. Adamson) Newsgroups: gmane.emacs.help Subject: Suppressing load messages (was: batch mode) Date: Wed, 12 Mar 2008 10:50:58 -0400 Message-ID: <87od9katd9.fsf_-_@W0053328.mgh.harvard.edu> References: <87tzjo3asi.fsf@thalassa.informatimago.com> <87y78p2c4h.fsf@wivenhoe.staff8.ul.ie> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1205333528 14698 80.91.229.12 (12 Mar 2008 14:52:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Mar 2008 14:52:08 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: brendan.halpin@ul.ie Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 12 15:52:32 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JZSJd-0002wW-FR for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Mar 2008 15:52:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZSIz-0003nJ-ND for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Mar 2008 10:51:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZSIk-0003nB-VL for help-gnu-emacs@gnu.org; Wed, 12 Mar 2008 10:51:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZSId-0003me-Dj for help-gnu-emacs@gnu.org; Wed, 12 Mar 2008 10:51:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZSId-0003mb-6R for help-gnu-emacs@gnu.org; Wed, 12 Mar 2008 10:51:23 -0400 Original-Received: from phsmgmx9.partners.org ([155.52.251.100]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1JZSIY-0007tb-7Q for help-gnu-emacs@gnu.org; Wed, 12 Mar 2008 10:51:22 -0400 X-IronPort-AV: E=Sophos;i="4.25,488,1199682000"; d="scan'208";a="115684855" Original-Received: from phsxcon3.mgh.harvard.edu (HELO PHSXCON3.partners.org) ([132.183.130.41]) by phsmgmx9.partners.org with ESMTP; 12 Mar 2008 10:51:00 -0400 Original-Received: from PHSXMB8.partners.org ([170.223.201.47]) by PHSXCON3.partners.org with Microsoft SMTPSVC(6.0.3790.3959); Wed, 12 Mar 2008 10:51:00 -0400 Original-Received: from W0053328.mgh.harvard.edu.partners.org ([132.183.29.121]) by PHSXMB8.partners.org with Microsoft SMTPSVC(6.0.3790.3959); Wed, 12 Mar 2008 10:51:00 -0400 In-Reply-To: <87y78p2c4h.fsf@wivenhoe.staff8.ul.ie> (Brendan Halpin's message of "Tue, 11 Mar 2008 21:18:22 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-OriginalArrivalTime: 12 Mar 2008 14:51:00.0234 (UTC) FILETIME=[7C9356A0:01C88450] X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52293 Archived-At: Brendan Halpin writes: > Can I hijack the thread to ask if there is a way of suppressing the No, you may not ;) > "Loading" and related start-up messages when using the > #!/usr/bin/emacs --script convention? > > At present this: > ------------------------------------------------------------------- > #!/usr/bin/emacs --script > (princ "Hello World!\n") > ------------------------------------------------------------------- > > generates the following output: > ------------------------------------------------------------------- > brendan@annacotty:/tmp$ ./hw.el > Loading 00debian-vars... > Loading /etc/emacs-snapshot/site-start.d/50auctex.el (source)... > Loading /usr/share/emacs/23.0.50/site-lisp/auctex.el (source)... > Loading /usr/share/emacs/23.0.50/site-lisp/preview-latex.el (source)... > Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... > Skipping dictionaries-common setup for emacs-snapshot > Loading /etc/emacs/site-start.d/50gcl.el (source)... > Loading /etc/emacs/site-start.d/50slime.el (source)... > Loading /usr/share/emacs-snapshot/site-lisp/slime/slime-autoloads... This is all STDERR, i.e. the *Messages* buffer. If you redirect STDERR or STDOUT, you can suppress the messages, or capture the output in a file. For example, "hello 2 cat hello.el | #!/usr/bin/emacs --script | (message "this is garbage!\n") | (princ "Hello, Is it me you're looking for?\n") | | /home/joel/lisp/el: ZShell> ./hello.el | this is garbage! | | Hello, Is it me you're looking for? | /home/joel/lisp/el: ZShell> ./hello.el 2 Adding options like -q and --no-site-file to the bang line don't seem to > have any effect, and this makes Emacs unattractive for small scripts. Only if all you want is STDOUT. If you want to use 'emacs --script' for non-interactive editing a la sed and awk, then it's perfect: load those files into buffers, edit them and save them. Joel -- Joel J. Adamson Biostatistician Pediatric Psychopharmacology Research Unit Massachusetts General Hospital Boston, MA 02114 (617) 643-1432 (303) 880-3109 The information transmitted in this electronic communication is intended only for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this information in error, please contact the Compliance HelpLine at 800-856-1983 and properly dispose of this information.