emacs-devel
[Top][All Lists]
Advanced

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

Standardizing more key bindings?


From: Thibaut Verron
Subject: Standardizing more key bindings?
Date: Sun, 27 Sep 2020 11:31:03 +0200

Dear all,

It was pointed out recently that one of the features of spacemacs and
the like offer is that key bindings are better standardized across
packages. The example given, I believe, was sending a region to the
REPL.

This kind of standardization is something that Emacs already does, for
some commands: we have indent-*-function, revert-buffer-function, for
instance, which make it easy to bind similar behaviours to the same
key across major modes.

For the REPL example, I guess it should be possible to split basic
functionality into some well-defined functions, and let packages
assign those functions? Like a comint-create-process-function, a
comint-send-region-function, a comint-send-buffer-function, etc.

It doesn't seem too complicated to implement, but it would require
precisely identifying the meaningful building blocks, and package
maintainers would have to refactor their code to make use of those
variables.

I seem to recall Stefan bringing up such a discussion a few years ago,
the goal then being to simplify setting up a comint buffer.

Another possibility would be to define variables for "preferred" key
bindings for some behaviours, so that packages would only have to bind
those if non nil. This is minimal work for the package maintainers,
and also easy to do by third party (fourth party?) packages or by the
user for packages which are no longer maintained.

But that would be a new concept for Emacs.

Both options can be tentatively implemented as a separate package
(similarly to no-litter).

What do you think?

Best,
Thibaut



reply via email to

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