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

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

bug#22334: 25.1.50; Better sorting of blocks in describe-bindings


From: Eric Abrahamsen
Subject: bug#22334: 25.1.50; Better sorting of blocks in describe-bindings
Date: Mon, 11 Jan 2016 09:33:31 +0800
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)

On 01/10/16 17:45 PM, Eli Zaretskii wrote:
>> From: Eric Abrahamsen <eric@ericabrahamsen.net>
>> Cc: 22334@debbugs.gnu.org
>> Date: Sun, 10 Jan 2016 09:16:16 +0800
>> 
>> > Please try figuring out how come what you see is so much different
>> > from what I see here.  Or maybe someone else can
>> 
>> Poking around a little more, it looks like the minor modes *always* come
>> first. I'm talking about `describe-bindings' (C-h b), not
>> `describe-mode', see below.
>
> Sorry, my bad: for some reason, I did look at "C-h m".  Now that I try
> "C-h b", I do see those bindings listed.
>
> However, they aren't for self-inserting bindings, they are for "Key
> translations".  (The self-inserting characters are mentioned much
> farther below, and they take exactly 3 lines.)  The bindings for the
> major mode follow directly after these.
>
> The code that puts key translations first is very old, it was added
> almost 25 years ago.  It is triggered by a non-nil values of either
> keyboard-translate-table or key-translation-map.
>
> Maybe we should do something similar to evaluation in *scratch*: limit
> the number of such bindings to some customizable value, and display a
> "..." button instead of the rest?
>
> I don't think putting them at the bottom is a good idea: as Andreas
> points out, the bindings are shown in the order of their priority, so
> the order cannot be arbitrarily changed.

What does "priority" mean? That earlier bindings are able to shadow
later bindings?

Maybe use outline-mode-style collapsible headlines? That way the
translations could stay at the top, but be folded by default, and the
major mode could be the next (unfolded) block. Right now, "paging" is
enabled, with the ^L markers, but that's not really that useful.

[...]

> Actually, which minor mode bindings do you see in "C-h b" display, and
> in what mode?  It seems like "Emacs -Q" doesn't have any such bindings
> displayed, and neither does C mode.

No, "emacs -Q" doesn't have anything -- no minor modes are enabled by
default! With full customizations in effect, my *scratch* buffer gives
the following binding blocks:

Key translations:
key             binding
---             -------

[692 lines!]

`paredit-mode' Minor Mode Bindings:
key             binding
---             -------

`recentf-mode' Minor Mode Bindings:
key             binding
---             -------
[no bindings]

`projectile-mode' Minor Mode Bindings:
key             binding
---             -------

`company-mode' Minor Mode Bindings:
key             binding
---             -------
[no bindings]

`electric-pair-mode' Minor Mode Bindings:
key             binding
---             -------
[no bindings]

Major Mode Bindings:
key             binding
---             -------

Global Bindings:
key             binding
---             -------

Function key map translations:
key             binding
---             -------

Input decoding map translations:
key             binding
---             -------





reply via email to

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