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#67955: [PATCH] Add use-package-vc-prefer-newest user option Date: Sat, 30 Mar 2024 13:42:27 +0000 Message-ID: <8734s7zvi4.fsf@posteo.net> References: <87a5q3bf0e.fsf@hyperspace> <87a5paldfy.fsf@posteo.net> <878r4t18in.fsf@hyperspace> <87fryzxecx.fsf@posteo.net> <87h6jecpyk.fsf@hyperspace> <87ply1g2b0.fsf@posteo.net> <87o7aw6spn.fsf@hyperspace> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14729"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67955-done@debbugs.gnu.org, Stefan Kangas To: Tony Zorman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 30 14:43:13 2024 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 1rqYzI-0003e5-NA for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Mar 2024 14:43:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqYzA-0006kV-5O; Sat, 30 Mar 2024 09:43: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 1rqYz8-0006kF-4Z for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 09:43:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqYz7-000496-SB for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 09:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqYz9-0000cW-P1 for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 09:43:03 -0400 Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Mar 2024 13:43:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 67955@debbugs.gnu.org, philipk@posteo.net, soliditsallgood@mailbox.org Original-Received: via spool by 67955-done@debbugs.gnu.org id=D67955.17118061612301 (code D ref 67955); Sat, 30 Mar 2024 13:43:03 +0000 Original-Received: (at 67955-done) by debbugs.gnu.org; 30 Mar 2024 13:42:41 +0000 Original-Received: from localhost ([127.0.0.1]:44236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqYyl-0000ad-Ag for submit@debbugs.gnu.org; Sat, 30 Mar 2024 09:42:41 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:34389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqYyi-0000aO-RI for 67955-done@debbugs.gnu.org; Sat, 30 Mar 2024 09:42:38 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 5B7AA240101 for <67955-done@debbugs.gnu.org>; Sat, 30 Mar 2024 14:42:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711806148; bh=Qi6l8NKRwL6fFcbGvwodU0oWsiyyWdx52y/xUamFm4s=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=ZjXrcf0CmD/fFSsxwhkkBGTFteBZKniE5b5n8dx9rBBTp3IIlCGksKc2n+Wfv5uZk sncFN5JwCzkAueSowGEauBoXHjyQ9M94nIJo2s2OWUTSj6RqyvCT1IMsKs99spxs24 1Pryw4EIi78Uv2YAg3dH/A5YptAvOscTaDMMQUAf7Z3k6g9bcKNf+mJOJVrKf5n+eG g1tQjkVeMG+euJTr8dviHj3Ot0t6HcY9F/qlIed03I4l/xowrujMhi88QjR4Zo6JfS vjiZ+8imSjNdLIZo5DZPM1e2rygtB/s6IWfhdr7vNxbYaPWss5qweawDDl21geg8rL kMz8rNpyyLYNg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V6JNz6Qrkz6tyJ; Sat, 30 Mar 2024 14:42:27 +0100 (CET) In-Reply-To: <87o7aw6spn.fsf@hyperspace> (Tony Zorman's message of "Sat, 30 Mar 2024 09:15:32 +0100") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt 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:282368 Archived-At: Tony Zorman writes: > On Tue, Jan 16 2024 07:33, Philip Kaludercic wrote: >> Tony Zorman 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 >>> 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