help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Requiring elisp that comes with Emacs


From: Narendra Joshi
Subject: Re: Requiring elisp that comes with Emacs
Date: Tue, 31 Jan 2017 19:16:11 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Skip Montanaro <skip.montanaro@gmail.com> writes:

> On Mon, Jan 30, 2017 at 10:52 AM, Narendra Joshi <
> narendraj9@gmail.com> wrote:
>
>     What happens when we do `require'?
>
>
> It guarantees the relevant feature is available, generally as a side
> effect of loading the named package. I believe the package much
> "provide" its name. If not found, an error is raised. Full details
> can be found here:
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/
> Named-Features.html

My question was more about whether we need to `require` packages that
come with Emacs itself, e.g. org-mode.

>
> While under the covers I imagine the implementation is much
> different, I my mental model is similar to Python's import statement
> or C++'s namespace statement. All three make a series of names
> available to you, though require is a global operation, not local to
> a particular module or translation unit.

I think every file in the `load-path' would need to be read for a
(provide 'something) at the end while trying to
(require 'something). Languages that make sure that the name of the
module is the same as the name of the file do not have to look inside
the file. This is all speculation and I do not know how exactly things
are done in reality.

Narendra




reply via email to

[Prev in Thread] Current Thread [Next in Thread]