Article View: gnu.emacs.bug
Article #100105Clarification of "emacs -batch" problem with 'require
From: Bryan Cheung
Date: Tue, 07 Nov 1989 18:32
Date: Tue, 07 Nov 1989 18:32
61 lines
4043 bytes
4043 bytes
I originally posted an insufficiently documented problem which
involved the use of the 'require function in emacs scripts invoked
from the shell via "emacs -batch". Thanks to suggestions from Julian
Cowley (cs211s14@uhcc.hawaii.edu), I have narrowed the problem down to
differences in the way that the 'load-path variable is initialized.
--------------------------------------------------------
The Real The 'load-path variable gets a different value when
Problem emacs is invoked interactively than it does when emacs
is invoked from the shell with "emacs -batch".
--------------------------------------------------------
Environment o UNIX System V Release 3.1
o GNU emacs version 18.52.3
o System V Bourne Shell
o .emacs file does not exist
o EMACSLOADPATH variable is not set
o /usr/local/emacs/lisp/default.el sets up
the load-path (see below).
--------------------------------------------------------
Excerpt From (setq load-path (append load-path (list
default.el "/usr/local/emacs/local" (expand-file-name "~/emacs"))))
--------------------------------------------------------
Scratch Buffer emacs-version
Session "18.52.3"
load-path
("/usr/local/emacs/lisp" "/usr/local/emacs/local"
"/usr/staff/cheung/emacs")
inhibit-default-init
nil
--------------------------------------------------------
Shell Command $ echo '(print load-path)' > test.el
Lines $ emacs -batch -l test.el
("/usr/staff/cheung/ /usr/local/emacs/lisp")
$ echo '(print inhibit-default-init)' >> test.el
$ emacs -batch -l test.el
("/usr/staff/cheung/ /usr/local/emacs/lisp")
nil
--------------------------------------------------------
The Questions o How does "emacs -batch" go about initializing the
'load-path variable, and why is it (apparently)
different from an interactive session with emacs??
o Is there an easy way to change the above intializa-
tion for all users of emacs??
o Is there a better work-around for this problem than
HARDCODING load-paths into emacs scripts that are
intended to be run with -batch??
o Is "emacs -batch" supposed to avoid loading the
default library /usr/local/emacs/lisp/default.el
??
o Is this a bug, or a feature??
--------------------------------------------------------
Any and all help is greatly appreciated,
-- Bryan
(BRYAN.C@TRNGW.Prime.COM)
___________________________________________________________________________
Prime Customer Education
4553 Glencoe Ave, Suite 300
Marina Del Rey, CA 90292
Technical Details
Message-ID:
<8911071832.AA23546@twexl0.prime.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!twexl0.prime.com!cheungShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,48d9c6bf444a65d4,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1989-11-07 20:30:07 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!twexl0.prime.com!cheung From: cheung@twexl0.prime.com (Bryan Cheung) Newsgroups: gnu.emacs.bug Subject: Clarification of "emacs -batch" problem with 'require Message-ID: <8911071832.AA23546@twexl0.prime.com> Date: 7 Nov 89 18:32:39 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 61 Posted: Tue Nov 7 19:32:39 1989