From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jack Kelly Newsgroups: gmane.emacs.help Subject: Silently loading site files in -batch mode Date: Mon, 6 Aug 2012 08:02:38 +1000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1344204166 22075 80.91.229.3 (5 Aug 2012 22:02:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Aug 2012 22:02:46 +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 00:02:47 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 1Sy8uM-0001RF-Ia for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Aug 2012 00:02:46 +0200 Original-Received: from localhost ([::1]:52053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sy8uL-0000ZZ-Sz for geh-help-gnu-emacs@m.gmane.org; Sun, 05 Aug 2012 18:02:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sy8uH-0000ZT-3G for help-gnu-emacs@gnu.org; Sun, 05 Aug 2012 18:02:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sy8uF-0004Ui-VJ for help-gnu-emacs@gnu.org; Sun, 05 Aug 2012 18:02:41 -0400 Original-Received: from mail-wi0-f177.google.com ([209.85.212.177]:63989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sy8uF-0004Ua-O1 for help-gnu-emacs@gnu.org; Sun, 05 Aug 2012 18:02:39 -0400 Original-Received: by wibhm11 with SMTP id hm11so861725wib.12 for ; Sun, 05 Aug 2012 15:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=4PF3T+IpnOuZDKBhXslu2K4avtrUyr6ALQPOxpbQhHU=; b=0qL8feS1Kh58dPboM7x25VsR07aOXI8N42Vl1rwn7tDurPwO3owJBCHZ8Op17/amej xDUCI4ucuTEQvkoBQb4y2aCbnfH9ubbEJhQWpvyzogzf0pwNUwnFbp5/NbJSPSeBcqRq EJQwYydDJYMN6QpD494iUwseUwNpk/D3GNBc2VhkYuaSNvQHkAJTa0ao9MFqtw93VoHW u8gZyf+qcxKu5o9uUrKxOfSgeB2Dfdg8pcKatRfUoPK7E+w5hahZ9cUejqrck48XzGEY ieEZHEfBG/L7iY9ACNV9XcTtRzAd39UOY9S/6G/rF3oQGVn3wjl3Y46rC+lOdz07lsOx MNtA== Original-Received: by 10.180.97.106 with SMTP id dz10mr13033840wib.21.1344204158359; Sun, 05 Aug 2012 15:02:38 -0700 (PDT) Original-Received: by 10.194.93.196 with HTTP; Sun, 5 Aug 2012 15:02:38 -0700 (PDT) X-Google-Sender-Auth: fVrQX4mP1dKsOnTYC-sdtYlt7lU X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.177 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:86214 Archived-At: (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