From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#60418: [PATCH] Add :vc keyword to use-package Date: Fri, 05 May 2023 05:49:26 +0000 Message-ID: <87v8h7ba55.fsf@posteo.net> References: <87zgb6uk2r.fsf@hyperspace> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9437"; mail-complaints-to="usenet@ciao.gmane.io" Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 05 07:50:16 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 1puoKd-0002Bp-J9 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 May 2023 07:50:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puoKS-0006vC-Gg; Fri, 05 May 2023 01:50: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 1puoKQ-0006uu-8s for bug-gnu-emacs@gnu.org; Fri, 05 May 2023 01:50:02 -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 1puoKP-0007GH-Uu for bug-gnu-emacs@gnu.org; Fri, 05 May 2023 01:50:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1puoKP-0003tk-QF for bug-gnu-emacs@gnu.org; Fri, 05 May 2023 01:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 May 2023 05:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168326577614942 (code B ref 60418); Fri, 05 May 2023 05:50:01 +0000 Original-Received: (at 60418) by debbugs.gnu.org; 5 May 2023 05:49:36 +0000 Original-Received: from localhost ([127.0.0.1]:52915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puoJz-0003sv-Mn for submit@debbugs.gnu.org; Fri, 05 May 2023 01:49:36 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:47009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puoJx-0003sg-Rg for 60418@debbugs.gnu.org; Fri, 05 May 2023 01:49:34 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D631A240158 for <60418@debbugs.gnu.org>; Fri, 5 May 2023 07:49:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683265767; bh=rD88hd61+1oWxkezdTSLFahZdEobDggq1Bc0oa1Pt5Q=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=ZEt/Jz+TPh9nO1YcgcdehSxHY56ZGT3tl9nDCCjtbwa3bM8qt0/j9RJfRtrTwo4LZ PoIqmPP6KHn3tu/QAMBBiGHwFX/dHHgYBoyeu2GCC0nLC5H2vgB8hLtgkGbzfRuSZa tcGiB6a9WIhgnCewQhqxqN4JbkbdJnwt+V4/2G/syDr9S6Lavads26ANlw2Q52BPAU YJAQfL3r2+OcA7QkibviiY95tj5K+hweMYn2+IDXYwbhiLNbKeQc0jAIGuOL1qe9Kp F1uAPyyZl5mb/NRzPGJ1N4Uw2JPV7nsCn4f2Box9Jpn8YCVEtvSLsUhDq/bjg42od7 CAI/+1EiBcGzA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QCKWW1HBWz6txw; Fri, 5 May 2023 07:49:27 +0200 (CEST) In-Reply-To: <83ild7jq5c.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 May 2023 08:36:31 +0300") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM 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:261057 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Eli Zaretskii , 60418@debbugs.gnu.org, >> felician.nemeth@gmail.com, stefankangas@gmail.com >> Date: Fri, 05 May 2023 05:04:59 +0000 >> >> Tony Zorman writes: >> >> > You're right, but I don't think I'm using them as synonyms. There is a >> > big difference between >> > >> > (package-vc-install "foo") >> > >> > which installs the latest "commit" (or revision, which I'm actually >> > using as a synonym to commit) of a package, and >> > >> > (package-vc-install "foo" :last-release) >> > >> > which installs the latest "release". A release, as defined by >> > package-vc.el seems to be 'the latest revision that bumps the "Version" >> > tag.' It is queried in the package-vc--release-rev function, and >> > actually retrieved in vc-retrieve-tag. The "Version" tag is, I think, >> > just the "Version: XXX" string that's specified in the top comment of >> > the main elisp file of the respective repository. >> >> How about we just say "the commit of the latest release"? > > When package-vc-install is used, what is "the latest release"? isn't > that the HEAD of the default branch? IOW, what about packages that > make no releases at all? No, the commit of the latest release is interpreted the same way as elpa-admin.el does, namely the last revision that modified the "Version" header. If no such commit can be found, then a message is printed out and the installation continues under the assumption that the package is using a rolling-release model. >> >> All I know is that when I've read the documentation you wrote, I asked >> >> myself "what is meant by 'release' here?" I found the answer when you >> >> later wrote "last commit". >> >> >> >> Are you talking about commits? More generally, what kind of "release >> >> IDs" does :rev accept as its valid value? >> > >> > The :rev keyword accepts the same as REV of package-vc-install, which is >> > either >> > >> > - nil, signaling that the latest commit should be installed, >> > >> > - :last-release, signaling that the last release should be installed, >> > or >> > >> > - a "version string" appropriate for the respective version control >> > system, specifying that version (e.g., a specific commit hash). >> >> All correct. >> >> >> I understand that the same confusion could exist elsewhere, but that >> >> doesn't mean we should proliferate it or even live with what we have. >> >> We should instead clarify this in every place where we use this >> >> terminology. >> >> >> >> So let's figure out what are these "releases", and then let's examine >> >> the existing and the new documentation and see if we need to get our >> >> terminology right there. >> > >> > I totally agree, and I think the fact that "release" means "when has the >> > release version as specified in the main .el file changed" should be >> > documented somewhere (if it is I didn't see it). Sorry that this has >> > caused so much confusion. >> >> Are there any other places where we can fix this confusion? > > I guess the documentation of package-vc-install shares these issues? How does this sound like to you: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 8f62e7d65f3..b28e33b3b89 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -747,11 +747,14 @@ package-vc-install symbol whose name is the package name, and the URL for the package will be taken from the package's metadata. -By default, this function installs the last version of the package -available from its repository, but if REV is given and non-nil, it -specifies the revision to install. If REV has the special value -`:last-release' (interactively, the prefix argument), that stands -for the last released version of the package. +By default, this function installs the last revision of the +package available from its repository, but if REV is given and +non-nil, it specifies the revision to install. If REV has the +special value `:last-release' (interactively, the prefix +argument), an attempt is made to find the revision of the latest +release. This is done by looking up the last revision that +modified the \"Version\" header, as described in the Info +node `(elisp) Library Headers'. Optional argument BACKEND specifies the VC backend to use for cloning the package's repository; this is only possible if NAME-OR-URL is a URL, --=-=-= Content-Type: text/plain I can apply this or any variation thereof to emacs-29. --=-=-=--