From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#41721: 28.0.50; "f is undefined" in list-packages buffer Date: Fri, 05 Jun 2020 14:32:24 +0100 Message-ID: <87sgf9ocyf.fsf@tcd.ie> References: <5852dfe1-658b-b35b-5e70-4679026baf0b@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="73345"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41721@debbugs.gnu.org To: Platon Pronko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 05 15:33:20 2020 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 1jhCTG-000Iyy-Eh for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 15:33:18 +0200 Original-Received: from localhost ([::1]:42614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhCTF-0003KG-Hi for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 09:33:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhCT1-0003K0-32 for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 09:33:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhCT0-0005o3-IP for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 09:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhCT0-0003jA-F2 for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 09:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jun 2020 13:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41721 X-GNU-PR-Package: emacs Original-Received: via spool by 41721-submit@debbugs.gnu.org id=B41721.159136395514284 (code B ref 41721); Fri, 05 Jun 2020 13:33:02 +0000 Original-Received: (at 41721) by debbugs.gnu.org; 5 Jun 2020 13:32:35 +0000 Original-Received: from localhost ([127.0.0.1]:48570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhCSY-0003iJ-R8 for submit@debbugs.gnu.org; Fri, 05 Jun 2020 09:32:35 -0400 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:43924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhCSX-0003hv-0k for 41721@debbugs.gnu.org; Fri, 05 Jun 2020 09:32:33 -0400 Original-Received: by mail-wr1-f48.google.com with SMTP id l10so9760169wrr.10 for <41721@debbugs.gnu.org>; Fri, 05 Jun 2020 06:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=mZ0XqNFRrPvoAdSJ4YR6SyUMkBTtc8h3Z+WS79fE+Nc=; b=q39huG5WDjmqn5lWsg4LxhqFN3OJdgxV0psAuoh/UtkO5DBtDk+osGaeWv8oFWqlxg 9qS4sQiWYsn/gO11WxNbvjfP6R/yJuYTqr9+SnzpB+iObuD4UsXUj+dQgGQYh4gFkNm5 PlR+C70fpArVdvkA/Bvm4U1y7j4qw8eniT0zKB+Clbm+Ex3ywiRfp7SnmlV4m4Xy328E zPYFK2kic9p3I4XwVONpbhxnloMB4mHV+DBPMnKwG1R0lHyuWMz2FXSz6qT6Xk9miKmy gjsxHIVvhpeUVDc0e6ddiVHzLP/Vgb9WhxmRQaxdpaDoRj7D57mTtQB7VncDhQu7C0pz RHFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=mZ0XqNFRrPvoAdSJ4YR6SyUMkBTtc8h3Z+WS79fE+Nc=; b=ojkeEwI+gGubK6PE+qNK6FaQrC7YyWoTGo9wFKj14I5yrVtlvAl8267voQscjgTRwu 2eySpwbqDHdGsMW1LwRg9cYDkHSUMYWjs7zaV10wI8qXbGpeedOE+gJ7E8msdC9YYaea fSr03Xm9zRIvcaU8Mx9hLT4apZ/VcRThrOfIEYKVdGKwYY6RB2YEjtrncgvI4OMpJcJj ikERNoYctRcHiMeYwPIOFfWsuoNhdHaUe5IGGU2aiuQ7mQqRCaM5LOHi7OaVvHDucZUX 519ck6hlB3x+8QcJ1YSmjClMTSmjhuom8nYP93oxJybm8D3CGiDTdOquOAzqEeTaAPyw 21WA== X-Gm-Message-State: AOAM532rqDBHyhXWZXoMCTcrhRVlX8f75LC8s/AIwEleeBWm5Zh5B3c+ 1a6RveFNn35P+EDNnzQc+Kh61Q== X-Google-Smtp-Source: ABdhPJyfctV5Z0/oJrxa/c8PH2CiU1wB4LYVTZjo4ZNaiZNBVRKAbzfIe3vA9udq08Va5ECc+V0jqQ== X-Received: by 2002:a5d:490f:: with SMTP id x15mr9482702wrq.259.1591363946971; Fri, 05 Jun 2020 06:32:26 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id t14sm13315652wrb.94.2020.06.05.06.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 06:32:25 -0700 (PDT) In-Reply-To: <5852dfe1-658b-b35b-5e70-4679026baf0b@gmail.com> (Platon Pronko's message of "Fri, 5 Jun 2020 15:31:15 +0300") 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" Xref: news.gmane.io gmane.emacs.bugs:181559 Archived-At: --=-=-= Content-Type: text/plain tags 41721 + patch found 41721 27.0.50 quit Platon Pronko writes: > 1. 'emacs -Q' > 2. 'M-x list-packages' > 3. 'f' > 4. Observe message "f is undefined" This is because Emacs 27 introduced new filtering commands under the '/' prefix, so the old binding 'f' no longer exists: Filter packages by name in list-packages. (Bug#36981) f96b8fd27c 2019-10-08 19:24:12 +0200 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f96b8fd27c382a941c52c2938544b9b0e3a2fb0e Here's the relevant etc/NEWS entry: *** New functions for filtering packages list. A new function has been added which allows users to filter the packages list by name: 'package-menu-filter-by-name'. By default, it is bound to '/ n'. Additionally, the function 'package-menu-filter-by-keyword' has been renamed from 'package-menu-filter'. Its keybinding has also been changed to '/ k' (from 'f'). To clear any of the two filters, the user can now call the 'package-menu-clear-filter' function, bound to '/ /' by default. > When I type "h", in the help popup "f" is reserved to mean > "filter". Online documentation also mentions only "f" to filter the > packages: > https://www.gnu.org/software/emacs/manual/html_node/emacs/Package-Menu.html The online manual has not yet been updated because Emacs 27 is still at the pretest stage and not officially released. > In describe-mode I see that filtering is done using "/" prefix key, not with "f". Indeed. The problem with 'h' (package-menu-quick-help) is that it is both overengineered and limited in what it can do. What it does is take a word such as 'filter' and highlight a single character to indicate the corresponding key binding. E.g. ("filter" . 1) would highlight the 'i', and "/-filter" would highlight the '/'. This naively assumes that the key binding is a single character, which is no longer the case. On emacs-27, I propose we either remove the mention of filtering from the quick help altogether, or write "/-filter" and let the user figure out that '/' is actually a prefix that can be inspected in the usual ways, such as by following it with C-h or . For example: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Update-package-menu-quick-help.patch >From 2525ae19d7154abda896f0d2cad2fd57ee3e5c8c Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Fri, 5 Jun 2020 14:02:41 +0100 Subject: [PATCH] Update package-menu-quick-help * lisp/emacs-lisp/package.el (package--quick-help-keys): Filtering is now bound to the prefix '/', not the key 'f' (bug#41721). Advertise only the standard 'g' binding now that both it and 'r' are bound to revert-buffer (bug#35504). (package--prettify-quick-help-key): Avoid modifying string literals. (package-menu-filter): Reintroduce as obsolete alias of package-menu-filter-by-keyword for backward compatibility (bug#36981). --- lisp/emacs-lisp/package.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 7af40247f3..7d6be3cf4e 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3279,7 +3279,7 @@ package--quick-help-keys '(("install," "delete," "unmark," ("execute" . 1)) ("next," "previous") ("Hide-package," "(-toggle-hidden") - ("refresh-contents," "g-redisplay," "filter," "help"))) + ("g-refresh-contents," "/-filter," "help"))) (defun package--prettify-quick-help-key (desc) "Prettify DESC to be displayed as a help menu." @@ -3287,7 +3287,7 @@ package--prettify-quick-help-key (if (listp (cdr desc)) (mapconcat #'package--prettify-quick-help-key desc " ") (let ((place (cdr desc)) - (out (car desc))) + (out (copy-sequence (car desc)))) (add-text-properties place (1+ place) '(face (bold font-lock-warning-face)) out) @@ -3719,6 +3719,9 @@ package-menu-filter-by-keyword (list keyword) keyword))) +(define-obsolete-function-alias + 'package-menu-filter #'package-menu-filter-by-keyword "27.1") + (defun package-menu-filter-by-name (name) "Filter the \"*Packages*\" buffer by NAME. Show only those items whose name matches the regular expression -- 2.26.2 --=-=-= Content-Type: text/plain On master, we could change package-menu-quick-help to support arbitrary key bindings. WDYT? -- Basil --=-=-=--