From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68929: [PATCH] Copy which-key from GNU ELPA into core Date: Mon, 05 Feb 2024 14:32:19 +0200 Message-ID: <86wmrj148c.fsf@gnu.org> References: <871q9rvqbi.fsf@jeremybryant.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12246"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68929@debbugs.gnu.org, monnier@iro.umontreal.ca, justin@burkett.cc To: Jeremy Bryant Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 05 13:33:10 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rWy9t-0002wj-Py for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Feb 2024 13:33:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWy9c-0007zy-C3; Mon, 05 Feb 2024 07:32:52 -0500 Original-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 ) id 1rWy9a-0007za-5R for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 07:32:50 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rWy9Z-0005Uz-Ob for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 07:32:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rWy9l-0000HW-T8 for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 07:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Feb 2024 12:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68929 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68929-submit@debbugs.gnu.org id=B68929.17071363691062 (code B ref 68929); Mon, 05 Feb 2024 12:33:01 +0000 Original-Received: (at 68929) by debbugs.gnu.org; 5 Feb 2024 12:32:49 +0000 Original-Received: from localhost ([127.0.0.1]:50697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWy9Z-0000H4-5r for submit@debbugs.gnu.org; Mon, 05 Feb 2024 07:32:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWy9T-0000Gm-Vj for 68929@debbugs.gnu.org; Mon, 05 Feb 2024 07:32:48 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rWy9B-0005Rt-3i; Mon, 05 Feb 2024 07:32:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Cdo2KRx9zIV8lwPGFfvvMDrLH0tElUgdWkF1aVH+Q1c=; b=Lv8oe3DBWabD +ik8aORtGs9cY0uZ3IyUZ0SDojh1V7q8L3M+h/+r3emh13LvIM6ajaIfBxiHoh2vLodJnEMaqcLmS QY9kNKRJIKz4Rv0B5ewNKLf1UcZOujN4X3ATSzZsJBn9YwFw651Q9FO7aEchTtaGanZBGmzwr3n9h HOshWHrF4Z+ibwv0gvOhJ/fcj6Jl3uMT/gcGktSh0gv+tlwh2RPycpnQ0ei7euGi8VZNMxc8LInP8 iYUqO+Fe4GjtISLO69cOKBLrFmLpEUEeXZe/UGtTuDJ6ClzFDDgiUlc4Sb7A5vBpvcM3IvOYesZBh 5uAwnd6CGb096YOhpc8IyQ==; In-Reply-To: <871q9rvqbi.fsf@jeremybryant.net> (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279442 Archived-At: > Date: Sun, 04 Feb 2024 22:02:50 +0000 > From: Jeremy Bryant via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > This patch brings the latest version of which-key from GNU ELPA into > Emacs core > > If suitable I will then work on the updates to user-facing aspects such as > manual and NEWS. This "needs work"... Based on a very superficial reading of this huge file: > +;; which-key provides the minor mode which-key-mode for Emacs. The mode displays ^^ Two spaces between sentences in comments and doc strings, here and elsewhere. > +(defcustom which-key-idle-delay 1.0 > + "Delay (in seconds) for which-key buffer to popup. > +This variable should be set before activating `which-key-mode'. > + > +A value of zero might lead to issues, so a non-zero value is > +recommended > +(see https://github.com/justbur/emacs-which-key/issues/134)." > + :group 'which-key > + :type 'float) Please add a :version tag to all defcustom's and defface's. > +(defcustom which-key-idle-secondary-delay nil > + "Once the which-key buffer shows once for a key sequence reduce > +the idle time to this amount (in seconds). This makes it possible The first sentence of a doc string should be a single complete sentence. In this case I suggest Number of seconds to reduce idle-timer delay after showing which-key once. > +(defcustom which-key-min-column-description-width 0 > + "Every column should at least have this width." This needs details, otherwise it's mot very useful. > +(defcustom which-key-unicode-correction 3 > + "Correction for wide unicode characters. > +Since we measure width in terms of the number of characters, > +Unicode characters that are wider than ASCII characters throw off > +the calculation for available width in the which-key buffer. This > +variable allows you to adjust for the wide unicode characters by > +artificially reducing the available width in the buffer. > + > +The default of 3 means allow for the total extra width > +contributed by any wide unicode characters to be up to one > +additional ASCII character in the which-key buffer. Increase this > +number if you are seeing characters get cutoff on the right side > +of the which-key popup." This seems to be a sub-optimal way of accounting for character widths. We have better ways, e.g., char-width, string-pixel-width etc. > +(defcustom which-key-dont-use-unicode nil > + "If non-nil, don't use any unicode characters in default setup." This should mention the settings affected by it. Please go through all the doc strings and make sure they are sufficiently self-explanatory. Thanks.