help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: PROPOSAL: Repurpose one key and reserve it for third-party packages


From: Gregory Heytings
Subject: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
Date: Fri, 12 Feb 2021 13:54:43 +0000


I have no opinion about whether it is better for packages to install global bindings at installation time, at loading time or at activation time. At first sight it seems to me that all three could make sense, depending on the package.

I do think that the problems are relevant, because they show that activation at install- or load-time are bad style. The only real choice is activation-time, but that won't work for examples like Magit, since they are not activated using modes. I'm not sure how I'd feel about a magit-global-mode...


As I said, I have no opinion about which moment is better. But it seems to me that "the only real choice is activation-time" is wrong. It depends on how much that package modifies the user interface. Magit is a good example in that respect: nothing is changed, except three global key bindings. There are other cases, imagine a package implementing a global command to query the stock price of the string under point to display it in the minibuffer. It would make sense that installing that package binds, say, "C-\alpha $" to its command "display-stock-price", if that key is still available, without asking the user whether they really want that binding. Other package authors may prefer to delay that binding until the package is loaded with a "require" or "load". Yet others may prefer to delay that binding until the package is explicitly activated with M-x or in the users' init file.


The only real solution that I see is something along the lines of what I recommended: Packages suggest customizations, and package-install may either ignore, ask for confirmation or accept them by default, if there are no problems with what is suggested (eg. collisions).


And that solution cannot be implemented if there is no key space reserved for third-party libraries. Which is what the proposal is about. The proposal is not about the particular mechanisms that could be used to bind keys in that reserved area.



reply via email to

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