Article View: gnu.emacs.help
Article #189193Re: Changing the standard load-path
From: Lance A. Brown
Date: Wed, 10 Apr 1991 17:17
Date: Wed, 10 Apr 1991 17:17
33 lines
2206 bytes
2206 bytes
>On 9 Apr 91 14:05:00 GMT, allen@manic.ssc.gov (Mike Allen) said:
> You can change the path at any time by modifying the variable
> load-path. For example, in my .emacs I do:
> (setq load-path (cons (expand-file-name "~/emacs-lib")
> (cons "/usr/local/emacs/lisp/local"
> (cons "/usr/local/emacs/lisp" load-path))))
Except in one instance which you may be uninterested in.
I have found that due to a (let ) form in the file startup.el it is
impossible to change the load-path when running emacs in batch mode. I
found this when trying to do some things like:
emacs -batch -l $HOME/.emacs-batch -f foo
where .emacs-batch adds directories to the load-path variable. The
function foo loves in a file in one of those directories, but does not get
run because the code that load-files's .emacs-batch has a let form in it
that make the variable load-path local to the function. This prevents any
changes to load-path from becoming "permanent".
I find this very annoying.
Lance
--
--
brown@cs.utk.edu
Lance A. Brown The Crystal Wind is the Storm,
3500 Sutherland Avenue, Apt. L-303 and the Storm is Data,
Knoxville, TN 37919 and the Data is Life
-- The Player's Litany
from _The Long Run_ by D.K. Moran
Technical Details
Message-ID:
<BROWN.91Apr10131745@duncan.cs.utk.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!asuvax!ncar!gatech!utkcs2!!brownReferences:
<STABL.91Apr8110805@trillian.fmi.uni-passau.de> <STABL.91Apr8193405@trillian.fmi.uni-passau.de> <ALLEN.91Apr9100500@manic.ssc.gov>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,d7cb4a04079254a8 X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1991-04-11 01:05:15 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!asuvax!ncar!gatech!utkcs2!!brown From: brown@cs.utk.edu (Lance A. Brown) Newsgroups: gnu.emacs.help Subject: Re: Changing the standard load-path Message-ID: <BROWN.91Apr10131745@duncan.cs.utk.edu> Date: 10 Apr 91 17:17:45 GMT References: <STABL.91Apr8110805@trillian.fmi.uni-passau.de> <STABL.91Apr8193405@trillian.fmi.uni-passau.de> <ALLEN.91Apr9100500@manic.ssc.gov> Sender: usenet@cs.utk.edu (USENET News Poster) Distribution: gnu Organization: University of Tenn., Knoxville, Dept. of Computer Science Lines: 25 In-Reply-To: allen@manic.ssc.gov's message of 9 Apr 91 14:05:00 GMT