From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#62720: 29.0.60; Not easy at all to upgrade :core packages like Eglot Date: Tue, 25 Apr 2023 15:08:15 +0300 Message-ID: <60a19aa0-e87c-1702-4ef4-df4450ed8fc7@gutov.dev> References: <87a5zj2vfo.fsf@gmail.com> <83pm7y6fdo.fsf@gnu.org> <47140c27-ba63-ca7b-8b9e-cc38a6f9a866@gutov.dev> <838rem636a.fsf@gnu.org> <83leil4u63.fsf@gnu.org> <8a9d0e2b-6ae2-bcdc-efd0-52a44ac862bb@gutov.dev> <83h6t94hru.fsf@gnu.org> <7676c8d2-1324-31e7-38b3-de167ecf683a@gutov.dev> <8e9bd99a-3093-3b69-8429-aa1ae6b7240d@gutov.dev> <834jp82u5c.fsf@gnu.org> <83ildo189j.fsf@gnu.org> <6e91a10e-e8bb-c7db-f6ce-917790e7e391@gutov.dev> <83edoc1602.fsf@gnu.org> <8e4ec101-adc3-0d1b-af3d-cce92f17b874@gutov.dev> <83r0sbyuew.fsf@gnu.org> <83edoazr8k.fsf@gnu.org> <3fb17c71-2a37-b306-472b-d8bc845e5777@gutov.dev> <83a5yyznfe.fsf@gnu.org> <41a79777-2cc6-9562-8915-9f28070b7bc9@gutov.dev> <83cz3txzi5.fsf@gnu.org> <5ae14089-f76f-84a1-d39a-3ec9e473a0aa@gutov.dev> <83jzy0wggy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2401"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cc: jporterbugs@gmail.com, philipk@posteo.net, 62720@debbugs.gnu.org, monnier@iro.umontreal.ca, larsi@gnus.org, joaotavora@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 25 14:09:41 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 1prHUJ-0000MA-EA for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Apr 2023 14:09:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prHTk-0000oB-KI; Tue, 25 Apr 2023 08:09:04 -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 1prHTj-0000ny-3f for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2023 08:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prHTi-0001f5-RY for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2023 08:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prHTi-0004vP-IB for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2023 08:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Apr 2023 12:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62720 X-GNU-PR-Package: emacs Original-Received: via spool by 62720-submit@debbugs.gnu.org id=B62720.168242450818888 (code B ref 62720); Tue, 25 Apr 2023 12:09:02 +0000 Original-Received: (at 62720) by debbugs.gnu.org; 25 Apr 2023 12:08:28 +0000 Original-Received: from localhost ([127.0.0.1]:51564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prHT9-0004ua-Fw for submit@debbugs.gnu.org; Tue, 25 Apr 2023 08:08:28 -0400 Original-Received: from new1-smtp.messagingengine.com ([66.111.4.221]:55563) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prHT7-0004uJ-QX for 62720@debbugs.gnu.org; Tue, 25 Apr 2023 08:08:26 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id BB6F1581E20; Tue, 25 Apr 2023 08:08:20 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 25 Apr 2023 08:08:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1682424500; x=1682428100; bh=yIzudCmLVSntqrPErydLnG7EPvgg1zdkYQD MPfc6hO0=; b=GQNrYbQ3+2S8/41mD7DCykoy0Tgjunaa4HKdtR7o8A2kwMRB2Pi 9O6oApwAv+a97AGa3PxjrTKs4tEcSXZ5pd9t179YHZBDnTnzGDrcApaCxaAUoJBe dYgk1n4N5PBG68+jezWNUM1E5M63Cue5rugKUbVIQC4uFONhbq0YK4QW3fc3I/Aj bWm/Apel+KE5WrrkpSw/WtWcMpFTemrKdK/VuRQ7U4Lk7VXI+V+yf96JokZbx/lx //HzxPIEQZsvDabfPEY9Q2G4fdtG9/XX9z8f4hp8ziuYBgMT81cFBCEGVIV3PAbS LgSQAZT1mBg8B0Fb2qu4FDIqIO9WrDyD2fw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1682424500; x=1682428100; bh=yIzudCmLVSntqrPErydLnG7EPvgg1zdkYQD MPfc6hO0=; b=IyayXHw1BEviJnwX+MT6mFpSIwuOH3asdnNxhwvxI9RTH6L7Du3 P6gp4zl+Gi0aqXZL5jgPT4vnWNk93SlK61JnA8VLrpGQ8M+Y39Nm1jaeY5wQ9yKU yb8BOCx4uPu0wnGmtJOVni1Khv3otK1zU8+EEy5oid9G+E0RosWLCBqm44u9w5X2 SN2NLhPTZluod6gcuSbO4jBxzCIA6jUutL0bXVtmKwF4FVIWpe0kMirCZ2HfDyNh /oEi0EKN7Rhzc16D9CzcTu/1941SuYJnahJHTMaJ9FnWoHMCSdmLlohdZMGAN1au qi4LxPEPUctS6U3rKRQivU/VyZSuKnZaylA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeduvddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepjeffteelgfeiheelueejvdeutddtueegieegveevtdefhfduffetteeihfef hfevnecuffhomhgrihhnpegvlhdrihhtnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Apr 2023 08:08:17 -0400 (EDT) Content-Language: en-US In-Reply-To: <83jzy0wggy.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:260610 Archived-At: On 25/04/2023 10:47, Eli Zaretskii wrote: >> Date: Tue, 25 Apr 2023 02:45:46 +0300 >> Cc: jporterbugs@gmail.com, philipk@posteo.net, 62720@debbugs.gnu.org, >> joaotavora@gmail.com, larsi@gnus.org, monnier@iro.umontreal.ca >> From: Dmitry Gutov >> >>>> So what are we guarding against here? That the user will choose a >>>> built-in package to upgrade by accident? >>> >>> Yes. Also, against invocations of this command from other commands >>> and from the menu. >> >> It's not in the menu. > > There's this: > > runs the command > package-menu-mark-upgrades (found in package-menu-mode-map), which is > an interactive byte-compiled Lisp function in ‘package.el’. > > It is bound to U. > > (package-menu-mark-upgrades) > > Mark all upgradable packages in the Package Menu. > For each installed package with a newer version available, place > an (I)nstall flag on the available version and a (D)elete flag on > the installed version. A subsequent x > call will upgrade the package. package-menu-mark-upgrades does not delegate to package-update, for better or worse. As discussed previously, if we're going to change its behavior (of package-menu-mark-upgrades), we *will* hide that behind the pref. > I also envision that we will at some point have an "upgrade" menu > item, because it make little sense to have this command, but not to be > able to invoke it from the menu. We might. But since that will only happen in the future, by that time there won't be any users who are accustomed to using that menu item and thus possibly inconvenienced by the change in behavior. >> Very well, here's the next version. It adds a new optional argument to >> the function (so that people can evaluate e.g. (package-update 'eglot >> t)). When called interactively, it is determined by current-prefix-argument. > > Thanks, this is very close to what I had in mind. The only thing that > is missing is the support for user option, which should then avoid the > need to invoke the command with a prefix argument. > >> Also please review the docstring change. > > It looks OK to me. > >> -(defun package-update (name) >> - "Update package NAME if a newer version exists." >> +(defun package-update (name &optional update-built-ins) >> + "Update package NAME if a newer version exists. >> + >> +Only packages installed from ELPA are allowed to be updated this >> +way. > > I'm not sure I understand where this restriction comes from. Did the > original code enforce it? I'm not sure what you mean about "enforce it". That's the essence of the bug here: this function's inability to upgrade built-in packages (packages installed not from ELPA). Since you are asking to keep that behavior by default, it now needs to be documented. >> Regarding obeying package-install-upgrade-built-in, I think it would >> need to be renamed, and both package-update-all and >> package-menu-mark-upgrades would need to be made obey it too. All that >> could be done in a subsequent change. > > If the option will affect more than just package-install, it should > indeed be renamed. That will require some more work. On package-menu-mark-upgrades in particular. TBH, I'm getting more doubts about this change now. What will we do in Emacs 30? If we add the new argument, it will be hard to back out of it, to default to the proper behavior. Perhaps we should just wait and then fix it on master properly. Workarounds exist, after all.