From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Requiring elisp that comes with Emacs Date: Wed, 01 Feb 2017 07:53:58 -0800 Message-ID: <87mve5uctl.fsf@pellet> References: <874m0gv6ba.fsf@gmail.com> <87k29bl4v0.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1485964657 8018 195.159.176.226 (1 Feb 2017 15:57:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2017 15:57:37 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 01 16:57:33 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYxHo-0001uz-P6 for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Feb 2017 16:57:32 +0100 Original-Received: from localhost ([::1]:51751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYxHu-0003in-DF for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Feb 2017 10:57:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYxFh-0001u4-RV for help-gnu-emacs@gnu.org; Wed, 01 Feb 2017 10:55:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYxFd-00052o-UZ for help-gnu-emacs@gnu.org; Wed, 01 Feb 2017 10:55:21 -0500 Original-Received: from [195.159.176.226] (port=45061 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYxFd-00052a-Nx for help-gnu-emacs@gnu.org; Wed, 01 Feb 2017 10:55:17 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cYxFQ-00042G-BZ for help-gnu-emacs@gnu.org; Wed, 01 Feb 2017 16:55:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:I862B78rSo/Q4JHDc34VSU84iRM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112230 Archived-At: Narendra Joshi writes: > Skip Montanaro 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. Practically speaking, every package that come with Emacs will provide autoload statements for all the common entrypoint functions. Calling `require' will instantly load all the package's code, and all the packages it requires. Autoload, on the other hand, will leave the package unloaded, but load it automatically the first time you use an autoload'ed function. Most of the time, that's all you need. Eric