Article View: gnu.emacs.bug
Article #99781Re: How does the load-path variable work?
From: nuge James A. Nugent
Date: Tue, 19 Jun 1990 14:57
Date: Tue, 19 Jun 1990 14:57
36 lines
2264 bytes
2264 bytes
In article <9006182036.AA13225@bach.cs.byu.edu> mike@BACH.CS.BYU.EDU
(Mike Burbidge) writes:
>I created a directory in my home directory that I want to contain compiled
>elisp files that I have written myself. By setting the load-path variable
>appropriately in my .emacs file will emacs automatically load files ending
>in .elc in the specified directories? This is what I assume and it doesn't
>work.
Since you weren't any more specific than "it doesn't work"
it's difficult to guess at what went wrong for you. Here are a couple
of possibilities. First, the load-path variable is a list, just like
your Unix path. If you have replacements (with identical names) for
standard emacs lisp files, yours will override the default *if* you
put your directory in front of the standard directory list (usually
consisting of just one directory) *and if* you change load-path before
those files are loaded (or specifically re-load them with the load
function). Finally, remeber that you must tack your directory onto the
list, not just change the variable; otherwise emacs will look *only*
in your directory, and won't continue on the the standard directory
for things you don't have copies of.
Here's what I have in my .emacs file, and it seems to work fine:
(setq load-path (cons (expand-file-name "~/Emacs/lisp") load-path))
BTW it will look first for a .elc file but will settle for a
.el file if the former isn't found.
Hope this helps.
--
Jim Nugent
GE Medical Systems
Milwaukee, WI
Technical Details
Message-ID:
<NUGE.90Jun19095747@ct59.ctmed@gemed.ge.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!uwm.edu!mrsvr.UUCP!mrsvr!nugeReferences:
<9006182036.AA13225@bach.cs.byu.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,49554ca639f69ecd X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-06-19 07:57:47 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!uwm.edu!mrsvr.UUCP!mrsvr!nuge From: nuge@ctmed@gemed.ge.com (James A. Nugent) Newsgroups: gnu.emacs.bug Subject: Re: How does the load-path variable work? Message-ID: <NUGE.90Jun19095747@ct59.ctmed@gemed.ge.com> Date: 19 Jun 90 14:57:47 GMT References: <9006182036.AA13225@bach.cs.byu.edu> Sender: news@mrsvr.UUCP Distribution: gnu Organization: GE Medical Systems, Milwaukee, WI Lines: 36 Posted: Tue Jun 19 15:57:47 1990 In-reply-to: mike@BACH.CS.BYU.EDU's message of 18 Jun 90 20:36:25 GMT