[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67955: [PATCH] Add use-package-vc-prefer-newest user option
From: |
Philip Kaludercic |
Subject: |
bug#67955: [PATCH] Add use-package-vc-prefer-newest user option |
Date: |
Sat, 30 Mar 2024 13:42:27 +0000 |
Tony Zorman <soliditsallgood@mailbox.org> writes:
> On Tue, Jan 16 2024 07:33, Philip Kaludercic wrote:
>> Tony Zorman <soliditsallgood@mailbox.org> writes:
>>
>>
>> [...]
>>
>>>> Yes, that was what I meant. I don't want to assume that users are
>>>> familiar with MELPA, so a brief comment to that effect should suffice.
>>>> Thanks!
>>>
>>> Okay, I've attached a new version of the patch.
>>>
>>> Thanks for the review!
>>> T
>>>
>>> From 8f207a132f669cf2486ecf0e12ade864a9a6912c Mon Sep 17 00:00:00 2001
>>> From: Tony Zorman <soliditsallgood@mailbox.org>
>>> Date: Thu, 21 Dec 2023 17:51:09 +0100
>>> Subject: [PATCH] Add use-package-vc-prefer-newest user option
>>>
>>> * lisp/use-package/use-package-core.el (use-package-vc-prefer-newest):
>>> User option to prefer the latest commit (as opposed to the latest
>>> release) of a package.
>>> (use-package-normalize--vc-arg): Check for
>>> use-package-vc-prefer-newest.
>>>
>>> * doc/misc/use-package.texi (Install package): Document
>>> use-package-vc-prefer-newest.
>>>
>>> * etc/NEWS: Document use-package-vc-prefer-newest.
>>> ---
>>> doc/misc/use-package.texi | 8 ++++++--
>>> etc/NEWS | 5 +++++
>>> lisp/use-package/use-package-core.el | 22 +++++++++++++++++++---
>>> 3 files changed, 30 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
>>> index d834e1be754..c2b6404b68b 100644
>>> --- a/doc/misc/use-package.texi
>>> +++ b/doc/misc/use-package.texi
>>> @@ -1639,8 +1639,12 @@ Install package
>>> would try -- by invoking @code{package-vc-install} -- to install the
>>> latest commit of the package @code{foo} from the specified remote.
>>>
>>> -This can also be used for local packages, by combining it with the
>>> -@code{:load-path} (@pxref{Load path}) keyword:
>>> +@vindex use-package-vc-prefer-newest
>>> +Alternatively, the @code{use-package-vc-prefer-newest} user option
>>> +exists to always prefer the latest commit.
>>> +
>>> +The @code{:vc} keyword can also be used for local packages, by
>>> +combining it with @code{:load-path} (@pxref{Load path}):
>>>
>>> @example
>>> @group
>>> diff --git a/etc/NEWS b/etc/NEWS
>>> index 03b8c3b517a..f9e01b14f92 100644
>>> --- a/etc/NEWS
>>> +++ b/etc/NEWS
>>> @@ -1035,6 +1035,11 @@ interactive Python interpreter specified by
>>> 'python-interpreter'.
>>> *** New ':vc' keyword.
>>> This keyword enables the user to install packages using 'package-vc'.
>>>
>>> ++++
>>> +*** New user option 'use-package-vc-prefer-newest'.
>>> +This allows the user to always install the newest commit of a package
>>> +when using the ':vc' keyword.
>>> +
>>> ** Gnus
>>>
>>> *** The 'nnweb-type' option 'gmane' has been removed.
>>> diff --git a/lisp/use-package/use-package-core.el
>>> b/lisp/use-package/use-package-core.el
>>> index d9343e14839..ba2e93c97e9 100644
>>> --- a/lisp/use-package/use-package-core.el
>>> +++ b/lisp/use-package/use-package-core.el
>>> @@ -346,6 +346,20 @@ use-package-compute-statistics
>>> :type 'boolean
>>> :group 'use-package)
>>>
>>> +(defcustom use-package-vc-prefer-newest nil
>>> + "Prefer the newest commit over the latest release.
>>> +By default, much like GNU ELPA and NonGNU ELPA, the `:vc' keyword
>>> +tracks the latest stable release of a package. If this option is
>>> +non-nil, the latest commit is preferred instead. This has the
>>> +same effect as specifying `:rev :newest' in every invocation of
>>> +`:vc'.
>>> +
>>> +Note that always tracking a package's latest commit might lead to
>>> +stability issues."
>>> + :type 'boolean
>>> + :version "30.1"
>>> + :group 'use-package)
>>
>> Sounds good to me, I think the patch can be merged. Any objections?
>
> I guess not? :)
OK. I have pushed the commit, but forgot to modify the commit message
with a reference to this bug report :/ In the future, it would be
helpful if you could add these as well (just a " (Bug#NNNNNN)" at the
end of the message), so that it becomes less probable to forget these
things.
> Tony
--
Philip Kaludercic on peregrine