From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Loading a package applies automatically to future sessions? Date: Fri, 26 Jan 2018 12:03:33 -0500 Message-ID: References: <76b1fb81-54c0-c213-a542-dc7b9838c473@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1516987083 22865 195.159.176.226 (26 Jan 2018 17:18:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 26 Jan 2018 17:18:03 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 26 18:17:59 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 1ef7dC-0004Gr-I0 for ged-emacs-devel@m.gmane.org; Fri, 26 Jan 2018 18:17:38 +0100 Original-Received: from localhost ([::1]:40214 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef7fD-00070r-40 for ged-emacs-devel@m.gmane.org; Fri, 26 Jan 2018 12:19:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef7ey-0006zN-Cj for emacs-devel@gnu.org; Fri, 26 Jan 2018 12:19:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ef7et-0007Og-B1 for emacs-devel@gnu.org; Fri, 26 Jan 2018 12:19:28 -0500 Original-Received: from [195.159.176.226] (port=44087 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ef7et-0007LU-3r for emacs-devel@gnu.org; Fri, 26 Jan 2018 12:19:23 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ef7Nt-0000h2-EM for emacs-devel@gnu.org; Fri, 26 Jan 2018 18:01:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:QboPJsBT25vYy+K0ol/S6Hl5fAE= 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: 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:222257 Archived-At: > Suppose the user loads a package to try it out. Will that cause it to > be loaded again in every session? It appears that way. > I think that asking for a package to be loaded in every session > should be distinguished from loading it for the current session. There are 3 different steps: A- installing a package: this places its files under ~/.emacs.d/elpa B- activating a package: this loads its -autoloads.el file. C- actually loading the package's files. When a user does A, by default, it will do B in the current session and causes subsequent Emacs invocations to automatically do B as well (i.e. B is done by default on all installed packages). You can configure `package-load-list` if you want to prevent a particular package from being activated even though you still want it to be installed. But regardless, C should only happen on-demand when something actively requests it. Of course, a package is free to set up its autoloads such that B causes C. I'd consider it a misfeature of that package, tho. Stefan