From unknown Sun Aug 17 01:00:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Dec 2023 18:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 67955@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170318243729151 (code B ref -1); Thu, 21 Dec 2023 18:14:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Dec 2023 18:13:57 +0000 Received: from localhost ([127.0.0.1]:45392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGNYS-0007a6-MG for submit@debbugs.gnu.org; Thu, 21 Dec 2023 13:13:57 -0500 Received: from lists.gnu.org ([2001:470:142::17]:48030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGNYQ-0007Zp-Jp for submit@debbugs.gnu.org; Thu, 21 Dec 2023 13:13:55 -0500 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 1rGNYE-0003Ut-6A for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 13:13:42 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rGNYA-0005F0-6P for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 13:13:41 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Swz7l019zz9sVm for ; Thu, 21 Dec 2023 19:13:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1703182403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=0ieZ/Jths5QfVumZ+8iofMN1Y3rmjuSJLdnItFD90kA=; b=jeTposH3kystTzmRLXlFH7SvZf32qksu+8bXaFUwPDgBGm1I2/paEpWbeOglF1qMe4nVzy KU6AZ2BxWoHJwDbUcXGxtfck4Iyn8fs63jHJHf+92yNbMdSXqgwD6By43an4hiFb42LFW6 SwGpgMuT9lZhQOkbBWABlfwKwQAJkUffCSxihouANqBtp1e/w4ywTdiDF2H3qiSDehnN6z caDkp+xjCUxqueVpwEnsv5vuYGIrAQo0lmnzAAr6jaHxtoiL7Z043kBGYI6oTUgOBpZfh3 f7QE/YQB8ANBsLItki+HJkCLt32lTYqqPScX4HtBk71MkOOF6OalktXwBi4owg== From: Tony Zorman Date: Thu, 21 Dec 2023 19:13:21 +0100 Message-ID: <87a5q3bf0e.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: apdd6rkws5hfu8m34ufi93mz1nwigjio X-MBO-RS-ID: 76234a625fff78ebe91 Received-SPF: pass client-ip=80.241.56.151; envelope-from=soliditsallgood@mailbox.org; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Hi, as stated in the subject, the attached patch adds a 'use-package-vc-prefer-newest' user option. When non-nil, packages installed with use-package's :vc keyword will default to the latest commit, instead of the latest release. Thanks Tony --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-use-package-vc-prefer-newest-user-option.patch >From c7271b7f50f7628757bd9d7070a4b4d8a5f05bb4 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 | 17 ++++++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index 37ed50ab2b1..ea0504b3deb 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 b39dd5f5ab6..100c6b78291 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -971,6 +971,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 2897b60b2f9..cb3d73ee284 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -346,6 +346,15 @@ use-package-compute-statistics :type 'boolean :group 'use-package) +(defcustom use-package-vc-prefer-newest nil + "Prefer the newest commit over the latest release. +If non-nil, the `:vc' keyword will prefer the latest commit of a +package instead of the latest stable release. This has the same +effect as specifying `:rev :newest' in every invocation of `:vc'." + :type 'boolean + :version "30.1" + :group 'use-package) + (defvar use-package-statistics (make-hash-table)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1649,9 +1658,11 @@ use-package-normalize--vc-arg (if (and s (stringp s)) (intern s) s)) (normalize (k v) (pcase k - (:rev (cond ((or (eq v :last-release) (not v)) :last-release) - ((eq v :newest) nil) - (t (ensure-string v)))) + (:rev (pcase v + ('nil (if use-package-vc-prefer-newest nil :last-release)) + (:last-release :last-release) + (:newest nil) + (_ (ensure-string v)))) (:vc-backend (ensure-symbol v)) (_ (ensure-string v))))) (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) -- 2.42.0 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 22 09:59:14 2023 Received: (at control) by debbugs.gnu.org; 22 Dec 2023 14:59:15 +0000 Received: from localhost ([127.0.0.1]:47564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGgza-00046S-MY for submit@debbugs.gnu.org; Fri, 22 Dec 2023 09:59:14 -0500 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:59898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGgzY-00046F-TP for control@debbugs.gnu.org; Fri, 22 Dec 2023 09:59:13 -0500 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-50e39ac39bcso2413191e87.3 for ; Fri, 22 Dec 2023 06:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703257142; x=1703861942; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=7y9c5kxZqtcMi8ikuZQZL+pg1IjE0r+cjfr9YbC1xdw=; b=Co2tMRftDJ2zsGCtRF2LLbcM8z2Ju3vgeWWIFsglG3aOA29IQ5uimEJQmK0mrr79MD gB4gQAXw5SZB6g6adui3ePyv0l3MiWTH1BVoyTikCQvZGsUhUAcUHzHj+gQ6mp+H8FXx RT9rgaOrzPXJBupB29TCEo2KuSUVCo/UndnkNYWBkEKAVVg9ScSdTNXdRYnrr+tAhbZ1 cqPNKILz1uKyIP0yhj1eu9GCwqAGiQ0zk/Fk43R6Ld0ibZHrzNzzSiS/PuWKd/OR9yUP Ewsv9tuipcewu86uaCdEm5vaf4hoUqGD7Gqc0ZWO6KOLX62TBkUMMfTTFHC2bfWmz6st 9OVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703257142; x=1703861942; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7y9c5kxZqtcMi8ikuZQZL+pg1IjE0r+cjfr9YbC1xdw=; b=S7InWiHo091mcBBZTmOo4BC0MhYPU7p/bfLZ3TCHNrGpJnoAw3m5KBuIVMxQLl6j08 6FpQo/Uyu34IIiHN3+29EMQpRKP7RfhbV0qxj3tZBGeYZoGmJNuAdV+wjK5h6ZG5+24c 7HQ579w4ydnsfLmFfEpWVzEB7Mi2Bzo+UwOa8m/mZUuP8x6WLJjXkS71jkc+QPwC8EtI KKklq2BL5uURaKtPRk/st+B5+EYaS8/8UFbIsWcJ+OiBE4XPS44k9igMGBXdP0+pKl7R GdQ28lmfZNfrzmAToVPfRj/cfst9470AnYsBa74kX4Bb5PTbpgaFp4ZGnOm0/s4BU2jH z9Ag== X-Gm-Message-State: AOJu0YwrTqaU0PSxJFoEDu1ojeB3zoO2KbGrMN3ESB257oXDNm/Llwl6 2azuWiLDXWyo4mAZ5HEu/ZIr+5Z9BeyUO6jnU8Efdy5jsaLtQQ== X-Google-Smtp-Source: AGHT+IHKHS6cTxvIX1gDMn+6Kdj5cVaRqeUjCt69JQSlFkmjNCUoijtHXGi/8jfXJY/nHPzkVTR/wY33RQS+u1ZFFgM= X-Received: by 2002:a05:6512:3585:b0:50e:6dd7:1570 with SMTP id m5-20020a056512358500b0050e6dd71570mr90273lfr.219.1703257142251; Fri, 22 Dec 2023 06:59:02 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Dec 2023 06:59:01 -0800 From: Stefan Kangas MIME-Version: 1.0 Date: Fri, 22 Dec 2023 06:59:01 -0800 Message-ID: Subject: control message for bug #67955 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 67955 wishlist quit From unknown Sun Aug 17 01:00:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jan 2024 21:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: Philip Kaludercic , 67955@debbugs.gnu.org Received: via spool by 67955-submit@debbugs.gnu.org id=B67955.170500689632751 (code B ref 67955); Thu, 11 Jan 2024 21:02:03 +0000 Received: (at 67955) by debbugs.gnu.org; 11 Jan 2024 21:01:36 +0000 Received: from localhost ([127.0.0.1]:34128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO2BC-0008Vq-TR for submit@debbugs.gnu.org; Thu, 11 Jan 2024 16:01:35 -0500 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:45424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO2B5-0008Kn-51 for 67955@debbugs.gnu.org; Thu, 11 Jan 2024 16:01:32 -0500 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50ea9e189ebso6412229e87.3 for <67955@debbugs.gnu.org>; Thu, 11 Jan 2024 13:01:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705006884; x=1705611684; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=E53G/G41KA7xbEDgni919d4MJtANZBIopKhi/Ejo85Q=; b=RGcv9PTPv3xOP0rjj+Mkw3PW1bMkUpz8JRl7QBLzhqZ1EeRGa0fZJhr1JPN833wOxf nizEdnVl/f7tlGio7R4ajwnDyjz/Zg/dE//JLhYIUB6GZdMpXM+PEoh5ck7p0KaPQt53 jLTG9Zn+RSJlGXbTshmdSiSuFW2Y31TwZo4K35/aK5sQz9WfzzCTYEuRowH8TMQ8GOIc 6A2NDfRkd/805xED4ZJpiS59DWgRVPKnlW2e2soiV1QCfIx+8tITIqFGp0zQ2P8Sbf9k PE+N7Z1vuIeuTmcc7agfnjnfX7Sk/2HhhWv4cFp7tOGqLbX8JjJF0bpOqhdH/7GsRkfS Gc5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705006884; x=1705611684; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=E53G/G41KA7xbEDgni919d4MJtANZBIopKhi/Ejo85Q=; b=T6g+DzZ1WU+4gGsrI7dYdyPVbFGUkg2Ddw6A03thHFBZP+B9QNrlaqv6G5v7Bft50B /KKzbHueP9WhXLg2Qw5zJQ9vh4IISMzpUcMCOy28SRSe0O85PUzyc2ag+aIMv7krrLUA e3COJ/egjGAGgKKMZdJAjuPRwCluSqI+NrB4elGXkrjgWkW8Ixbu3ykgLA3ph6AL2RJ7 TB87+5uWpFlFHe7cewmEYkvxqk7QihrWTgCSLCU3XLQmML4VTbI/ou2Ks8z1a6LlXU9p HPjL0xVemFfGXb6AGt35uaF85HTH7TRyMSu9jIHm6EVfHc/UgJ0PVN9bS79HVVOxBWta HYiQ== X-Gm-Message-State: AOJu0YyiTqhhWo9GVyZ661zXJDLyBZE8dKHiIfPpinZIGmG25THYpT9O 2eeMpMlkKHwlzTDfPGk6qXuTOsM27N80MR5NHbY= X-Google-Smtp-Source: AGHT+IHxFYO/cirz5UYiaJzsQbNdzId9lw6nE5VG7zrusU2CxOKW1pcN4FSL8EFXeLstk7wuNBPJCw69iz4otTeFvUg= X-Received: by 2002:a05:6512:1047:b0:50e:86af:97e3 with SMTP id c7-20020a056512104700b0050e86af97e3mr167001lfb.76.1705006883578; Thu, 11 Jan 2024 13:01:23 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 11 Jan 2024 13:01:23 -0800 From: Stefan Kangas In-Reply-To: <87a5q3bf0e.fsf@hyperspace> (Tony Zorman's message of "Thu, 21 Dec 2023 19:13:21 +0100") References: <87a5q3bf0e.fsf@hyperspace> MIME-Version: 1.0 Date: Thu, 11 Jan 2024 13:01:23 -0800 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Tony Zorman writes: > Hi, > > as stated in the subject, the attached patch adds a > 'use-package-vc-prefer-newest' user option. When non-nil, packages > installed with use-package's :vc keyword will default to the latest > commit, instead of the latest release. Philip, could you take a look at this patch please? From unknown Sun Aug 17 01:00:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jan 2024 16:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: 67955@debbugs.gnu.org Received: via spool by 67955-submit@debbugs.gnu.org id=B67955.17050771792637 (code B ref 67955); Fri, 12 Jan 2024 16:33:01 +0000 Received: (at 67955) by debbugs.gnu.org; 12 Jan 2024 16:32:59 +0000 Received: from localhost ([127.0.0.1]:37466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOKSo-0000gT-R8 for submit@debbugs.gnu.org; Fri, 12 Jan 2024 11:32:59 -0500 Received: from mout01.posteo.de ([185.67.36.65]:39731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOKSk-0000fx-EB for 67955@debbugs.gnu.org; Fri, 12 Jan 2024 11:32:57 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3FC03240027 for <67955@debbugs.gnu.org>; Fri, 12 Jan 2024 17:32:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705077170; bh=GW1+kCmMkidknIcCtZksfk9Pj/C5HhPtgM6R6HCRml0=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=fZ/fEjzmP4Kuje9D0tXEjFoam5a5Igvm4RBehLDXaIwaNXTUTEqFp/nzYaIx2Wk1t am82oI/ZrELyYWU+ifo9LHYFT4E9/qUEJD0QGyHnmAicIcl24evZSM3CG7a1MYa0jY A6yyL8fUjBJNJfbhIAFiRrlpWHw8ln/1r9OnsdbhyhE2IqFKXl09JUtl4fJFT3wyF7 phccp4k49tB6SHgZOkTwRndhTnd+XouQkYyvsrYsIKhJ71QruuCzvFZ+BF3v3P5ZEP T9V6RFB85MSx06IvAlSu5IgHn4YSUWwsl/8Vvz8nvNJdRYcRL02J4F5HpcAeC0Z1Fb pHO6IxWuaLoEw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TBRsY5HBGz6tsf; Fri, 12 Jan 2024 17:32:49 +0100 (CET) From: Philip Kaludercic In-Reply-To: <87a5q3bf0e.fsf@hyperspace> (Tony Zorman's message of "Thu, 21 Dec 2023 19:13:21 +0100") References: <87a5q3bf0e.fsf@hyperspace> 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 OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 12 Jan 2024 16:32:49 +0000 Message-ID: <87a5paldfy.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tony Zorman writes: > Hi, > > as stated in the subject, the attached patch adds a > 'use-package-vc-prefer-newest' user option. When non-nil, packages > installed with use-package's :vc keyword will default to the latest > commit, instead of the latest release. > > Thanks > Tony > >>>From c7271b7f50f7628757bd9d7070a4b4d8a5f05bb4 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 | 17 ++++++++++++++--- > 3 files changed, 25 insertions(+), 5 deletions(-) > > diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi > index 37ed50ab2b1..ea0504b3deb 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 b39dd5f5ab6..100c6b78291 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -971,6 +971,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. I wonder if this should be merged into the previous point, or if it is even worth mentioning, since it is part of a few feature that has been added in Emacs 30. > + > ** 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 2897b60b2f9..cb3d73ee284 100644 > --- a/lisp/use-package/use-package-core.el > +++ b/lisp/use-package/use-package-core.el > @@ -346,6 +346,15 @@ use-package-compute-statistics > :type 'boolean > :group 'use-package) > > +(defcustom use-package-vc-prefer-newest nil > + "Prefer the newest commit over the latest release. > +If non-nil, the `:vc' keyword will prefer the latest commit of a > +package instead of the latest stable release. This has the same > +effect as specifying `:rev :newest' in every invocation of `:vc'." > + :type 'boolean > + :version "30.1" > + :group 'use-package) I would briefly mention what the issue could be when setting this option to non-nil, just to give some context as to why it is disabled by default. > + > (defvar use-package-statistics (make-hash-table)) > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > @@ -1649,9 +1658,11 @@ use-package-normalize--vc-arg > (if (and s (stringp s)) (intern s) s)) > (normalize (k v) > (pcase k > - (:rev (cond ((or (eq v :last-release) (not v)) :last-release) > - ((eq v :newest) nil) > - (t (ensure-string v)))) > + (:rev (pcase v > + ('nil (if use-package-vc-prefer-newest nil :last-release)) > + (:last-release :last-release) > + (:newest nil) > + (_ (ensure-string v)))) > (:vc-backend (ensure-symbol v)) > (_ (ensure-string v))))) > (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) > -- > 2.42.0 From unknown Sun Aug 17 01:00:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jan 2024 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: 67955@debbugs.gnu.org Received: via spool by 67955-submit@debbugs.gnu.org id=B67955.170516471724712 (code B ref 67955); Sat, 13 Jan 2024 16:52:02 +0000 Received: (at 67955) by debbugs.gnu.org; 13 Jan 2024 16:51:57 +0000 Received: from localhost ([127.0.0.1]:40925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOhEi-0006QU-V6 for submit@debbugs.gnu.org; Sat, 13 Jan 2024 11:51:57 -0500 Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]:56976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOhEg-0006QC-97 for 67955@debbugs.gnu.org; Sat, 13 Jan 2024 11:51:55 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4TC4Dx5c0Jz9skx; Sat, 13 Jan 2024 17:51:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1705164705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7lmF3FzWF8Yi7vJwziolXuc2wNXY1N/G85X44KBjspY=; b=qOYQP7AAme4P1iF5b8JEA8VSPvxdsTYW5FEAv9e7UPMN7q2RDMC/CyJmU1mfweB/ECIjpt ZqBVdn0paXGYotT51k/d5NBlWxsF1G0I2f2OoKBZ/fqbPeiHiVsM7K+dtpIPk7utcRaCr/ FlYDCqFEhSu8b2HX1f6PN4TQwn2fX+9XziTH8XGT15yiXcsHN7a6ELDyNKmgbbA+7dO/1z bMJ+C52HpzYKwA7lRRyS9CVblLyePOrn8P5c0XD9UXMs+2AvJiuXjYUqyxXFUKCyNUtuJ2 MU6rhcxHwhMFnFsBW90J7RYhpJ659pLX4/Q8JKAH2m14gIqYb3vWjtYDzcRf7Q== From: Tony Zorman In-Reply-To: <87a5paldfy.fsf@posteo.net> References: <87a5q3bf0e.fsf@hyperspace> <87a5paldfy.fsf@posteo.net> Date: Sat, 13 Jan 2024 17:51:44 +0100 Message-ID: <878r4t18in.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-META: aehh4nu97cqw7o91et9aoojgopt6zjey X-MBO-RS-ID: 0941afa0512bebeaae8 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, Jan 12 2024 16:32, Philip Kaludercic wrote: > Tony Zorman writes: >> ++++ >> +*** 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. > > I wonder if this should be merged into the previous point, or if it is > even worth mentioning, since it is part of a few feature that has been > added in Emacs 30. No strong opinions here, I can change this to whatever people prefer. >> +(defcustom use-package-vc-prefer-newest nil >> + "Prefer the newest commit over the latest release. >> +If non-nil, the `:vc' keyword will prefer the latest commit of a >> +package instead of the latest stable release. This has the same >> +effect as specifying `:rev :newest' in every invocation of `:vc'." >> + :type 'boolean >> + :version "30.1" >> + :group 'use-package) > > I would briefly mention what the issue could be when setting this option > to non-nil, just to give some context as to why it is disabled by default. Do you mean something like how this goes against what [Non]GNU ELPA do, and could lead to increased instability (as we are, by definition, tracking a moving target)? I guess a lot of users will be familiar with this style of development from MELPA, so I'm not sure any additional warning here is necessary. Again, I don't feel very strongly about this, so if you want this changed I'll think of something. -- Tony Zorman | https://tony-zorman.com/ From unknown Sun Aug 17 01:00:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jan 2024 07:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: 67955@debbugs.gnu.org Received: via spool by 67955-submit@debbugs.gnu.org id=B67955.170530255128110 (code B ref 67955); Mon, 15 Jan 2024 07:10:01 +0000 Received: (at 67955) by debbugs.gnu.org; 15 Jan 2024 07:09:11 +0000 Received: from localhost ([127.0.0.1]:44619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPH5r-0007JK-Fe for submit@debbugs.gnu.org; Mon, 15 Jan 2024 02:09:11 -0500 Received: from mout01.posteo.de ([185.67.36.65]:37569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPH5p-0007J7-SE for 67955@debbugs.gnu.org; Mon, 15 Jan 2024 02:09:10 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B6E03240027 for <67955@debbugs.gnu.org>; Mon, 15 Jan 2024 08:09:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705302543; bh=wo7nsFb+rqZpqXSP9kOh7eBcJgIABu9sUDsN5FMpTMs=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=JEcHQD/D04Hpv4BViNR5DyzmZ7mhNXe/PZLfhDzE3rkbsbLYosjiIBXInz4zqSPAU EKLoeuNWBAG1a4fhkMFYdfllBPQoDM1I6NNwZr/n/yCj8+7nkfT9pKF99RhAD9FPNm g1C4iGxfG6T63ijuCWjMgrxzrmHMnAsO4IpToTXo7CWInDcGfG9kL1dC+5a5yvqyQk eVs1Y/9CWmyr8OoliI0rval5Z2H287sMauLXVnENvnxW9Pmz9vsfoUpCrPFUCWYEpc DRcwkeYi8T3+o/fmr9sTs0Q5GnbqJbbEo3BejmHFTXF/YfhN5Z2wCWT8SxuqNNpZ4w 1HrNOg4tynWlQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TD3Cg1JtWz9rxM; Mon, 15 Jan 2024 08:09:02 +0100 (CET) From: Philip Kaludercic In-Reply-To: <878r4t18in.fsf@hyperspace> (Tony Zorman's message of "Sat, 13 Jan 2024 17:51:44 +0100") References: <87a5q3bf0e.fsf@hyperspace> <87a5paldfy.fsf@posteo.net> <878r4t18in.fsf@hyperspace> 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 OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Mon, 15 Jan 2024 07:09:02 +0000 Message-ID: <87fryzxecx.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tony Zorman writes: > On Fri, Jan 12 2024 16:32, Philip Kaludercic wrote: >> Tony Zorman writes: >>> ++++ >>> +*** 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. >> >> I wonder if this should be merged into the previous point, or if it is >> even worth mentioning, since it is part of a few feature that has been >> added in Emacs 30. > > No strong opinions here, I can change this to whatever people prefer. Let us leave it then, because I don't know what would be better either. >>> +(defcustom use-package-vc-prefer-newest nil >>> + "Prefer the newest commit over the latest release. >>> +If non-nil, the `:vc' keyword will prefer the latest commit of a >>> +package instead of the latest stable release. This has the same >>> +effect as specifying `:rev :newest' in every invocation of `:vc'." >>> + :type 'boolean >>> + :version "30.1" >>> + :group 'use-package) >> >> I would briefly mention what the issue could be when setting this option >> to non-nil, just to give some context as to why it is disabled by default. > > Do you mean something like how this goes against what [Non]GNU ELPA do, > and could lead to increased instability (as we are, by definition, > tracking a moving target)? I guess a lot of users will be familiar with > this style of development from MELPA, so I'm not sure any additional > warning here is necessary. Again, I don't feel very strongly about this, > so if you want this changed I'll think of something. 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! From unknown Sun Aug 17 01:00:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jan 2024 20:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: 67955@debbugs.gnu.org Received: via spool by 67955-submit@debbugs.gnu.org id=B67955.17053497965404 (code B ref 67955); Mon, 15 Jan 2024 20:17:02 +0000 Received: (at 67955) by debbugs.gnu.org; 15 Jan 2024 20:16:36 +0000 Received: from localhost ([127.0.0.1]:47078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPTNr-0001OR-QH for submit@debbugs.gnu.org; Mon, 15 Jan 2024 15:16:36 -0500 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:46798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPTNp-0001Gm-1J for 67955@debbugs.gnu.org; Mon, 15 Jan 2024 15:16:34 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4TDNh700Lpz9spK; Mon, 15 Jan 2024 21:16:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1705349783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XLc2y8zJ0m9wcfTOsziv17tUJttHt0myMEmZPy6gdcI=; b=yecK8CYbkpXnGzFzhdJ089Q+hhciFSgptj7haGO6TTHavcEzWUatStPrgKrKYmDo45zgMF BfDPsVTVmlmslWwStOUfRqOtcj3soF4yJRayhB/MI2heI0StdJ+A3Y8a5XoduSxCVOxDOm dPlR9KRHUmIs7CWW85zxxxoyMngQhwYoIj2CHE00Gzwz6JTum7AQ0WbahzHXQhk9a5jxJI 0hmayOkX4q3vrfMNCTlOunwBWVe1j9/gV1rfrCgZw8XQ5ilTvRQDm4yMMkvPjJmx/MjGVT dnyGqDf3Q/dZxxOLEJP8rBV3GG//7ZiUYyjNcAxU7e0yMQKK5LbHF45209UrzA== From: Tony Zorman In-Reply-To: <87fryzxecx.fsf@posteo.net> References: <87a5q3bf0e.fsf@hyperspace> <87a5paldfy.fsf@posteo.net> <878r4t18in.fsf@hyperspace> <87fryzxecx.fsf@posteo.net> Date: Mon, 15 Jan 2024 21:16:19 +0100 Message-ID: <87h6jecpyk.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: 5tmt66n3kfxdr5rcfr6csch64dwsii8t X-MBO-RS-ID: 70bf9c8ece4d7a15e03 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On Mon, Jan 15 2024 07:09, Philip Kaludercic wrote: > Tony Zorman writes: > >> On Fri, Jan 12 2024 16:32, Philip Kaludercic wrote: >>> Tony Zorman writes: >>>> ++++ >>>> +*** 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. >>> >>> I wonder if this should be merged into the previous point, or if it is >>> even worth mentioning, since it is part of a few feature that has been >>> added in Emacs 30. >> >> No strong opinions here, I can change this to whatever people prefer. > > Let us leave it then, because I don't know what would be better either. > >>>> +(defcustom use-package-vc-prefer-newest nil >>>> + "Prefer the newest commit over the latest release. >>>> +If non-nil, the `:vc' keyword will prefer the latest commit of a >>>> +package instead of the latest stable release. This has the same >>>> +effect as specifying `:rev :newest' in every invocation of `:vc'." >>>> + :type 'boolean >>>> + :version "30.1" >>>> + :group 'use-package) >>> >>> I would briefly mention what the issue could be when setting this option >>> to non-nil, just to give some context as to why it is disabled by default. >> >> Do you mean something like how this goes against what [Non]GNU ELPA do, >> and could lead to increased instability (as we are, by definition, >> tracking a moving target)? I guess a lot of users will be familiar with >> this style of development from MELPA, so I'm not sure any additional >> warning here is necessary. Again, I don't feel very strongly about this, >> so if you want this changed I'll think of something. > > 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-use-package-vc-prefer-newest-user-option.patch >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) + (defvar use-package-statistics (make-hash-table)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1649,9 +1663,11 @@ use-package-normalize--vc-arg (if (and s (stringp s)) (intern s) s)) (normalize (k v) (pcase k - (:rev (cond ((or (eq v :last-release) (not v)) :last-release) - ((eq v :newest) nil) - (t (ensure-string v)))) + (:rev (pcase v + ('nil (if use-package-vc-prefer-newest nil :last-release)) + (:last-release :last-release) + (:newest nil) + (_ (ensure-string v)))) (:vc-backend (ensure-symbol v)) (_ (ensure-string v))))) (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) -- 2.43.0 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- From unknown Sun Aug 17 01:00:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Jan 2024 07:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: Stefan Kangas , 67955@debbugs.gnu.org Received: via spool by 67955-submit@debbugs.gnu.org id=B67955.170539042924590 (code B ref 67955); Tue, 16 Jan 2024 07:34:02 +0000 Received: (at 67955) by debbugs.gnu.org; 16 Jan 2024 07:33:49 +0000 Received: from localhost ([127.0.0.1]:47580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPdxF-0006OY-3g for submit@debbugs.gnu.org; Tue, 16 Jan 2024 02:33:49 -0500 Received: from mout02.posteo.de ([185.67.36.66]:39859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPdxC-0006OK-JV for 67955@debbugs.gnu.org; Tue, 16 Jan 2024 02:33:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8CF16240101 for <67955@debbugs.gnu.org>; Tue, 16 Jan 2024 08:33:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705390420; bh=5ztmYk+JG/RhwZjM67YnrYvwNXs2JjYem+h/RouMTkg=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=EwEcMAIySGH+Xx9ku1XCn4z/Aa131mlYqOdvHQWsGhKOMt7fMJw4rsGROw78WSQAD 0cAktkx60K/4Xt6lxVzGUZ2v7uRbniKeA1nlL8LOB8S+BP/1ZhLvHkCABI1E154vdr OPvAgzzxp46KPYEEvwbJfYUtcQS1sBG3ZdsHB9ahsazaFq6zWYbXEBzoLgzfcD9u8O 9iKAkKycjrfupTRkxxqRk3uS5/qP2ve7mxbywBc3SQVHgif9KtivcSv5xBvPlh+sNr Q5bvXkJAQ2OQ3F6BtjkfH4eWK7RmURHZlz5dZ+dXLiRU+UPrMu1FVKsmbiVYiX1WPk ftr6jwP08KWFA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TDgjb5qjRz6tm4; Tue, 16 Jan 2024 08:33:39 +0100 (CET) From: Philip Kaludercic In-Reply-To: <87h6jecpyk.fsf@hyperspace> (Tony Zorman's message of "Mon, 15 Jan 2024 21:16:19 +0100") References: <87a5q3bf0e.fsf@hyperspace> <87a5paldfy.fsf@posteo.net> <878r4t18in.fsf@hyperspace> <87fryzxecx.fsf@posteo.net> <87h6jecpyk.fsf@hyperspace> 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 OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Tue, 16 Jan 2024 07:33:39 +0000 Message-ID: <87ply1g2b0.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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? > + > (defvar use-package-statistics (make-hash-table)) > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > @@ -1649,9 +1663,11 @@ use-package-normalize--vc-arg > (if (and s (stringp s)) (intern s) s)) > (normalize (k v) > (pcase k > - (:rev (cond ((or (eq v :last-release) (not v)) :last-release) > - ((eq v :newest) nil) > - (t (ensure-string v)))) > + (:rev (pcase v > + ('nil (if use-package-vc-prefer-newest nil :last-release)) > + (:last-release :last-release) > + (:newest nil) > + (_ (ensure-string v)))) > (:vc-backend (ensure-symbol v)) > (_ (ensure-string v))))) > (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) > -- > 2.43.0 From unknown Sun Aug 17 01:00:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Mar 2024 08:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: Stefan Kangas , 67955@debbugs.gnu.org Received: via spool by 67955-submit@debbugs.gnu.org id=B67955.171178655824770 (code B ref 67955); Sat, 30 Mar 2024 08:16:01 +0000 Received: (at 67955) by debbugs.gnu.org; 30 Mar 2024 08:15:58 +0000 Received: from localhost ([127.0.0.1]:43885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqTsY-0006RM-Vd for submit@debbugs.gnu.org; Sat, 30 Mar 2024 04:15:58 -0400 Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]:34634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqTsT-0006QT-Mh for 67955@debbugs.gnu.org; Sat, 30 Mar 2024 04:15:54 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4V697p18pnz9sWs; Sat, 30 Mar 2024 09:15:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1711786534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gdAKUqAGP8G05KYfpemxBNmSFiWdT6m4sGsZmpr03GI=; b=Wju+NqZhGL/SfpvU1U/6nspAJlivZsyAyVv6cfb/Ego7g1+uwSv3Wj82tSrJIw7ZhLybKl rtLrYV4k/blty2NlwxTo/afrZR7e4vahHp1JyQ2o87v4nqpEp/LpnMIMyJEJ8GLgRYw1+5 GSVW1dUpdGzBRigNc6PPwNWQMLsUBJ24M05WY8jCviD1RNSxc0ecA6ZjrSl73s/xA8f3kd rPMG4VYSxjpItQbJPfTVBjKLGJE+/6E6d9dosryT/pfqpeYq4y7OyfKKLDWaCzRbIdGLe7 6wFtZdtHL4J7Lvrr9aZ89J1iVHqR8ZmaRCGXV1P9W4SU8KZkmUOoqwzLuw4QcQ== From: Tony Zorman In-Reply-To: <87ply1g2b0.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> Date: Sat, 30 Mar 2024 09:15:32 +0100 Message-ID: <87o7aw6spn.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-ID: 8f14a07780e52939b21 X-MBO-RS-META: 4cx43d3c1w7qm3j9skmj8yo3tpitj4gu X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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? :) Tony -- Tony Zorman | https://tony-zorman.com/ From unknown Sun Aug 17 01:00:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tony Zorman Subject: bug#67955: closed (Re: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option) Message-ID: References: <8734s7zvi4.fsf@posteo.net> <87a5q3bf0e.fsf@hyperspace> X-Gnu-PR-Message: they-closed 67955 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 67955@debbugs.gnu.org Date: Sat, 30 Mar 2024 13:43:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1711806183-2364-1" This is a multi-part message in MIME format... ------------=_1711806183-2364-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #67955: [PATCH] Add use-package-vc-prefer-newest user option which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 67955@debbugs.gnu.org. --=20 67955: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67955 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1711806183-2364-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67955-done) by debbugs.gnu.org; 30 Mar 2024 13:42:41 +0000 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 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 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== 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) From: Philip Kaludercic To: Tony Zorman Subject: Re: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option In-Reply-To: <87o7aw6spn.fsf@hyperspace> (Tony Zorman's message of "Sat, 30 Mar 2024 09:15:32 +0100") 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> OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Sat, 30 Mar 2024 13:42:27 +0000 Message-ID: <8734s7zvi4.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67955-done Cc: 67955-done@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 ------------=_1711806183-2364-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Dec 2023 18:13:57 +0000 Received: from localhost ([127.0.0.1]:45392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGNYS-0007a6-MG for submit@debbugs.gnu.org; Thu, 21 Dec 2023 13:13:57 -0500 Received: from lists.gnu.org ([2001:470:142::17]:48030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGNYQ-0007Zp-Jp for submit@debbugs.gnu.org; Thu, 21 Dec 2023 13:13:55 -0500 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 1rGNYE-0003Ut-6A for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 13:13:42 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rGNYA-0005F0-6P for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 13:13:41 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Swz7l019zz9sVm for ; Thu, 21 Dec 2023 19:13:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1703182403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=0ieZ/Jths5QfVumZ+8iofMN1Y3rmjuSJLdnItFD90kA=; b=jeTposH3kystTzmRLXlFH7SvZf32qksu+8bXaFUwPDgBGm1I2/paEpWbeOglF1qMe4nVzy KU6AZ2BxWoHJwDbUcXGxtfck4Iyn8fs63jHJHf+92yNbMdSXqgwD6By43an4hiFb42LFW6 SwGpgMuT9lZhQOkbBWABlfwKwQAJkUffCSxihouANqBtp1e/w4ywTdiDF2H3qiSDehnN6z caDkp+xjCUxqueVpwEnsv5vuYGIrAQo0lmnzAAr6jaHxtoiL7Z043kBGYI6oTUgOBpZfh3 f7QE/YQB8ANBsLItki+HJkCLt32lTYqqPScX4HtBk71MkOOF6OalktXwBi4owg== From: Tony Zorman To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add use-package-vc-prefer-newest user option Date: Thu, 21 Dec 2023 19:13:21 +0100 Message-ID: <87a5q3bf0e.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: apdd6rkws5hfu8m34ufi93mz1nwigjio X-MBO-RS-ID: 76234a625fff78ebe91 Received-SPF: pass client-ip=80.241.56.151; envelope-from=soliditsallgood@mailbox.org; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Hi, as stated in the subject, the attached patch adds a 'use-package-vc-prefer-newest' user option. When non-nil, packages installed with use-package's :vc keyword will default to the latest commit, instead of the latest release. Thanks Tony --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-use-package-vc-prefer-newest-user-option.patch >From c7271b7f50f7628757bd9d7070a4b4d8a5f05bb4 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 | 17 ++++++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index 37ed50ab2b1..ea0504b3deb 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 b39dd5f5ab6..100c6b78291 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -971,6 +971,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 2897b60b2f9..cb3d73ee284 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -346,6 +346,15 @@ use-package-compute-statistics :type 'boolean :group 'use-package) +(defcustom use-package-vc-prefer-newest nil + "Prefer the newest commit over the latest release. +If non-nil, the `:vc' keyword will prefer the latest commit of a +package instead of the latest stable release. This has the same +effect as specifying `:rev :newest' in every invocation of `:vc'." + :type 'boolean + :version "30.1" + :group 'use-package) + (defvar use-package-statistics (make-hash-table)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1649,9 +1658,11 @@ use-package-normalize--vc-arg (if (and s (stringp s)) (intern s) s)) (normalize (k v) (pcase k - (:rev (cond ((or (eq v :last-release) (not v)) :last-release) - ((eq v :newest) nil) - (t (ensure-string v)))) + (:rev (pcase v + ('nil (if use-package-vc-prefer-newest nil :last-release)) + (:last-release :last-release) + (:newest nil) + (_ (ensure-string v)))) (:vc-backend (ensure-symbol v)) (_ (ensure-string v))))) (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) -- 2.42.0 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- ------------=_1711806183-2364-1-- From unknown Sun Aug 17 01:00:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67955: [PATCH] Add use-package-vc-prefer-newest user option Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Mar 2024 14:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: 67955-done@debbugs.gnu.org, Stefan Kangas Received: via spool by 67955-done@debbugs.gnu.org id=D67955.171180886213022 (code D ref 67955); Sat, 30 Mar 2024 14:28:02 +0000 Received: (at 67955-done) by debbugs.gnu.org; 30 Mar 2024 14:27:42 +0000 Received: from localhost ([127.0.0.1]:45942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqZgL-0003Ny-S7 for submit@debbugs.gnu.org; Sat, 30 Mar 2024 10:27:42 -0400 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:55558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqZgI-0003Mz-KR for 67955-done@debbugs.gnu.org; Sat, 30 Mar 2024 10:27:40 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4V6KNt5cMhz9sSV; Sat, 30 Mar 2024 15:27:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1711808846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q7Uy7qrHCgrzue0VF0InHwAfZenDQcUbxwRDc2uw1NQ=; b=wrORuzAzf66YgizYfjk2217uSYroq+K6+CMaqZOH4qttjoVX+RUMN4Q7T1lmU+hlamTFPQ j6g+QXNMVA5GashRkzaPNhuKl29lwK+L32d6v3nWkQdQSs+QQR25YGa52m5KFgSn5zaMcT A2G7FJa8X6RZJGM3OFHu2Wm3CvfwFWVApQnFDANZow6VMzEdXYxJb5rLAfgdmvKrxreGJ9 oDKJvkh0GVsT13/B9xKIGAWxfNTpiovxFNtp0pjZn7/ws8yxO9W7sTRTf8aYMkvly1+SXY UlLeTOh9VDfQ03/gup+Mpanzvkhwi/XhGW+8V96feCvw1WIRYa6BK4UAJQ3mWQ== From: Tony Zorman In-Reply-To: <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> <8734s7zvi4.fsf@posteo.net> Date: Sat, 30 Mar 2024 15:27:25 +0100 Message-ID: <871q7rssky.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-ID: 55ea809e25d2e73dae0 X-MBO-RS-META: 56dhet74gu1bhjyiuwbzoijatqczs8gw X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, Mar 30 2024 13:42, Philip Kaludercic wrote: > OK. I have pushed the commit, Thank you! > 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. Sure, I'll do that in the future. Tony -- Tony Zorman | https://tony-zorman.com/