From: Jack Kelly <jack@jackkelly.name>
To: help-gnu-emacs@gnu.org
Subject: Silently loading site files in -batch mode
Date: Mon, 6 Aug 2012 08:02:38 +1000 [thread overview]
Message-ID: <CAEnY7O-tiDmaQvHT=fHWuBKqCJHbVg+tKKyyfmR86LKd1GVzcg@mail.gmail.com> (raw)
(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
next reply other threads:[~2012-08-05 22:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-05 22:02 Jack Kelly [this message]
2012-08-06 5:25 ` Silently loading site files in -batch mode Andreas Röhler
2012-08-06 8:23 ` Jack Kelly
2012-08-06 10:33 ` Andreas Röhler
2012-08-06 15:55 ` Doug Lewan
2012-08-06 23:17 ` Jack Kelly
2012-08-07 3:38 ` PJ Weisberg
2012-08-07 3:57 ` Jack Kelly
2012-08-07 4:49 ` PJ Weisberg
2012-08-07 5:05 ` Jack Kelly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEnY7O-tiDmaQvHT=fHWuBKqCJHbVg+tKKyyfmR86LKd1GVzcg@mail.gmail.com' \
--to=jack@jackkelly.name \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).