From: hector <hectorlahoz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: (require 'filename) doesn't find the file
Date: Fri, 10 Mar 2017 11:26:31 +0100 [thread overview]
Message-ID: <20170310102631.GA4107@workstation> (raw)
In-Reply-To: <20170310093749.GC29132@tuxteam.de>
On Fri, Mar 10, 2017 at 10:37:49AM +0100, tomas@tuxteam.de wrote:
> It finds the file. But the file doesn't keep its promise of "providing"
> the feature.
>
> See it this way: a "require"d file might find out that something is
> broken. Then it would return without "provide"-ing the feature, to
> signal that sorry, this feature isn't available after all.
>
> In short: just end your file with (provide 'basename), as you noticed
> up there. Or do you see a problem with that?
No problem at all. But I see a problem in that function require doesn't
behave as its documentation says it does. Or I just don't understand it,
which is worse.
OK, let's widen the picture frame.
I have 2 files: required.el and requiring.el.
required.el contains:
(defvar var1 "Value"
"This variable is used by \"requiring.el\"")
Them, since requiring.el uses this variable, I write:
(require 'required)
expecting that "required.el" to be loaded at run time.
I'm afraid this is not the right approach. Perhaps both files should be
put together. Or use (load "required.el") instead. I just don't know.
next prev parent reply other threads:[~2017-03-10 10:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 9:17 (require 'filename) doesn't find the file hector
2017-03-10 9:37 ` tomas
2017-03-10 10:26 ` hector [this message]
2017-03-10 10:46 ` tomas
2017-03-10 9:38 ` hector
2017-03-10 9:55 ` tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170310102631.GA4107@workstation \
--to=hectorlahoz@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).