unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com,
	60418@debbugs.gnu.org, stefankangas@gmail.com
Subject: bug#60418: [PATCH] Add :vc keyword to use-package
Date: Fri, 05 May 2023 05:49:26 +0000	[thread overview]
Message-ID: <87v8h7ba55.fsf@posteo.net> (raw)
In-Reply-To: <83ild7jq5c.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 May 2023 08:36:31 +0300")

[-- Attachment #1: Type: text/plain, Size: 3233 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  60418@debbugs.gnu.org,
>>   felician.nemeth@gmail.com,  stefankangas@gmail.com
>> Date: Fri, 05 May 2023 05:04:59 +0000
>> 
>> Tony Zorman <soliditsallgood@mailbox.org> 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:


[-- Attachment #2: Type: text/plain, Size: 1269 bytes --]

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,

[-- Attachment #3: Type: text/plain, Size: 56 bytes --]


I can apply this or any variation thereof to emacs-29.

  reply	other threads:[~2023-05-05  5:49 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-29 18:43 bug#60418: [PATCH] Add :vc keyword to use-package Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found] ` <handler.60418.B.167238381823776.ack@debbugs.gnu.org>
2023-01-14 12:48   ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-31 14:13     ` Felician Nemeth
2023-03-31 15:38       ` Philip Kaludercic
2023-04-07 14:11         ` Philip Kaludercic
2023-04-08  8:48           ` Felician Nemeth
2023-04-08  9:06             ` Philip Kaludercic
2023-04-08  9:25               ` Felician Nemeth
2023-04-08 10:41                 ` Philip Kaludercic
2023-04-11 14:10                   ` Felician Nemeth
2023-04-12  7:12                 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-12  7:34                   ` Philip Kaludercic
2023-04-12  9:00                     ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-16 15:43                       ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-16 16:10                         ` Eli Zaretskii
2023-04-17 19:39                           ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-18 12:13                             ` Eli Zaretskii
2023-04-19 17:38                               ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-22  9:26                                 ` Eli Zaretskii
2023-04-22 11:34                                   ` Philip Kaludercic
2023-04-23  5:51                                     ` John Wiegley
2023-04-22 11:32                                 ` Philip Kaludercic
2023-04-23  6:07                                   ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-23 12:35                                     ` Philip Kaludercic
2023-04-24 12:36                                       ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-01 19:43                                         ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-01 20:01                                           ` Philip Kaludercic
2023-05-02 13:18                                             ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-02 13:59                                               ` Robert Pluim
2023-05-02 15:09                                               ` Eli Zaretskii
2023-05-02 14:36                                             ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-02 12:40                                           ` Eli Zaretskii
2023-05-02 14:22                                             ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-02 15:16                                               ` Eli Zaretskii
2023-05-04  8:13                                                 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-04 10:39                                                   ` Eli Zaretskii
2023-05-05  5:04                                                   ` Philip Kaludercic
2023-05-05  5:36                                                     ` Eli Zaretskii
2023-05-05  5:49                                                       ` Philip Kaludercic [this message]
2023-05-05  6:53                                                         ` Eli Zaretskii
2023-05-05 17:15                                                           ` Philip Kaludercic
2023-05-05 18:45                                                             ` Eli Zaretskii
2023-05-06 18:50                                                               ` Philip Kaludercic
2023-05-06 19:13                                                                 ` Eli Zaretskii
2023-05-07  7:34                                                                   ` Philip Kaludercic
2023-05-06 19:39                                                                 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-07  8:52                                                                   ` Philip Kaludercic
2023-05-16 19:30                                                                     ` Philip Kaludercic
2023-05-17  5:42                                                                       ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-16 16:18                         ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8h7ba55.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=60418@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=felician.nemeth@gmail.com \
    --cc=soliditsallgood@mailbox.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).