GNU bug report logs - #70530
Better sorting for describe-bindings and describe-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Dan Jacobson <jidanni@HIDDEN>; dated Tue, 23 Apr 2024 10:06:09 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Apr 2024 10:05:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 23 06:05:14 2024
Received: from localhost ([127.0.0.1]:51169 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzD1Q-0003Ho-Iy
	for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 06:05:14 -0400
Received: from lists.gnu.org ([2001:470:142::17]:47296)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1rzD1I-0003FC-Ig
 for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 06:05:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jidanni@HIDDEN>)
 id 1rzD0w-0003OR-8z
 for bug-gnu-emacs@HIDDEN; Tue, 23 Apr 2024 06:04:38 -0400
Received: from dormouse.elm.relay.mailchannels.net ([23.83.212.50])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jidanni@HIDDEN>)
 id 1rzD0t-0005tQ-UR
 for bug-gnu-emacs@HIDDEN; Tue, 23 Apr 2024 06:04:38 -0400
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 6ED20C1DE5
 for <bug-gnu-emacs@HIDDEN>; Tue, 23 Apr 2024 10:04:32 +0000 (UTC)
Received: from pdx1-sub0-mail-a258.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 19AB9C12E3
 for <bug-gnu-emacs@HIDDEN>; Tue, 23 Apr 2024 10:04:32 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1713866672; a=rsa-sha256;
 cv=none;
 b=RRMyhsCsd+Xq0/TIVfQm0hJQRAezDYExfAbSiC8y87Mz2PwEXZe1QzjDm0m3SA6k8XxGgf
 nhi8KiZ9MhmSdJFiDzhTmJio5mguijl4ysr0nZHv1XxLd41BGEEkngvvnJfKXyoJ+tCdHV
 8Ae/EP9lpvCMplYDqDKKleNNbm8EQA6HOenHMDFj78lgU0NU6eES8UeCqGf3uUJ9ZUWnMo
 V+G3sRIH83m4uQUuMSSZxvEdu9m2qI2Xc9IuYTZPKK8KmCY5JSORvZ8Q/GFNP0s2y1q+h2
 uxNxyCx+/6hDnFFPtFOuftHO592iCnKCbGHAfZri9ppdhjSGe/37ITjEZ45fZQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1713866672;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 dkim-signature; bh=nX2L/ByTM0Ispvhc7CqrFLaTxm8S3xoJhXfncyAqty0=;
 b=aaLku1CnTQqwBjAm8uKLRS5zA7BUQVOSZbQDoziUQixMzexDPPkU1BojSyLmvIF2lTrpJw
 o3WZJDuFGo7qwzBYsKKm4ygOwfbnrnH/3KZwvzcseN8l8uKNvogwFIeYLRxXdmB5GwXBUl
 L0aPqleyMh1oQIZOrMKPt5hIL5Je6Ce2SKjct7yVoGIxfWdgKv6GK3RMo+EjCz/+RWHGvd
 LJLzMAlyOui88+g/QXS0hsiESsypQN0TQREx7StskbbEwXMb3ZzLykXedNIVgUae+l0pB1
 ylONsDXsa4tT9qgG6f7MLxs+vBudpD/l2EaTWT/LO4v8GpVwzPGEbC9Vl57YhA==
ARC-Authentication-Results: i=1; rspamd-7946c7b49-7c4mc;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=jidanni@HIDDEN
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Broad-Cure: 3c4d77c56c01d9a6_1713866672318_260002094
X-MC-Loop-Signature: 1713866672318:2193494821
X-MC-Ingress-Time: 1713866672318
Received: from pdx1-sub0-mail-a258.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.103.233.31 (trex/6.9.2); Tue, 23 Apr 2024 10:04:32 +0000
Received: from jidanni.org (114-41-23-16.dynamic-ip.hinet.net [114.41.23.16])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by pdx1-sub0-mail-a258.dreamhost.com (Postfix) with ESMTPSA id 4VNyQR4ghwz5y
 for <bug-gnu-emacs@HIDDEN>; Tue, 23 Apr 2024 03:04:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jidanni.org;
 s=dreamhost; t=1713866671;
 bh=Of/1OLCmEWv1zR6pUdIF+kv66WM4eBKjzPvn3Z8/at8=;
 h=From:To:Subject:Date:Content-Type;
 b=aK84wME7Kw2oHo3r/DJhVBQfva/3ULUMqlSWNXio82di35g0uzQv+acmKQZBFVGX0
 pbPDd6uWJgghSC7zrfCFJfpxAlYfKupsH5XA8dQn0RLwVuONJwkOeCaX1Dyk5YzRrK
 kZj3zHSDB550JQxEPWF7KCddvHuWr40rZUNUeFLiNFzFIg/O1X/sD9E74JZZCB1LAm
 ke6o79mZDmIsHpDcKZ6IXATihTo+hm3LHeDLPwjo93UecRBm/avZQV6QWIybaOlO6z
 it0BR7uGE5jbgBWXETfih4sqII0xvyk/cIdxSTnj2WbbOi8Fir11MwOkrDaLKcaBtw
 7P+9JQlW9JTtw==
From: Dan Jacobson <jidanni@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Better sorting for describe-bindings and describe-mode
Date: Tue, 23 Apr 2024 18:04:27 +0800
Message-ID: <87cyqg5r9w.n.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=23.83.212.50; envelope-from=jidanni@HIDDEN;
 helo=dormouse.elm.relay.mailchannels.net
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

I discovered that
C-h m describe-mode and thus also
C-h b describe-bindings
are several times more helpful, if sorted by the last field, not the first.
E.g., for
$ emacs file.html #then C-h m and save to a file and pipe it to
grep --perl-regexp \\t | expand | sort -k 1.16 #giving:

C-c C-a         sgml-attributes
C-c /           sgml-close-tag
C-c C-e         sgml-close-tag
C-c ]           sgml-close-tag
C-c C-d         sgml-delete-tag
C-c DEL         sgml-delete-tag
C-c C-n         sgml-name-char
C-c <left>      sgml-skip-tag-backward
C-c C-b         sgml-skip-tag-backward
C-c <right>     sgml-skip-tag-forward
C-c C-f         sgml-skip-tag-forward
/               sgml-slash
C-c C-o         sgml-tag
C-c C-t         sgml-tag
C-c ?           sgml-tag-help

Allowing the user to suddenly see all the alternate bindings in a glance.

Therefore I propose C-h b and C-h m start listing them that way, or at least offer an option to do so. Thanks.

Wait, hold on. Let's examine the default sort order.

...
C-c <left>	sgml-skip-tag-backward
C-c <right>	sgml-skip-tag-forward

C-M-i		ispell-complete-word

M-o M-o		font-lock-fontify-block

C-c C-c #	html-id-anchor
C-c C-c -	html-horizontal-rule
C-c C-c c	html-checkboxes
...

We see that there is no default sort order.
It's all just glued together as processing proceeded.
Even more reason to use my brilliant proposed order.

GNU Emacs 29.3




Acknowledgement sent to Dan Jacobson <jidanni@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70530; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 1 Mar 2025 03:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.