From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: Re: GNU ELPA package discoverability Date: Mon, 25 May 2020 09:51:46 +0200 Organization: GNU Message-ID: <87o8qclael.fsf@gnu.org> References: <35DBF02E-44D7-41E5-A217-7D6EC84ED221@icloud.com> <4e937898-ae46-710a-cbca-e452a1156fa1@yandex.ru> <2e630dc7-ba1d-e4c9-74b3-4da976db1e82@yandex.ru> <87imglg51l.fsf@gnu.org> <83d06txuv4.fsf@gnu.org> <871rn9l35o.fsf@gnu.org> <83tv05waob.fsf@gnu.org> <874ks5gtca.fsf@gnu.org> <87h7w4oh5x.fsf@sachachua.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="54350"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , rms@gnu.org, Emacs-devel@gnu.org To: Sacha Chua Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 25 09:53:36 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jd7vS-000E52-S8 for ged-emacs-devel@m.gmane-mx.org; Mon, 25 May 2020 09:53:34 +0200 Original-Received: from localhost ([::1]:45704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jd7vR-00048X-UO for ged-emacs-devel@m.gmane-mx.org; Mon, 25 May 2020 03:53:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jd7u5-0002jj-1m for Emacs-devel@gnu.org; Mon, 25 May 2020 03:52:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45287) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jd7u3-0005kp-KZ; Mon, 25 May 2020 03:52:08 -0400 Original-Received: from lns-bzn-32-82-254-31-120.adsl.proxad.net ([82.254.31.120]:46228 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jd7tk-0004mH-V4; Mon, 25 May 2020 03:51:49 -0400 Original-Received: by guerry (Postfix, from userid 1000) id EACEF1A600E2; Mon, 25 May 2020 09:51:46 +0200 (CEST) In-Reply-To: <87h7w4oh5x.fsf@sachachua.com> (Sacha Chua's message of "Sun, 24 May 2020 22:57:30 -0400") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251353 Archived-At: --=-=-= Content-Type: text/plain Hi Sacha, thanks for the link to the discussion, it's always good to get such feedback from users! I don't know if we can make it easier to customize package-archives from the view the user get after M-x list-packages RET. I suggest to try enhancing the discoverability "upstream", by updating the default Emacs menu bar. For now, package is present in two menus: [Options] and [Help]. [Options] contains "Manage Emacs Packages" which M-x list-packages, so it does not solve the problem you are insisting on. [Help] contains "Search Built-in Packages" and "Find extra packages" which leads to an Info page, not directly to the customize menu. I suggest the following patch, which moves "Manage Emacs Packages" from the [Options] menu to the [Tools] menu and add these subitems: - List packages - Customize package archives (<= the option you want to promote) - Customize the package interface I think package is more a "tool" than an "option", so it makes sense to move it there. Also, as you mention, just listing packages leaves aside the possibility to customize the package sources, which is what most users may be looking for. I think "Search Built-in Packages" could also be moved to this new menu, while "Find extra packages" could stay in the [Help] menu, because -- but I don't have a strong opinion on those. I attach a (rough) patch for this idea, let me know if it sounds like an improvement to you! Best, -- Bastien --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=menu-bar.el.patch diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 9bc667acd6..0c26b415b6 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1414,10 +1414,6 @@ menu-bar-options-menu (bindings--define-key menu [customize] `(menu-item "Customize Emacs" ,menu-bar-custom-menu)) - (bindings--define-key menu [package] - '(menu-item "Manage Emacs Packages" package-list-packages - :help "Install or uninstall additional Emacs packages")) - (bindings--define-key menu [save] '(menu-item "Save Options" menu-bar-options-save :help "Save options set from the menu above")) @@ -1682,6 +1678,22 @@ menu-bar-shell-commands-menu menu)) +(defvar menu-bar-package-menu + (let ((menu (make-sparse-keymap "Manage Emacs Packages"))) + (bindings--define-key menu [customize-package] + '(menu-item "Customize the package tool" + (lambda () (interactive) (customize-group "package")) + :help "Customize the package interface")) + (bindings--define-key menu [customize-package-archives] + '(menu-item "Customize package archives" + (lambda () (interactive) (customize-variable 'package-archives)) + :help "Set the list of Emacs package sources")) + (bindings--define-key menu [list-packages] + '(menu-item "List packages" list-packages + :help "Browse a list of Emacs packages")) + + menu)) + (defun menu-bar-read-mail () "Read mail using `read-mail-command'." (interactive) @@ -1716,6 +1728,13 @@ menu-bar-tools-menu (bindings--define-key menu [separator-net] menu-bar-separator) + (bindings--define-key menu [package] + `(menu-item "Manage Emacs Packages" + ,menu-bar-package-menu)) + + (bindings--define-key menu [separator-package] + menu-bar-separator) + (bindings--define-key menu [browse-web] '(menu-item "Browse the Web..." browse-web)) (bindings--define-key menu [directory-search] --=-=-=--