From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Loading a package applies automatically to future sessions? Date: Sat, 03 Feb 2018 22:08:43 -0500 Message-ID: References: <76b1fb81-54c0-c213-a542-dc7b9838c473@gmail.com> <2df2ff0a-6bbd-4d39-c830-ce2891909418@gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1517713621 4652 195.159.176.226 (4 Feb 2018 03:07:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Feb 2018 03:07:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 04 04:06:57 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 1eiAdr-0000oJ-Eu for ged-emacs-devel@m.gmane.org; Sun, 04 Feb 2018 04:06:55 +0100 Original-Received: from localhost ([::1]:52627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiAfs-0004jK-Cu for ged-emacs-devel@m.gmane.org; Sat, 03 Feb 2018 22:09:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiAfg-0004hp-Bd for emacs-devel@gnu.org; Sat, 03 Feb 2018 22:08:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eiAff-0003d2-6G for emacs-devel@gnu.org; Sat, 03 Feb 2018 22:08:48 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiAfd-0003bt-M7; Sat, 03 Feb 2018 22:08:45 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1eiAfb-0003G5-Ug; Sat, 03 Feb 2018 22:08:44 -0500 In-reply-to: <2df2ff0a-6bbd-4d39-c830-ce2891909418@gmail.com> (message from =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel on Thu, 1 Feb 2018 22:05:48 -0500) 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:222487 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > There may be a misunderstanding. Emacs already works in (mostly) the same way: Emacs' `require' is very close to Python's `import'. That's the behavior I'd expect a feature like this to have. > * Emacs has autoloads, small pieces of code from packages that are run inconditionally. I do know about autoloads; I implemented them. The questions are (1) do a lot of these packages have autoloads, or just a few, and (2) when do the autoloads get installed into Emacs. If adding a package to the list for loading has the effect of installing its autploads in all future sessions, that results in behavior very different from the 'require' behavior, and behavior that doesn't match what I'd expect such a feature to have. Does Python have autoloads? I would expect not. > * `require' works globally in Emacs, so once package foo is > * `require'd in one file, all subsequently executed code can call > * foo-x, without calling (require 'foo) again. That is true. With dynamic scoping that was basically inevitable. However, when lexical scoping becomes the default, it might be possible to arrange that a Lisp library is in scope only in files that require it. That would clean up a lot of things. For instance, it would not matter whether you compile A before B or after B. Since the effect of calling an autoload function is to call 'require', it could be that lexical handling of 'require' will automatically clean up the way these autoloads are handled. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) Skype: No way! See https://stallman.org/skype.html.