From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Silently loading site files in -batch mode Date: Mon, 06 Aug 2012 07:25:02 +0200 Message-ID: <501F552E.1020101@easy-emacs.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344230720 16213 80.91.229.3 (6 Aug 2012 05:25:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2012 05:25:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 06 07:25:21 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SyFoe-0002Gp-Ej for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Aug 2012 07:25:20 +0200 Original-Received: from localhost ([::1]:39337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyFod-00019d-ME for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Aug 2012 01:25:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyFoY-00019Y-AY for help-gnu-emacs@gnu.org; Mon, 06 Aug 2012 01:25:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyFoX-0005C3-3I for help-gnu-emacs@gnu.org; Mon, 06 Aug 2012 01:25:14 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.171]:57535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyFoW-0005Bz-Pe for help-gnu-emacs@gnu.org; Mon, 06 Aug 2012 01:25:13 -0400 Original-Received: from [192.168.178.27] (brln-4db9f23d.pool.mediaWays.net [77.185.242.61]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0LeSUf-1TYR232U9d-00qAvv; Mon, 06 Aug 2012 07:25:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-Provags-ID: V02:K0:kdPmcVIgcTdjN6PuN5iO7dd0uARsm51vxp1JvIuIrG3 5QF9e/hyCGHfvzikUtZMR6U5Tgffb3+1QDdz4h6+NndClcTybG h35eoyw3oB7AYQeDA0Ocb/HlLY0wqSaHCWO/HTS6ZQRSTdyfRM 7Eqfd71PwQX4+LdaJLqJaOYxbNOmNzzy6I0TWFyrPwP0gQylV9 /Z8g9dZ5PSWMrRQJm/gKgtxxjLnW866HTvWNoehFAR8jxPB8uK MumxakCAP3OgACG93pBvZU3pkyyp8ItQjp9ysUCu/ae067BRIo 0Y+GrkGjpCqrFQmdnAAdflghwdAoeNLDFRDrcAw209WL0mwMW8 q2tiLBWIDy+BRKgkfPqMDrbIYFmBDEIdfHU+PE7Bx X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.126.171 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86216 Archived-At: Am 06.08.2012 00:02, schrieb Jack Kelly: > (Please CC me in replies - I'm not subscribed.) > > Hello again list, > > I'm still trying to make batchmode emacs silently load site files. > Despite the warnings about advising builtins, advising `load' so that > it is always called with `NOMESSAGE' works: > > (defadvice load (before quiet-loading activate) > (ad-set-arg 2 t)) > > However, making sure that this advice is added before anything is > loaded is not easy. I have tried adding it to `before-init-hook' and > dumping a new emacs, but calling dump-emacs causes a segfault. > Apparently dumping a dumped emacs ceased to work years ago[1]. > > My other approach was to invoke emacs with -Q, advise `load' and then > load site-run-file. That doesn't work either, as with -Q, > site-run-file is undefined: > > $ emacs -Q -batch -eval "(print site-run-file)" > > nil > $ > > (As I'm writing this code for automake, I could check site-run-file > during configure and save it, but that's not the main problem.) > > Unfortunately, debian has seen fit to patch lisp/startup.el[2], which > means that to correctly load everything now means checking if it's a > debianised emacs (and other distros could cause similar mischief). > > Are there any other command-line flags or environment variables that I > could use to silence the initial loading messages? If not, are there > any in the development pipeline? > > Thanks, > > -- Jack > > [1]: http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-02/msg00207.html > [2]: http://patch-tracker.debian.org/patch/series/view/emacs24/24.1+1-4/0002-Run-debian-startup-and-set-debian-emacs-flavor.patch > > $EMACS -Q --batch --eval "(load \"MY-FILE\" nil t)" Maybe like that?