emacs-devel
[Top][All Lists]
Advanced

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

Re: Standardizing more key bindings?


From: Nikolay Kudryavtsev
Subject: Re: Standardizing more key bindings?
Date: Tue, 6 Oct 2020 17:24:14 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1

Keybinding protocol would be a set of functions we expect a package implementing it to implement. Then package developers write protocol implementations and keybinding packages(and users) write protocol bindings.

So one decent example I have is minibuffer completion. Lets say I'm using ErgoEmacs and it expects previous element to work on F11 and next element on F12. But there are multiple minibuffer completion packages, like Ivy, Icicles, Helm and ErgoEmacs developers have to currently try to provide concrete bindings for whatever they choose to support.

Lets say there's a minibuffer-completion protocol:

(def-kb-protocol minibuffer-completion '(next-element))

Then keybinding system developers just have to provide bindings for that protocol:

(kb-protocol-bind minibuffer-completion '((F12 next-element)))

And minibuffer completion packages just have to provide implementation:

(kb-protocol-impl minibuffer-completion '((next-element ivy-next-line)))

Ideally if we provide a robust set of such protocols we can accomplish uniformity of common actions between different modes, but also the ability to do quick keybinding for the same action across a range of modes as long as they implement the protocol itself.

Then we just have to make sure that the bundled modes comply with the set of protocols we ship.

--
Best Regards,
Nikolay Kudryavtsev




reply via email to

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