[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Package initialization

From: Stephen J. Turnbull
Subject: Re: Package initialization
Date: Mon, 20 Jul 2015 10:30:26 +0900

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]