From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Package initialization Date: Mon, 20 Jul 2015 10:30:26 +0900 Message-ID: <21932.20274.646021.600004@uwakimon.sk.tsukuba.ac.jp> References: <87twt1dmxu.fsf@uwakimon.sk.tsukuba.ac.jp> <21931.51113.826895.663216@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1437355859 6704 80.91.229.3 (20 Jul 2015 01:30:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jul 2015 01:30:59 +0000 (UTC) Cc: Artur Malabarba , emacs-devel To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 20 03:30:49 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZGzur-0000QR-9Y for ged-emacs-devel@m.gmane.org; Mon, 20 Jul 2015 03:30:49 +0200 Original-Received: from localhost ([::1]:53293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGzup-0001t3-UZ for ged-emacs-devel@m.gmane.org; Sun, 19 Jul 2015 21:30:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGzuc-0001sy-IE for emacs-devel@gnu.org; Sun, 19 Jul 2015 21:30:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGzuY-0006UF-Hd for emacs-devel@gnu.org; Sun, 19 Jul 2015 21:30:34 -0400 Original-Received: from shako.sk.tsukuba.ac.jp ([130.158.97.161]:45353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGzuY-0006TK-4F for emacs-devel@gnu.org; Sun, 19 Jul 2015 21:30:30 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by shako.sk.tsukuba.ac.jp (Postfix) with ESMTPS id D06A31C39F1; Mon, 20 Jul 2015 10:30:26 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id C472211EF83; Mon, 20 Jul 2015 10:30:26 +0900 (JST) In-Reply-To: X-Mailer: VM undefined under 21.5 (beta34) "kale" ffb5abc8dc4e XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 130.158.97.161 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188001 Archived-At: Helmut Eller writes: > On Mon, Jul 20 2015, Stephen J. Turnbull wrote: > > > > Calling it lazily when a SLIME related command is invoked the > > > first time would kinda work for SLIME, but it would be rather strange > > > that say the slime-connect command implicitly adds hooks to > > > lisp-mode-hook. > > > > Why is that stranger than saying that slime-setup implicitly adds > > hooks to lisp-mode-hook? Or stranger than saying that simply > > installing the SLIME package on your system implicitly adds hooks to > > lisp-mode-hook? > > Because slime-connect is supposed to create a connection to an external > process. Not mess around in with some mode-hooks and minor-modes. If slime-connect won't work properly without slime-setup, there's no difference. If it's useful to do slime-connect without slime-setup, that would be another story but it sounds unlikely. I'd have to hear details to say how XEmacs would prefer to handle it. (I don't claim the XEmacs way is the *right* way, only that it has worked very well for us. No user has ever complained that installing a package doesn't change Emacs state in arbitrary ways. On the contrary, packages where installation implies initialization were frequently implicated in mysterious buggy behavior until we started enforcing the policy.) > package.el seems to be so designed that package installation > implies package initialization. I don't like that but I can't > change it. I didn't get that impression. It's one thing for Emacs to automatically scan for usable packages and add them to load-path, to set up autoloads for their entry-point commands, and perhaps add their data directories etc to appropriate paths so they can be found by name rather than a full filesystem path. I don't consider that "initialization" because it's consistent with the "and the kitchen sink" tradition of Lisp environments (especially GNU Emacs), where packages that many users would never notice if they weren't installed are often included with the core distribution. It's another to change the meaning of user gestures, even in a trivial and "obviously useful" way like adding to keymaps. If in fact the majority of lisp-mode users find slime sufficiently useful, what I would do is negotiate with the lisp-mode maintainer (I suppose that's actually emacs-devel) to get the slime bindings "officially" added to the lisp-mode keymaps, and arrange for them to fail gracefully if the slime package is unavailable, eg, by binding them to a `lisp-mode-how-to-get-slime' help command.