🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99568

restriction on load-path

#99568
From: Rob Hasker
Date: Fri, 13 Jul 1990 16:39
30 lines
2032 bytes
In the command-line-1 function in startup.el appears the following code:

		...
		((or (string-equal argi "-l")
		     (string-equal argi "-load"))
		 (let ((load-path (cons default-directory load-path)))
		   (load (car command-line-args-left) nil t))
		 ...)

The problem with this is that because of the let there is no way for a file
loaded by command line options to change load-path for another command.  In
my case, I want some initialization to be done before calling the
byte-compiler.  One of these initializations was supposed to be to reset
load-path so require's will load the right file.  But putting the
initialization into a separate file and then doing
	gnuemacs -batch -l init.el -batch-byte-compile file.el
doesn't work in the special case of load-path.

It's not clear what should be fixed.  I see why consing the default
directory onto load-path makes sense when processing the command line.
Maybe all that can be done is to document the problem, but this wouldn't be
very satisfactory. I think the problem is a little too obscure to call it a
feature; it took a lot of debugging to find.  I had to redefine require to
print out load-path when called from the byte-compiler.

version:
"GNU Emacs 18.55.13 of Thu Jun 21 1990 on n.cs.uiuc.edu (berkeley-unix)"

Rob Hasker		University of Illinois at Urbana-Champaign
hasker@cs.uiuc.edu	{uunet|convex|pur-ee}!uiucdcs!hasker
Technical Details
Message-ID: <9007131639.AA17061@m.cs.uiuc.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!decwrl!elroy.jpl.nasa.gov!usc!cs.utexas.edu!tut.cis.ohio-state.edu!CS.UIUC.EDU!hasker

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,59d5118d1f5a6918,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-07-13 09:39:20 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!decwrl!elroy.jpl.nasa.gov!usc!cs.utexas.edu!tut.cis.ohio-state.edu!CS.UIUC.EDU!hasker
From: hasker@CS.UIUC.EDU (Rob Hasker)
Newsgroups: gnu.emacs.bug
Subject: restriction on load-path
Message-ID: <9007131639.AA17061@m.cs.uiuc.edu>
Date: 13 Jul 90 16:39:20 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 30
Posted: Fri Jul 13 17:39:20 1990