From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Key binding popup interface Date: Tue, 12 Dec 2017 16:18:59 -0500 Message-ID: References: <87r2s3ctxh.fsf@ericabrahamsen.net> <87d13m3jt2.fsf@gmx.us> <87efo2wf0s.fsf@ericabrahamsen.net> <87y3m8s7ym.fsf@gmx.us> <87fu8gwfbr.fsf@nicolasgoaziou.fr> <87k1xs2h0h.fsf@gmx.us> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1513113617 27436 195.159.176.226 (12 Dec 2017 21:20:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 12 Dec 2017 21:20:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 12 22:20:14 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOryG-0006nO-J2 for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2017 22:20:12 +0100 Original-Received: from localhost ([::1]:60564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOryK-0002wH-L9 for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2017 16:20:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOrxK-0002w9-Ic for emacs-devel@gnu.org; Tue, 12 Dec 2017 16:19:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOrxF-0005du-KS for emacs-devel@gnu.org; Tue, 12 Dec 2017 16:19:14 -0500 Original-Received: from [195.159.176.226] (port=45798 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eOrxF-0005ck-Ca for emacs-devel@gnu.org; Tue, 12 Dec 2017 16:19:09 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eOrx5-0003VZ-OI for emacs-devel@gnu.org; Tue, 12 Dec 2017 22:18:59 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:BFQdnGxrShIYukksLiQ1zXc2FXE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:220961 Archived-At: > For instance, I have a hydra to insert different Org blocks in org-mode, > and looks like this: > [image: image.png] [ Hmm... Gnus here doesn't seem to provide any way for me to see this image. ] > The idea is to press a binding, and then a contextual menu pops up with a > list of next valid key that can be pressed (and this does not necessarily > list *all* the bound keys.. that's one place where it's different from > another package: which-key). This sounds a bit like the primitive "hierarkey" feature which I used in PCL-CVS. Basically there I defined a sub-keymap bound to `d` with bindings like: (?= . ("diff" . cvs-mode-diff)) (?2 . ("other" . cvs-mode-diff-other)) (?d . ("diff" . cvs-mode-diff)) (?v . ("vendor" . cvs-mode-diff)) ... so after hitting `d` Emacs shows in the each area something like "Diff: vendor, diff, = = diff, 2 = other, ...". This is a very old feature implemented in the C code (src/keyboard.c) and very little used. It would be good to replace it with a more powerful feature implemented in Elisp and used more widely. Stefan