From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Loading a package applies automatically to future sessions? Date: Sat, 10 Feb 2018 14:00:03 +0200 Message-ID: <837erl2gxo.fsf@gnu.org> References: <76b1fb81-54c0-c213-a542-dc7b9838c473@gmail.com> <83zi50jsmn.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1518263948 6568 195.159.176.226 (10 Feb 2018 11:59:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Feb 2018 11:59:08 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Radon Rosborough Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 10 12:59:03 2018 Return-path: Envelope-to: ged-emacs-devel@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 1ekTnn-00008C-Vb for ged-emacs-devel@m.gmane.org; Sat, 10 Feb 2018 12:58:44 +0100 Original-Received: from localhost ([::1]:60446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekTpp-0006NV-Ct for ged-emacs-devel@m.gmane.org; Sat, 10 Feb 2018 07:00:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekTpb-0006Me-MZ for emacs-devel@gnu.org; Sat, 10 Feb 2018 07:00:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekTpY-0005wS-AP for emacs-devel@gnu.org; Sat, 10 Feb 2018 07:00:35 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekTpY-0005wJ-7X; Sat, 10 Feb 2018 07:00:32 -0500 Original-Received: from [176.228.60.248] (port=3540 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ekTpM-0000x9-3T; Sat, 10 Feb 2018 07:00:20 -0500 In-reply-to: (message from Radon Rosborough on Sun, 28 Jan 2018 10:20:49 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222645 Archived-At: > From: Radon Rosborough > Date: Sun, 28 Jan 2018 10:20:49 -0800 > Cc: rms@gnu.org, emacs-devel > > > Please point out the places in the manual where we use "load" in the > > former sense. I think those places need to be fixed, because that's > > not what "load" means in the Emacs context. > > The crux of the problem is here in emacs/package.texi: > > "Once a package is downloaded and installed, it is @dfn{loaded} into > the current Emacs session. Loading a package is not quite the same as > loading a Lisp library (@pxref{Lisp Libraries}); loading a package > adds its directory to @code{load-path} and loads its autoloads." > > Frankly the name of `package-load-list' is misleading if we're going > to change this terminology. It implies you are setting which packages > are going to be loaded. > > We also have usage of this terminology in emacs/package.texi: > > "After a package is installed, it is automatically loaded by Emacs in > all subsequent sessions." > > "As an exception, Emacs does not load packages at startup if invoked > with the @samp{-q} or @samp{--no-init-file} options (@xref{Initial > Options})." > > "To disable automatic package loading, change the variable > @code{package-enable-at-startup} to @code{nil}. You must do this in > the early init file, as the variable is read before loading the > regular init file." > > "For finer control over package loading, you can use the variable > @code{package-load-list}." > > "A list element of the form @code{(@var{name} @var{version})} tells > Emacs to load version @var{version} of the package named @var{name}. > Here, @var{version} should be a version string (corresponding to a > specific version of the package), or @code{t} (which means to load any > installed version), or @code{nil} (which means no version; this > disables the package, preventing it from being loaded). A list element > can also be the symbol @code{all}, which means to load the latest > installed version of any package not named by the other list > elements." > > "For example, if you set @code{package-load-list} to @code{'((muse > "3.20") all)}, then Emacs only loads version 3.20 of the @samp{muse} > package, plus any installed version of packages other than > @samp{muse}." > > In lispref/package.texi: > > "Whenever Emacs starts up, it automatically calls the function > @code{package-initialize} to load installed packages." > > "Automatic package loading is disabled if the user option > @code{package-enable-at-startup} is set to @code{nil} in the early > init file." > > "This function initializes Emacs' internal record of which packages > are installed, and loads them. The user option > @code{package-load-list} specifies which packages to load; by default, > all installed packages are loaded. If called during startup, this > function also sets @code{package-enable-at-startup} to @code{nil}, to > avoid accidentally loading the packages twice." > > "The optional argument @var{no-activate}, if non-@code{nil}, causes > Emacs to update its record of installed packages without actually > loading them; it is for internal use only." > > In lispref/os.texi: > > "For example, you can customize the process of loading installed > packages, by setting variables such as @var{package-load-list} or > @var{package-enable-at-startup}. @xref{Package Installation,,, > emacs,The GNU Emacs Manual}." Thanks. It looks like all of those places are related to package.el, so could you please take care of clarifying the issue as part of your patch? Most of those places are touched by your patch anyway. I think the fix should be not to use "load" in this sense, but instead tell we just make the package available by loading its autoloads.