GNU bug report logs - #68317
Can't sort *Packages* buffer by version after installing with package-vc

Previous Next

Package: emacs;

Reported by: Joseph Turner <joseph <at> breatheoutbreathe.in>

Date: Mon, 8 Jan 2024 09:10:02 UTC

Severity: normal

Fixed in version 30.1

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#68317: closed (Can't sort *Packages* buffer by version after
 installing with package-vc)
Date: Wed, 10 Jan 2024 08:29:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 10 Jan 2024 08:28:03 +0000
with message-id <878r4xwq24.fsf <at> posteo.net>
and subject line Re: bug#68317: Can't sort *Packages* buffer by version after installing with package-vc
has caused the debbugs.gnu.org bug report #68317,
regarding Can't sort *Packages* buffer by version after installing with package-vc
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
68317: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68317
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Joseph Turner <joseph <at> breatheoutbreathe.in>
To: Emacs Bugs Mailing List <bug-gnu-emacs <at> gnu.org>
Subject: Can't sort *Packages* buffer by version after installing with
 package-vc
Date: Mon, 08 Jan 2024 00:59:38 -0800
To reproduce:

1. Install some package using package-vc.

2. Open the *Packages* buffer: M-x list-packages.  The version column
for the newly installed package should display a git hash.

3. Click on the Version column header.  If the package's hash starts with
a letter, then instead of sorting the results, Emacs signals an error:

version-to-list: Invalid version syntax: ‘c99367ebc2f0afe0baaf2f5e5ca1ad9d62ba6e21’ (must start with a number)

Thank you!!

Joseph


[Message part 3 (message/rfc822, inline)]
From: Philip Kaludercic <philipk <at> posteo.net>
To: Joseph Turner <joseph <at> breatheoutbreathe.in>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 68317-done <at> debbugs.gnu.org
Subject: Re: bug#68317: Can't sort *Packages* buffer by version after
 installing with package-vc
Date: Wed, 10 Jan 2024 08:28:03 +0000
Joseph Turner <joseph <at> breatheoutbreathe.in> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: Philip Kaludercic <philipk <at> posteo.net>
>>> Cc: joseph <at> breatheoutbreathe.in,  68317 <at> debbugs.gnu.org
>>> Date: Tue, 09 Jan 2024 20:19:15 +0000
>>>
>>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>>
>>> >> From: Philip Kaludercic <philipk <at> posteo.net>
>>> >> Cc: Joseph Turner <joseph <at> breatheoutbreathe.in>,  68317 <at> debbugs.gnu.org
>>> >> Date: Tue, 09 Jan 2024 19:25:44 +0000
>>> >>
>>> >> Eli Zaretskii <eliz <at> gnu.org> writes:
>>> >>
>>> >> >> version-to-list: Invalid version syntax: ‘c99367ebc2f0afe0baaf2f5e5ca1ad9d62ba6e21’ (must start with a number)
>>> >> >
>>> >> > Sounds like package-vc-commit should be modified to produce a valid
>>> >> > version string (which SHA1 is not)?  Philip?
>>> >>
>>> >> We can also adjust `package-menu--version-predicate' to handle
>>> >> non-version numbers, which I think would be more robust.
>>> >
>>> > Fine by me, but can this be done safely enough for emacs-29?
>>>
>>> This would be a simple implementation, I don't know if it is safe enough
>>> for you:
>>
>> Looks safe enough, thanks.
>
> With this solution, when sorting by version, packages at version 0.0.0
> are interleaved with packages whose version string is a hash, such as:
>
>   breadcrumb                     c99367ebc2f0afe0baaf2f5e5ca1ad9d62ba6e21 source                No description available.
>   chordpro-mode                  a63fc0b7181299befc4496cba04e0f84d5953000 source                No description available.
>   consult-emms                   407edec0f2a997e32cb1bbeff811f73b6fac42ac source                No description available.
>   denote                         5e9b6b3bf0a81e00b0db0071f0c06a889f7e4a71 source                No description available.
>   disable-mouse                  0.0.0          external              Disable mouse commands globally
>   emacsql                        0.0.0          external              High-level SQL database front-end
>   hl-todo                        0.0.0          external              Highlight TODO and similar keywords
>   hyperdrive                     2930992446f508a7716b1e52a6aaf824d3f152d9 source                No description available.
>   jabber                         6900d9e085bbb2ef35b731c661fe54fa88422d6a source                No description available.
>   ledger-mode                    0.0.0          external              Helper code for use with the "ledger" command-line tool
>   lisp                           unknown        source                No description available.
>   macrostep                      0.0.0          external              Interactive macro expander
>
> While this is a little bit awkward, it's certainly better than an error.
>
> Thank you for the quick fix!

I agree it is not ideal, I can take a look at it again after emacs-29 is
cut.  But for now I'll mark the bug report as resolved.

> Joseph


This bug report was last modified 1 year and 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.