From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63800: [elpa] elpa-admin 1d766451f8: Suggest `package-install' to install packages (bug#63800) Date: Thu, 13 Jul 2023 13:26:41 -0400 Message-ID: References: <168924107008.19431.1227792773208531915@vcs2.savannah.gnu.org> <20230713093750.A9D48C06C6F@vcs2.savannah.gnu.org> <874jm8neeu.fsf@localhost> <87ilaolyrq.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6389"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 63800@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 13 19:27:31 2023 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 1qK06E-0001MO-7e for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Jul 2023 19:27:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qK05q-0002dv-TP; Thu, 13 Jul 2023 13:27:06 -0400 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 1qK05o-0002dP-UR for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 13:27:05 -0400 Original-Received: from [2001:470:142:5::43] (helo=debbugs.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qK05n-00034O-39 for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 13:27:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qK05m-0006jK-Uw for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 13:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2023 17:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63800 X-GNU-PR-Package: emacs Original-Received: via spool by 63800-submit@debbugs.gnu.org id=B63800.168926921125844 (code B ref 63800); Thu, 13 Jul 2023 17:27:02 +0000 Original-Received: (at 63800) by debbugs.gnu.org; 13 Jul 2023 17:26:51 +0000 Original-Received: from localhost ([127.0.0.1]:40779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qK05a-0006il-Rb for submit@debbugs.gnu.org; Thu, 13 Jul 2023 13:26:51 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:1859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qK05Y-0006iW-Pg for 63800@debbugs.gnu.org; Thu, 13 Jul 2023 13:26:49 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 89F4A1000C3; Thu, 13 Jul 2023 13:26:43 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6B27410009E; Thu, 13 Jul 2023 13:26:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1689269202; bh=6hUGzJjRk/e4U/uU2iRNETKDEUtJ3vDQnkQ4CyriUUc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dHeK9yrQu05w49J7gVbespYHkgoWCdgZ8RP2nB2jMezbc8HWxtX39poVxVkTy7UWw 4KXTDbnerdeC34rAGQ+0r29pSsTYBi2oS9v07m3pF+JqBbVHNm5kEsKtjOL7cZT6mQ QnPNonxZDP6goMw9SLgG2qaIz2DY24ouDZeWbtL+DSgcosiGTjKOvSAa51K7lZLGSy JsPgG/s+7nfEWEZM3gM+CJa8TtDfg85EaL2B6I6No+ka89YZBI1J9SSO6qpZorMQ4K mk21G0hz2w9Sy1tdMvf56pcbEqv3CavOzjaJBnWs7qI0Ol6jB/d8tZehhZY9kWBTCE RKp5SSxcjugZw== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5EC5A12037A; Thu, 13 Jul 2023 13:26:42 -0400 (EDT) In-Reply-To: <87ilaolyrq.fsf@localhost> (Ihor Radchenko's message of "Thu, 13 Jul 2023 13:35:53 +0000") 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:265038 Archived-At: Ihor Radchenko [2023-07-13 13:35:53] wrote: > Stefan Monnier writes: > >>> There is no bug in Emacs here. Just on ELPA page providing instructions >>> that are not working for :core packages. >> >> I still think there's a bug in there because the behavior may not be >> what the user expects. Maybe `package-install` should be improved so >> that, instead of doing nothing it tells or prompts the user about the >> possibility to upgrade the package (presumably only do it when called interactively). > > AFAIU, one of the problems is that already installed packages do not > even show up in the completion and one cannot enter > M-x package-install org . The last will only trigger > completion window where org is not listed at all. > > But wasn't this discussed in the past? There was quite a lengthy > discussion about this in the past (I did not quite follow it until the > end). > >>> I could also put the `list-packages' suggestion behind check if the >>> package is :core or not. >> >> That would be best. Even better would be to provide instructions we >> don't have to be ashamed of. E.g. replace `package-install` with >> `package-upgrade` for packages that are in-core. > > package-upgrade is not available in any of the released Emacs versions. > Do note that some people still use ELPA to install packages for Emacs > 26. How 'bout simply: diff --git a/elpa-admin.el b/elpa-admin.el index 2c2d2aeab7..3d2bdcc2ef 100644 --- a/elpa-admin.el +++ b/elpa-admin.el @@ -1863,10 +1863,7 @@ arbitrary code." (insert (format "
Badge
\n" (elpaa--html-quote name))) (elpaa--html-insert-docs pkg-spec) (insert "") - (insert (format "

To install this package, run in Emacs:

-
M-x list-packages RET
-

Then, find %s in the list, click on the link, and click

Install
.

" - name)) + (insert "

To install this package from Emacs, use package-install or list-packages.

") (let* ((readme-content (elpaa--get-README pkg-spec srcdir)) (readme-text plain-readme) (readme-html (elpaa--section-to-html readme-content)) -- Stefan