From what I understand require
is used to load large chunks of code (something like modules) although it can also load individual functions.
Autoload on the other side, only registers functions and defers the loading to execution time.
I've recently read an article which advocates the usage of autoload
exclusively.
Is it better to autoload
than to require
? What are some typical use cases for each of these?
autoload
andrequire
from this question. Adding taglibraries
was fine, but now anyone searching, using tags, for questions aboutautoload
orrequire
will not find this one. Those are both important Emacs-Lisp functions that people will search for. Too bad. And think how helpfulelisp
andlibraries
(esp.elisp
) will really be in practice for an Emacs site: they do not distinguish much in Emacsland, I'm afraid. (But no, I am not against having them and using them.)autoload
andrequire
I think those tags are justified. In fact, labeling this question [only] withlibraries
is over-generalizing. I for one userequire
to trigger loading of "my-foobar-cfg", which, as the name suggests, only contains just my configuration, not a library.