From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62720: 29.0.60; Not easy at all to upgrade :core packages like Eglot Date: Thu, 13 Apr 2023 18:03:19 +0300 Message-ID: <83mt3b4yfc.fsf@gnu.org> References: <87a5zj2vfo.fsf@gmail.com> <87h6tlleg0.fsf@gmail.com> <8335558qc7.fsf@gnu.org> <83sfd5761f.fsf@gnu.org> <87zg7djrgr.fsf@gmail.com> <83o7nt73za.fsf@gnu.org> <83mt3d73c2.fsf@gnu.org> <87r0sptinq.fsf@posteo.net> <83jzyh706c.fsf@gnu.org> <875ya1tdwf.fsf@posteo.net> <83edop6sdy.fsf@gnu.org> <831qkp6o0i.fsf@gnu.org> <83wn2h5825.fsf@gnu.org> <87wn2gkhzr.fsf@posteo.net> <83cz485oxi.fsf@gnu.org> <87leiwdyff.fsf@posteo.net> <834jpk5hih.fsf@gnu.org> <871qkom3fj.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4239"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 62720@debbugs.gnu.org, joaotavora@gmail.com, monnier@iro.umontreal.ca To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 13 17:03:51 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 1pmyUI-0000oN-Tb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Apr 2023 17:03:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmyTn-0007AF-1F; Thu, 13 Apr 2023 11:03:19 -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 1pmyTb-00079S-MA for bug-gnu-emacs@gnu.org; Thu, 13 Apr 2023 11:03:08 -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 1pmyTW-00047N-MR for bug-gnu-emacs@gnu.org; Thu, 13 Apr 2023 11:03:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmyTW-0006kb-2G for bug-gnu-emacs@gnu.org; Thu, 13 Apr 2023 11:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Apr 2023 15:03: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.168139816025893 (code B ref 62720); Thu, 13 Apr 2023 15:03:02 +0000 Original-Received: (at 62720) by debbugs.gnu.org; 13 Apr 2023 15:02:40 +0000 Original-Received: from localhost ([127.0.0.1]:44447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmyT9-0006jZ-QG for submit@debbugs.gnu.org; Thu, 13 Apr 2023 11:02:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmyT8-0006jM-5a for 62720@debbugs.gnu.org; Thu, 13 Apr 2023 11:02:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmyT2-0003y3-C2; Thu, 13 Apr 2023 11:02:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=uHV/oX0DpGOw+fGC6KK3yxogFhYFGhySjBKNErxJ4MI=; b=HOKXPT2gWd91g3UBa4/2 oCDEsfQdIlkWj4lePJnqLndf6nztomr/2cYbKFtMhmZLQ+K/Esw8d7REhINjwTSXxkLPdQ+NhSqli gRAuZQfs4/zdTRIlt46a75CG72epIxP6XzsbNGZjvJiKjmGRlxKu+S7mJG34IZeCdiHYf6e8B5++c GWTF6ZNEA6yE62D0fF3Rz+SxQqk5NOUFtX9123wIF28N9RAUwxCm8KirZ/U79bi9RwUh3/p5WjkJW etw1kCzvYUxJfQ/NmzKRVgEJIm6Zwyxbsfjxbb9SoqbyGysc7mI8nigcvqSEs52cSH+nhlH5ic37e dG6UIr7Bup/ukA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmyT1-0004Uh-QN; Thu, 13 Apr 2023 11:02:32 -0400 In-Reply-To: <871qkom3fj.fsf@posteo.net> (message from Philip Kaludercic on Thu, 13 Apr 2023 11:23:12 +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:259861 Archived-At: > From: Philip Kaludercic > Cc: joaotavora@gmail.com, monnier@iro.umontreal.ca, 62720@debbugs.gnu.org, > larsi@gnus.org > Date: Thu, 13 Apr 2023 11:23:12 +0000 > > > Why did the original code use symbol-name, but the new one doesn't? > > To my knowledge, completing-read given a collection of symbols will use > the symbol names as candidates, or is this more complicated? So you are saying that the symbol-name call in the original code was simply redundant? > >> @@ -2221,11 +2236,16 @@ package-install > >> (package--save-selected-packages > >> (cons name package-selected-packages))) > >> (if-let* ((transaction > >> - (if (package-desc-p pkg) > >> - (unless (package-installed-p pkg) > >> - (package-compute-transaction (list pkg) > >> - (package-desc-reqs pkg))) > >> - (package-compute-transaction () (list (list pkg)))))) > >> + (cond > >> + ((package--upgradable-built-in-p pkg) > >> + (let ((desc (cadr (assq name package-archive-contents)))) > >> + (package-compute-transaction > >> + (list desc) (package-desc-reqs desc)))) > >> + ((package-desc-p pkg) > >> + (and (not (package-installed-p pkg)) > >> + (package-compute-transaction > >> + (list pkg) (package-desc-reqs pkg)))) > >> + ((package-compute-transaction () (list (list pkg))))))) > > > > I think the first condition of 'cond' should be > > > > ((and current-prefix-arg (package--upgradable-built-in-p pkg)) > > > > to make sure we don't affect the non-prefix-arg invocations in any > > way. > > The issue here is that this breaks the non-interactive invocations like > (package-install 'eglot), unless they invoke the function while binding > `current-prefix-arg', which I don't think is a common practice. Then let's add another optional argument, and let prefix arg set it. Would that resolve this issue? > >> Note that (package-install 'eglot) does download code, but I believe > >> that this is the correct approach and would align with what João > >> wanted. > > > > I'm not sure I follow: which code does the above download? > > I did not change any of the code that downloads anything, all this does > is prompt the user for built-in packages when invoked interactively with > a prefix argument and if package-install is invoked with a built-in > package, then it will switch to the ELPA version. This will not happen > in interactive usage, since `completing-read' is called with > REQUIRE-MATCH. So you are saying that non-interactive calls to package-install could install Eglot from ELPA even without the changes, is that right?