🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #986

Re: What's wrong with this picture? (require & provide)

#986
From: Randal L. Schwartz Stonehenge
Date: Mon, 22 Aug 1988 05:32
53 lines
2327 bytes
In article <Aug.20.10.53.40.1988.8583@porthos.rutgers.edu>, gaynor@rutgers writes:
| Here's the scoop:
| 
| 1. In my .emacs, I have the following expression:
| 
|    ;; Me first!  Me first!
|    (setq load-path (cons (expand-file-name "~/gnu-lisp")
| 			 load-path))
| 
| 2. There's a file ~/gnu-elisp/primitives.el which contains simply:
| 
|    (provide 'primitives)
|    (message "primitives provided")
|    (sit-for 1)
| 
| 3. When I evaluate (require 'primitives), /athos/u2/gaynor/gnulisp is not
|    loaded, and the following error is generated:
| 
|    Required feature primitives was not provided
| 
| After changing every instance of `primitives' to `foo' in the above scenario,
| everything works fine.  There isn't some kind of stupid file-length limitation,
| is there?  Something variable-controlled that I haven't yet discovered?

I see the following inconsistencies.  I hope they are just typos.  If not,
I have found your problem:

*** load-path "gnu-lisp" vs file in "gnu-elisp" 

phpptht.

*** ".../gnulisp" in item 3 vs. either of the other two spellings

double phpptht.

Here's what you need:

in ~/.emacs:
  (setq load-path (cons (expand-file-name "~/gnu-elisp") load-path))

in ~/gnu-elisp/primitives.el[c]:
  (provide 'primitives)
  ...

in [wherever]:
  (require 'primitives)

That should do it.
-- 
Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095
on contract to BiiN Technical Publications (for now :-), Hillsboro, Oregon
<merlyn@intelob.intel.com> or ...!tektronix!inteloa[!intelob]!merlyn
Standard disclaimer: I *am* my employer!
Technical Details
Message-ID: <2757@mipos3.intel.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!oliveb!intelca!mipos3!merlyn
References: <Aug.20.10.53.40.1988.8583@porthos.rutgers.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!oliveb!intelca!mipos3!merlyn
From: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge)
Newsgroups: gnu.emacs.bug,gnu.emacs,comp.emacs
Subject: Re: What's wrong with this picture? (require & provide)
Keywords: GNU Emacs v18.51, SunOS v3.2
Message-ID: <2757@mipos3.intel.com>
Date: 22 Aug 88 05:32:50 GMT
References: <Aug.20.10.53.40.1988.8583@porthos.rutgers.edu>
Sender: nobody@mipos3.intel.com
Reply-To: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge)
Followup-To: gnu.emacs.bug
Distribution: na
Organization: Stonehenge; netaccess via BiiN, Hillsboro, Oregon, USA
Lines: 53
In-reply-to: gaynor@rutgers.edu