From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Justin Burkett Newsgroups: gmane.emacs.bugs Subject: bug#68929: [PATCH] Copy which-key from GNU ELPA into core Date: Thu, 8 Feb 2024 10:42:15 -0500 Message-ID: References: <871q9rvqbi.fsf@jeremybryant.net> <86wmrj148c.fsf@gnu.org> <87plx8rkps.fsf@jeremybryant.net> <86cyt7xyy7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20592"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jeremy Bryant , 68929@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 08 16:43:04 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 1rY6YK-00058a-Gv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Feb 2024 16:43:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY6Y7-0007IT-Gz; Thu, 08 Feb 2024 10:42:51 -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 1rY6Y6-0007Cf-23 for bug-gnu-emacs@gnu.org; Thu, 08 Feb 2024 10:42: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 1rY6Y4-00053l-Bw for bug-gnu-emacs@gnu.org; Thu, 08 Feb 2024 10:42:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rY6YI-0004At-FM for bug-gnu-emacs@gnu.org; Thu, 08 Feb 2024 10:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Justin Burkett Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Feb 2024 15:43:02 +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.170740697116030 (code B ref 68929); Thu, 08 Feb 2024 15:43:02 +0000 Original-Received: (at 68929) by debbugs.gnu.org; 8 Feb 2024 15:42:51 +0000 Original-Received: from localhost ([127.0.0.1]:33449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY6Y6-0004AT-NT for submit@debbugs.gnu.org; Thu, 08 Feb 2024 10:42:51 -0500 Original-Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:43332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY6Y3-0004AE-Cq for 68929@debbugs.gnu.org; Thu, 08 Feb 2024 10:42:49 -0500 Original-Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a388c5542e9so191966366b.1 for <68929@debbugs.gnu.org>; Thu, 08 Feb 2024 07:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burkett-cc.20230601.gappssmtp.com; s=20230601; t=1707406947; x=1708011747; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=MXdtm8cK03RNYP4EzBR/rBknorG7XugP9W/ELYMJBUE=; b=H1ETM2ZKIS7blcGjaOCkc4jMzKdn6Bpg7RQL9U7ScdJlOYLwnOI7CuR4C0Tjxiqew6 XYDw6OXxdxC1VWCanFsI36FCUebYO5Ab3qddva6g+gncZ3c9ubZhw9U8yb4fSbOGdT2h 5rK54CEy0XEk/myH9qKHMJFH0Ifq9b9+3/5e0KO+Vi0+z+MpECKBw0nKlyioOs4/3vuB IZiVy1a3GkhexA47FR9LvgNep+awkYzDCA5aLVE4pLoGQAS0n3QVfZ5K0tvNfKN6TAD4 XbmzQ3z4tpbtNJb00sf0xcPzfIQZIJuhpAN9tjFL3YGPK+uR1Ln5Efb/A33wOooTWTFd iXxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707406947; x=1708011747; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MXdtm8cK03RNYP4EzBR/rBknorG7XugP9W/ELYMJBUE=; b=jsBPhudKoJkhKYVj2FdtGM1zHj0J6oD3bM6IdHsSUpqCvbatk2IAcdrQCZf2ubd3VS lvkSO9PEk7dDJ5k2WTHgs4UYw6NySg29ALcjycSuAjw7G5IbqoM6aVDpR9QC8pYM8SdE NztlDFbJ9qyMw1E9y6hvfUhPdutaGCM2cWop5caBMFr88Q+j05VaD0sLiuISbJvTBkfb rJ09ao/b3NzP9vN8cv2P94FYRHyXkLCptcW0kiIE5pBPWhplRRKtuWtvaayd5EvmNpmH aWYrZMBl766gEH1dRGoJ0/Z1p01gOndpZe6PzcPZLMaAv7QKn8Y4OizLQGaHjIBGXc+r oPGg== X-Forwarded-Encrypted: i=1; AJvYcCVSKjnCrOCZ1QNMnczil5vnF5dBXNx9AaPZCG/vBVM+eQxEnsZp1wAbUaTyQAldWQ1RAs6GkV78pxJhMiWLDxYBLFY3XYI= X-Gm-Message-State: AOJu0YxnTeeRILBdGWOQYUTirmHM1Hf5qpC6ZwKd2rGuYWpLDqTz2heH 0tk6lDGfcwEmL4GPx4x6D5SGbvhTZhrVBcYkGbdqxr8tpsNNX6QUPCVObGHboMDbw95Va1eZZPS 1SYXOa2YPZ/6JEJb4maSWMiKphpJlEZWGUvQnlQ== X-Google-Smtp-Source: AGHT+IERqGaP6oe3TQq159P4r84WD7KOtjApw/iPfS7ZdyyccgzyJ+657J9xMZOJUXNvG2y+gRNJ6HFpyTa2GpqmEGE= X-Received: by 2002:a17:907:648:b0:a3b:ca3a:128c with SMTP id wq8-20020a170907064800b00a3bca3a128cmr459603ejb.22.1707406946863; Thu, 08 Feb 2024 07:42:26 -0800 (PST) In-Reply-To: <86cyt7xyy7.fsf@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:279642 Archived-At: Hi all, I appreciate the feedback. I have no doubt there are improvements to be made. To the extent that I reinvented the wheel, it was because I wasn't aware that particular wheel existed at the time. When I get time, I will work on the things that have been mentioned here. I do have a few questions and comments: 1. I think replacing third-party support with hooks that will allow whatever package to insert code where needed is a good idea, although some of these packages (like evil) have some pretty idiosyncratic needs if I remember correctly. 2. I would like to depend as much as possible on built-in functions, but I am probably unaware of all of the possibilities here, so any suggestions would be appreciated. There might also be libraries in emacs that have been written/improved since I wrote many of these functions. 3. There were some oddities that we ran into early on around computing the width of unicode characters that I did not fully understand, which is why there are some clunky options for those. The main issue was some characters came out wider than anticipated, breaking the width calculations for the table shown by which-key. I would be happy to improve those with guidance. 4. I never really liked the timer mechanism either, but I didn't find an alternative to detecting when emacs was in the middle of reading a key sequence. I like the idea of which-key as simply being a different describe-prefix-bindings function, but my sense is that novices appreciate the automatic popup. I'm wondering if anyone has any other ideas. In principle, one could have a hook that emacs uses to notify which-key that emacs is waiting on a key sequence, but maybe that is overkill. Thanks, Justin On Thu, Feb 8, 2024 at 1:16=E2=80=AFAM Eli Zaretskii wrote: > > > From: Jeremy Bryant > > Cc: 68929@debbugs.gnu.org, monnier@iro.umontreal.ca, justin@burkett.cc > > Date: Wed, 07 Feb 2024 22:01:05 +0000 > > > > > > Eli Zaretskii writes: > > > Two spaces between sentences in comments and doc strings, here and > > > elsewhere. > > > > OK. Related point - This is not in the Elisp manual "Tips for > > documentation strings", is it worth a patch for this? > > That section is not specific to the Emacs development. Our > conventions, which are specific to the Emacs development project, are > in CONTRIBUTE. > > > > Please add a :version tag to all defcustom's and defface's. > > > > I cannot locate this in the elisp manual, Appendix D "Tips and > > conventions", or in the defcustom and defface sections, should this be > > documented and how? > > It's already documented in CONTRIBUTE. Again, other Lisp programs out > there are free not to follow these guidelines (and, in fact, :version > might not have any useful effect in 3rd party packages), it is our own > convention whose purpose is to help "M-x customize-changed" do its job > well.