From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Dec 2022 07:04:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 60418@debbugs.gnu.org, philipk@posteo.net X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, Philip Kaludercic Received: via spool by submit@debbugs.gnu.org id=B.167238381823776 (code B ref -1); Fri, 30 Dec 2022 07:04:03 +0000 Received: (at submit) by debbugs.gnu.org; 30 Dec 2022 07:03:38 +0000 Received: from localhost ([127.0.0.1]:33435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pB9QX-0006BH-6M for submit@debbugs.gnu.org; Fri, 30 Dec 2022 02:03:38 -0500 Received: from lists.gnu.org ([209.51.188.17]:57300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAxse-00089q-6V for submit@debbugs.gnu.org; Thu, 29 Dec 2022 13:43:53 -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 1pAxse-0008Bw-0r for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:43:52 -0500 Received: from mout-p-201.mailbox.org ([80.241.56.171]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pAxsa-0006qQ-FP for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:43:51 -0500 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 ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4NjcjT5KXkz9sJ4; Thu, 29 Dec 2022 19:43:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1672339421; 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=YiIXfIu43xCINmYsoIp3GeymYYwMrfCDkJYdYJ282gQ=; b=BIQNuzXKDFYUcdxzu42LitcwsggzN6sLanwendeHI6eU+zTcdiavgK7BU9dbh2kvVEDmFG 6rcD+4IItLGRANg6KTwkM1v+I1ZQB//kXYQ08leBEhbAHoaJdTNk8bW3fVZ/puXGxT245q XHFY9rGAX9gVYB6ZMaGwjr5qZEdwKRUF8cHnd+7gvuRkrB919DWY7Po12tp6eInGTAir+u H2xod5tSLvwXIUcxvkj9v7GvtT6T8sjZQaEc8n4v9z/lx/x7tEfVMMOFH+VhNUl240toJy UR71mUquAX1AmKX8xneObKoe57MDz5LobmpHxuUhyNUYJ2nys9YW3w8alyqUPw== From: Tony Zorman Date: Thu, 29 Dec 2022 19:43:40 +0100 Message-ID: <87zgb6uk2r.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: r97s8buk7qz4338ryg1p3ohda9r7f8pb X-MBO-RS-ID: ac99c518f7cc0d98c0a Received-SPF: pass client-ip=80.241.56.171; envelope-from=soliditsallgood@mailbox.org; helo=mout-p-201.mailbox.org X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Fri, 30 Dec 2022 02:03:35 -0500 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: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, this is a complete (and clean) rewrite of my package [vc-use-package], in order to properly integrate it with the Emacs core. Basically, it adds a new :vc keyword so one can leverage the 'package-vc-install*' function(s) from within a use-package declaration. For example, specifying (use-package foo :vc (:url "bar"))=20 would expand to (more or less, concentrating on the relevant part) (unless (package-installed-p 'foo) (package-vc-install '(foo :url "bar") nil)) This makes installing packages from remote sources a breeze. There is also support, via 'package-vc-install-from-checkout', for installing local packages by additionally specifying a load path: (use-package foo :vc bar ; optional name, use t or nil for foo :load-path "/path") =E2=87=94 (progn (eval-and-compile (add-to-list 'load-path <>)) (unless (package-installed-p 'bar) (package-vc-install-from-checkout <> "bar")) =E2=80=A6) I don't know what the policy here is regarding sending multiple patches in the same email, but since the second one is just adding documentation, I didn't deem it "worth" a second mail. Sorry (and do let me know!) if this is disruptive to anyone. Best, Tony [vc-use-package]: https://github.com/slotThe/vc-use-package --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Add-vc-keyword-to-use-package.patch >From 2aa5eed4186dab086684e8d0623b7f10cab07100 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 11:05:04 +0100 Subject: [PATCH 1/2] Add :vc keyword to use-package * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. (use-package-handler/:load-path): Insert 'load-path' into 'state'. (use-package-handler/:vc): Handler for the :vc keyword. (use-package-normalize--vc-arg): Normalization for more complex arguments to 'use-package-normalize/:vc', in order to make them compatible with the specification of 'package-vc-selected-packages'. (use-package-normalize/:vc): Normalizer for the :vc keyword. (use-package): Document :vc. * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): Do not ensure a package when :vc is used in the declaration. * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): (use-package-test/:vc-2): (use-package-test/:vc-3): (use-package-test/:vc-4): (use-package-test-normalize/:vc): Add tests for :vc. --- lisp/use-package/use-package-core.el | 73 +++++++++++++++++++++- lisp/use-package/use-package-ensure.el | 3 +- test/lisp/use-package/use-package-tests.el | 46 ++++++++++++++ 3 files changed, 119 insertions(+), 3 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 1dee08e55b..71a03c419a 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -76,6 +76,7 @@ use-package-keywords :functions :preface :if :when :unless + :vc :no-require :catch :after @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path #'use-package-normalize-paths)) (defun use-package-handler/:load-path (name _keyword arg rest state) - (let ((body (use-package-process-keywords name rest state))) + (let ((body (use-package-process-keywords name rest + (plist-put state :load-path arg)))) (use-package-concat (mapcar #'(lambda (path) `(eval-and-compile (add-to-list 'load-path ,path))) @@ -1577,6 +1579,72 @@ use-package-handler/:config (when use-package-compute-statistics `((use-package-statistics-gather :config ',name t)))))) +;;;; :vc + +(defun use-package-handler/:vc (name _keyword arg rest state) + "Generate code for the :vc keyword." + (pcase-let ((body (use-package-process-keywords name rest state)) + (local-path (car (plist-get state :load-path))) + (`(,name ,opts ,rev) arg)) + (use-package-concat + `((unless (package-installed-p ',name) + ,(if local-path + `(package-vc-install-from-checkout ,local-path ,(symbol-name name)) + `(package-vc-install ',(cons name opts) ,rev)))) + body))) + +(defun use-package-normalize--vc-arg (arg) + "Normalize possible arguments to the :vc keyword. +ARG is a cons-cell of approximately the form that +`package-vc-selected-packages' accepts, plus an additional `:rev' +keyword. + +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant +with `package-vc-selected-packages' and REV is a (possibly nil) +revision." + (cl-flet* ((mk-string (s) + (if (stringp s) s (symbol-name s))) + (mk-sym (s) + (if (stringp s) (intern s) s)) + (normalize (k v) + (when v + (pcase k + (:vc-backend (mk-sym v)) + (:rev (if (eq v :last-release) v (mk-string v))) + (_ (mk-string v)))))) + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) + (`(,name . ,opts) arg)) + (if (stringp opts) ; (NAME . VERSION-STRING) ? + (list name opts) + ;; Error handling + (cl-loop for (k _) on opts by #'cddr + if (not (member k valid-kws)) + do (use-package-error + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" + k valid-kws))) + ;; Actual normalization + (list name + (cl-loop for (k v) on opts by #'cddr + if (not (eq k :rev)) + nconc (list k (normalize k v))) + (normalize :rev (plist-get opts :rev))))))) + +(defun use-package-normalize/:vc (name _keyword args) + (let ((arg (car args))) + (pcase arg + ((or 'nil 't) (list name)) ; guess name + ((pred symbolp) (list arg)) ; use this name + ((pred stringp) (list name arg)) ; version string + guess name + ((pred plistp) ; plist + guess name + (use-package-normalize--vc-arg (cons name arg))) + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name + (pred stringp))) + (use-package-normalize--vc-arg arg)) + (_ (use-package-error "Unrecognised argument to :vc.\ + The keyword wants an argument of nil, t, a name of a package,\ + or a cons-cell as accepted by `package-vc-selected-packages', where \ + the accepted plist is augmented by a `:rev' keyword."))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; The main macro @@ -1666,7 +1734,8 @@ use-package (compare with `custom-set-variables'). :custom-face Call `custom-set-faces' with each face definition. :ensure Loads the package using package.el if necessary. -:pin Pin the package to an archive." +:pin Pin the package to an archive. +:vc Integration with `package-vc.el'." (declare (indent defun)) (unless (memq :disabled args) (macroexp-progn diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/use-package-ensure.el index dae0312dba..27d4f5ad4f 100644 --- a/lisp/use-package/use-package-ensure.el +++ b/lisp/use-package/use-package-ensure.el @@ -182,7 +182,8 @@ use-package-ensure-elpa ;;;###autoload (defun use-package-handler/:ensure (name _keyword ensure rest state) - (let* ((body (use-package-process-keywords name rest state))) + (let* ((body (use-package-process-keywords name rest state)) + (ensure (unless (plist-member rest :vc) ensure))) ;; We want to avoid installing packages when the `use-package' macro is ;; being macro-expanded by elisp completion (see `lisp--local-variables'), ;; but still install packages when byte-compiling, to avoid requiring diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index e4586b04f2..4110f3a567 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -1951,6 +1951,52 @@ bind-key/845 (should (eq (nth 1 binding) 'ignore)) (should (eq (nth 2 binding) nil)))) +(ert-deftest use-package-test/:vc-1 () + (match-expansion + (use-package foo :vc (:url "bar")) + `(unless (package-installed-p 'foo) + (package-vc-install '(foo :url "bar") nil)))) + +(ert-deftest use-package-test/:vc-2 () + (match-expansion + (use-package foo + :vc (baz . (:url "baz" :vc-backend "Git" + :main-file qux.el :rev "rev-string"))) + `(unless (package-installed-p 'baz) + (package-vc-install '(baz :url "baz" :vc-backend Git :main-file "qux.el") + "rev-string")))) + +(ert-deftest use-package-test/:vc-3 () + (match-expansion + (use-package foo :vc (bar . "baz")) + `(unless (package-installed-p 'bar) + (package-vc-install '(bar . "baz") nil)))) + +(ert-deftest use-package-test/:vc-4 () + (let ((load-path? '(pred (apply-partially + #'string= + (expand-file-name "bar" user-emacs-directory))))) + (match-expansion + (use-package foo :vc other-name :load-path "bar") + `(progn (eval-and-compile + (add-to-list 'load-path ,load-path?)) + (unless (package-installed-p 'other-name) + (package-vc-install-from-checkout ,load-path? "other-name")))))) + +(ert-deftest use-package-test-normalize/:vc () + (should (equal '(foo "version-string") + (use-package-normalize/:vc 'foo :vc '("version-string")))) + (should (equal '(bar "version-string") + (use-package-normalize/:vc 'foo :vc '((bar . "version-string"))))) + (should (equal '(foo (:url "bar") "baz") + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev "baz"))))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc '(t)))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc nil))) + (should (equal '(bar) + (use-package-normalize/:vc 'foo :vc '(bar))))) + ;; Local Variables: ;; no-byte-compile: t ;; no-update-autoloads: t -- 2.39.0 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0002-Document-use-package-s-vc-keyword.patch Content-Transfer-Encoding: quoted-printable >From 9e54b103366aaef8e303bf65787ad841c56483d1 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 12:23:56 +0100 Subject: [PATCH 2/2] ; Document use-package's :vc keyword * doc/misc/use-package.texi (Installing packages): (Install package): Add documentation for :vc and link to the related chapter in the Emacs manual. * etc/NEWS: Mention :vc keyword --- doc/misc/use-package.texi | 40 +++++++++++++++++++++++++++++++++++++-- etc/NEWS | 10 ++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index c587d23d74..a4abbb77f9 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi @@ -1564,8 +1564,10 @@ Installing packages (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The @code{use-package} macro provides the @code{:ensure} and @code{:pin} keywords that interface with that package manager to automatically -install packages. This is particularly useful if you use your init -file on more than one system. +install packages. Further, the @code{:vc} keyword may be used to +control how package sources are fetched (@pxref{Fetching Package +Sources,,, emacs, GNU Emacs Manual}). This is particularly useful if +you use your init file on more than one system. =20 @menu * Install package:: @@ -1617,6 +1619,40 @@ Install package You can override the above setting for a single package by adding @w{@code{:ensure nil}} to its declaration. =20 +@findex :vc +The @code{:vc} keyword can be used to control how packages are +fetched. It accepts the same arguments as +@code{package-vc-selected-packages}, except that a name need not +explicitly given: it is inferred from the declaration. Further, the +accepted property list is augmented by a @code{:rev} keyword, which +has the same shape as the @code{REV} argument to +@code{package-vc-install}. + +For example, + +@lisp +@group +(use-package foo + :vc (:url "https://bar.com/foo")) +@end group +@end lisp + +would try=E2=80=94by invoking @code{package-vc-install}=E2=80=94to install= 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: + +@lisp +@group +(use-package foo + :vc t + :load-path "/path/to/foo/) +@end group +@end lisp + +The above dispatches to @code{package-vc-install-from-checkout}. + @node Pinning packages @section Pinning packages using @code{:pin} @cindex installing package from specific archive diff --git a/etc/NEWS b/etc/NEWS index 83aa81eb4b..d8e8ed0dd2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -108,6 +108,16 @@ This command either fills a single paragraph in a defu= n, such as a doc-string, or a comment, or (re)indents the surrounding defun if point is not in a comment or a string. It is by default bound to 'M-q' in 'prog-mode' and all its descendants. + +** use-package + +*** New ':vc' keyword +This keyword enables the user to control how packages are fetched by +utilising 'package-vc.el'. By default, it relays its arguments to +'package-vc-install', but=E2=80=94when combined with the ':load-path' +keyword=E2=80=94it can also call upon 'package-vc-install-from-checkout' +instead. + * New Modes and Packages in Emacs 30.1 =20 --=20 2.39.0 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Jan 2023 14:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.167370703929476 (code B ref 60418); Sat, 14 Jan 2023 14:38:01 +0000 Received: (at 60418) by debbugs.gnu.org; 14 Jan 2023 14:37:19 +0000 Received: from localhost ([127.0.0.1]:53711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGhen-0007fL-Pr for submit@debbugs.gnu.org; Sat, 14 Jan 2023 09:37:19 -0500 Received: from mout-p-102.mailbox.org ([80.241.56.152]:48842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGfyA-0004sJ-Ee for 60418@debbugs.gnu.org; Sat, 14 Jan 2023 07:49:12 -0500 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 ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4NvJ4s6QVQz9sSk; Sat, 14 Jan 2023 13:49:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1673700541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RXYTqnraH8CIUN7xFR9eg0bJczJCVQ9vLSRojcAJr3s=; b=F9jgDVCNHcls2ibGswE7bVrC9XrNr3XlGEO/SJpjp67l+2n3guQsX8qI/fAM62A0wi3Drn sOjAKriJh9e9A8plcXUnfFopUZSPRlakzhOCnUBzQNSlGGXhHsuwFUeTYujMSCAuuVGMxm EeGn8fSb2efPHD3ATpNxcZw6MYXR86+lujWmZXJ0ER5Hx81ReG1K2hvDk7WzuE8q2Zoh+4 NkEcT3APBJM6mDMu2c88m4JNrYfQwqS4D3IKFeJyJcihzwgyN9k92zwwYX9dUrxW1wTzAT Gwp+sr5isXuhLI5Hs0eOVkQoxgE0THE92Nc9Kow8ICo4KApaANNW9znABMTssQ== From: Tony Zorman In-Reply-To: References: <87zgb6uk2r.fsf@hyperspace> Date: Sat, 14 Jan 2023 13:48:59 +0100 Message-ID: <87tu0tl1s4.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-META: r9cktmhghbf7soemiogda94zazd16ts8 X-MBO-RS-ID: 30d869a5005e22a9126 X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Sat, 14 Jan 2023 09:37:16 -0500 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.7 (-) Hi, I was told to ping this again (and to Cc Stefan), so I'm going to do that. Thanks! Tony On Thu, Dec 29 2022 19:43, Tony Zorman wrote: > Hi, > > this is a complete (and clean) rewrite of my package [vc-use-package], > in order to properly integrate it with the Emacs core. Basically, it > adds a new :vc keyword so one can leverage the 'package-vc-install*' > function(s) from within a use-package declaration. For example, > specifying > > (use-package foo > :vc (:url "bar"))=20 > > would expand to (more or less, concentrating on the relevant part) > > (unless (package-installed-p 'foo) > (package-vc-install '(foo :url "bar") nil)) > > This makes installing packages from remote sources a breeze. There is > also support, via 'package-vc-install-from-checkout', for installing > local packages by additionally specifying a load path: > > (use-package foo > :vc bar ; optional name, use t or nil for foo > :load-path "/path") > =E2=87=94 > (progn (eval-and-compile (add-to-list 'load-path <>)) > (unless (package-installed-p 'bar) > (package-vc-install-from-checkout <> "bar")) > =E2=80=A6) > > I don't know what the policy here is regarding sending multiple patches > in the same email, but since the second one is just adding > documentation, I didn't deem it "worth" a second mail. Sorry (and do > let me know!) if this is disruptive to anyone. > > Best, > Tony > > [vc-use-package]: https://github.com/slotThe/vc-use-package > > From 2aa5eed4186dab086684e8d0623b7f10cab07100 Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Thu, 29 Dec 2022 11:05:04 +0100 > Subject: [PATCH 1/2] Add :vc keyword to use-package > > * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. > (use-package-handler/:load-path): Insert 'load-path' into 'state'. > (use-package-handler/:vc): Handler for the :vc keyword. > (use-package-normalize--vc-arg): Normalization for more complex > arguments to 'use-package-normalize/:vc', in order to make them > compatible with the specification of 'package-vc-selected-packages'. > (use-package-normalize/:vc): Normalizer for the :vc keyword. > (use-package): Document :vc. > > * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): > Do not ensure a package when :vc is used in the declaration. > > * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): > (use-package-test/:vc-2): > (use-package-test/:vc-3): > (use-package-test/:vc-4): > (use-package-test-normalize/:vc): > Add tests for :vc. > --- > lisp/use-package/use-package-core.el | 73 +++++++++++++++++++++- > lisp/use-package/use-package-ensure.el | 3 +- > test/lisp/use-package/use-package-tests.el | 46 ++++++++++++++ > 3 files changed, 119 insertions(+), 3 deletions(-) > > diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-= package-core.el > index 1dee08e55b..71a03c419a 100644 > --- a/lisp/use-package/use-package-core.el > +++ b/lisp/use-package/use-package-core.el > @@ -76,6 +76,7 @@ use-package-keywords > :functions > :preface > :if :when :unless > + :vc > :no-require > :catch > :after > @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path > #'use-package-normalize-paths)) >=20=20 > (defun use-package-handler/:load-path (name _keyword arg rest state) > - (let ((body (use-package-process-keywords name rest state))) > + (let ((body (use-package-process-keywords name rest > + (plist-put state :load-path arg)))) > (use-package-concat > (mapcar #'(lambda (path) > `(eval-and-compile (add-to-list 'load-path ,path))) > @@ -1577,6 +1579,72 @@ use-package-handler/:config > (when use-package-compute-statistics > `((use-package-statistics-gather :config ',name t)))))) >=20=20 > +;;;; :vc > + > +(defun use-package-handler/:vc (name _keyword arg rest state) > + "Generate code for the :vc keyword." > + (pcase-let ((body (use-package-process-keywords name rest state)) > + (local-path (car (plist-get state :load-path))) > + (`(,name ,opts ,rev) arg)) > + (use-package-concat > + `((unless (package-installed-p ',name) > + ,(if local-path > + `(package-vc-install-from-checkout ,local-path ,(symbol-na= me name)) > + `(package-vc-install ',(cons name opts) ,rev)))) > + body))) > + > +(defun use-package-normalize--vc-arg (arg) > + "Normalize possible arguments to the :vc keyword. > +ARG is a cons-cell of approximately the form that > +`package-vc-selected-packages' accepts, plus an additional `:rev' > +keyword. > + > +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant > +with `package-vc-selected-packages' and REV is a (possibly nil) > +revision." > + (cl-flet* ((mk-string (s) > + (if (stringp s) s (symbol-name s))) > + (mk-sym (s) > + (if (stringp s) (intern s) s)) > + (normalize (k v) > + (when v > + (pcase k > + (:vc-backend (mk-sym v)) > + (:rev (if (eq v :last-release) v (mk-string v))) > + (_ (mk-string v)))))) > + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backe= nd :rev)) > + (`(,name . ,opts) arg)) > + (if (stringp opts) ; (NAME . VERSION-STRING) ? > + (list name opts) > + ;; Error handling > + (cl-loop for (k _) on opts by #'cddr > + if (not (member k valid-kws)) > + do (use-package-error > + (format "Keyword :vc received unknown argument: %s.= Supported keywords are: %s" > + k valid-kws))) > + ;; Actual normalization > + (list name > + (cl-loop for (k v) on opts by #'cddr > + if (not (eq k :rev)) > + nconc (list k (normalize k v))) > + (normalize :rev (plist-get opts :rev))))))) > + > +(defun use-package-normalize/:vc (name _keyword args) > + (let ((arg (car args))) > + (pcase arg > + ((or 'nil 't) (list name)) ; guess name > + ((pred symbolp) (list arg)) ; use this name > + ((pred stringp) (list name arg)) ; version string + gues= s name > + ((pred plistp) ; plist + guess name > + (use-package-normalize--vc-arg (cons name arg))) > + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string = + name > + (pred stringp))) > + (use-package-normalize--vc-arg arg)) > + (_ (use-package-error "Unrecognised argument to :vc.\ > + The keyword wants an argument of nil, t, a name of a package,\ > + or a cons-cell as accepted by `package-vc-selected-packages', where \ > + the accepted plist is augmented by a `:rev' keyword."))))) > + > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;; > ;; > ;;; The main macro > @@ -1666,7 +1734,8 @@ use-package > (compare with `custom-set-variables'). > :custom-face Call `custom-set-faces' with each face definition. > :ensure Loads the package using package.el if necessary. > -:pin Pin the package to an archive." > +:pin Pin the package to an archive. > +:vc Integration with `package-vc.el'." > (declare (indent defun)) > (unless (memq :disabled args) > (macroexp-progn > diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/us= e-package-ensure.el > index dae0312dba..27d4f5ad4f 100644 > --- a/lisp/use-package/use-package-ensure.el > +++ b/lisp/use-package/use-package-ensure.el > @@ -182,7 +182,8 @@ use-package-ensure-elpa >=20=20 > ;;;###autoload > (defun use-package-handler/:ensure (name _keyword ensure rest state) > - (let* ((body (use-package-process-keywords name rest state))) > + (let* ((body (use-package-process-keywords name rest state)) > + (ensure (unless (plist-member rest :vc) ensure))) > ;; We want to avoid installing packages when the `use-package' macro= is > ;; being macro-expanded by elisp completion (see `lisp--local-variab= les'), > ;; but still install packages when byte-compiling, to avoid requiring > diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-p= ackage/use-package-tests.el > index e4586b04f2..4110f3a567 100644 > --- a/test/lisp/use-package/use-package-tests.el > +++ b/test/lisp/use-package/use-package-tests.el > @@ -1951,6 +1951,52 @@ bind-key/845 > (should (eq (nth 1 binding) 'ignore)) > (should (eq (nth 2 binding) nil)))) >=20=20 > +(ert-deftest use-package-test/:vc-1 () > + (match-expansion > + (use-package foo :vc (:url "bar")) > + `(unless (package-installed-p 'foo) > + (package-vc-install '(foo :url "bar") nil)))) > + > +(ert-deftest use-package-test/:vc-2 () > + (match-expansion > + (use-package foo > + :vc (baz . (:url "baz" :vc-backend "Git" > + :main-file qux.el :rev "rev-string"))) > + `(unless (package-installed-p 'baz) > + (package-vc-install '(baz :url "baz" :vc-backend Git :main-file "q= ux.el") > + "rev-string")))) > + > +(ert-deftest use-package-test/:vc-3 () > + (match-expansion > + (use-package foo :vc (bar . "baz")) > + `(unless (package-installed-p 'bar) > + (package-vc-install '(bar . "baz") nil)))) > + > +(ert-deftest use-package-test/:vc-4 () > + (let ((load-path? '(pred (apply-partially > + #'string=3D > + (expand-file-name "bar" user-emacs-directory= ))))) > + (match-expansion > + (use-package foo :vc other-name :load-path "bar") > + `(progn (eval-and-compile > + (add-to-list 'load-path ,load-path?)) > + (unless (package-installed-p 'other-name) > + (package-vc-install-from-checkout ,load-path? "other-name= ")))))) > + > +(ert-deftest use-package-test-normalize/:vc () > + (should (equal '(foo "version-string") > + (use-package-normalize/:vc 'foo :vc '("version-string")= ))) > + (should (equal '(bar "version-string") > + (use-package-normalize/:vc 'foo :vc '((bar . "version-s= tring"))))) > + (should (equal '(foo (:url "bar") "baz") > + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev = "baz"))))) > + (should (equal '(foo) > + (use-package-normalize/:vc 'foo :vc '(t)))) > + (should (equal '(foo) > + (use-package-normalize/:vc 'foo :vc nil))) > + (should (equal '(bar) > + (use-package-normalize/:vc 'foo :vc '(bar))))) > + > ;; Local Variables: > ;; no-byte-compile: t > ;; no-update-autoloads: t > --=20 > 2.39.0 > > From 9e54b103366aaef8e303bf65787ad841c56483d1 Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Thu, 29 Dec 2022 12:23:56 +0100 > Subject: [PATCH 2/2] ; Document use-package's :vc keyword > > * doc/misc/use-package.texi (Installing packages): > (Install package): > Add documentation for :vc and link to the related chapter in the Emacs > manual. > > * etc/NEWS: Mention :vc keyword > --- > doc/misc/use-package.texi | 40 +++++++++++++++++++++++++++++++++++++-- > etc/NEWS | 10 ++++++++++ > 2 files changed, 48 insertions(+), 2 deletions(-) > > diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi > index c587d23d74..a4abbb77f9 100644 > --- a/doc/misc/use-package.texi > +++ b/doc/misc/use-package.texi > @@ -1564,8 +1564,10 @@ Installing packages > (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The > @code{use-package} macro provides the @code{:ensure} and @code{:pin} > keywords that interface with that package manager to automatically > -install packages. This is particularly useful if you use your init > -file on more than one system. > +install packages. Further, the @code{:vc} keyword may be used to > +control how package sources are fetched (@pxref{Fetching Package > +Sources,,, emacs, GNU Emacs Manual}). This is particularly useful if > +you use your init file on more than one system. >=20=20 > @menu > * Install package:: > @@ -1617,6 +1619,40 @@ Install package > You can override the above setting for a single package by adding > @w{@code{:ensure nil}} to its declaration. >=20=20 > +@findex :vc > +The @code{:vc} keyword can be used to control how packages are > +fetched. It accepts the same arguments as > +@code{package-vc-selected-packages}, except that a name need not > +explicitly given: it is inferred from the declaration. Further, the > +accepted property list is augmented by a @code{:rev} keyword, which > +has the same shape as the @code{REV} argument to > +@code{package-vc-install}. > + > +For example, > + > +@lisp > +@group > +(use-package foo > + :vc (:url "https://bar.com/foo")) > +@end group > +@end lisp > + > +would try=E2=80=94by invoking @code{package-vc-install}=E2=80=94to insta= ll 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: > + > +@lisp > +@group > +(use-package foo > + :vc t > + :load-path "/path/to/foo/) > +@end group > +@end lisp > + > +The above dispatches to @code{package-vc-install-from-checkout}. > + > @node Pinning packages > @section Pinning packages using @code{:pin} > @cindex installing package from specific archive > diff --git a/etc/NEWS b/etc/NEWS > index 83aa81eb4b..d8e8ed0dd2 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -108,6 +108,16 @@ This command either fills a single paragraph in a de= fun, such as a > doc-string, or a comment, or (re)indents the surrounding defun if > point is not in a comment or a string. It is by default bound to > 'M-q' in 'prog-mode' and all its descendants. > + > +** use-package > + > +*** New ':vc' keyword > +This keyword enables the user to control how packages are fetched by > +utilising 'package-vc.el'. By default, it relays its arguments to > +'package-vc-install', but=E2=80=94when combined with the ':load-path' > +keyword=E2=80=94it can also call upon 'package-vc-install-from-checkout' > +instead. > + > > * New Modes and Packages in Emacs 30.1 >=20=20 > --=20 > 2.39.0 --=20 Tony Zorman | https://tony-zorman.com/ =20 From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Mar 2023 14:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: Philip Kaludercic , 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168027200520108 (code B ref 60418); Fri, 31 Mar 2023 14:14:02 +0000 Received: (at 60418) by debbugs.gnu.org; 31 Mar 2023 14:13:25 +0000 Received: from localhost ([127.0.0.1]:34114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piFVM-0005EE-TC for submit@debbugs.gnu.org; Fri, 31 Mar 2023 10:13:25 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:35454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piFVL-0005E2-83 for 60418@debbugs.gnu.org; Fri, 31 Mar 2023 10:13:23 -0400 Received: by mail-wr1-f43.google.com with SMTP id l27so22563030wrb.2 for <60418@debbugs.gnu.org>; Fri, 31 Mar 2023 07:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680271997; x=1682863997; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=wA6dELQCDZAvQGsP9hBUY7v9gvWutlZ5o9WGBMxiUpk=; b=TmLDrq9QDzBlJcn17GuhUrihguIYfDmX0TwbJyeQuAviclFQZhzexNRwnmkg6JUeQ0 RvXmdGrjOMVDl5+UpyfqUfH1xmE4l+4nRocQc1wsfrrOdiduf2iIiJ46leyhjGac3CX1 bmwV3IP+NJ+GwLGbZl1EQ1JOF9DmcRVqsGGi69anl4qXzzOKR2vtfVy0w5zHeXHs2FFi 77hFtCV2tXyFQo5il2pZvrZMXx3jVo5D/mCoPlTbL4ft3lOwzn2tsJeHYk4Pk803f0zn RNLV0hbFjTOqJljdCgkHRzGu5yd3XcUTP6pSQ+gKVr9m7MdIbdaa9XqmPHdMurViDnSk EHUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680271997; x=1682863997; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wA6dELQCDZAvQGsP9hBUY7v9gvWutlZ5o9WGBMxiUpk=; b=73tBoRjCea608f/b1LasPHxe7/kNXudJDcLqYWBnv1n3voe6I9dL+k3nVg+jtGVw1I x5TQxwgUBMVrVRlTLXF6XLC0UrYhsyV32Gq7g+2fJm1p8XrQ8Vuk+D692y7FuAv8Td6K oh766ndSS8dLcYFtWRtkC1ueshzdzyMfhhX8Pg9ie15ESGTdP2L24o9qk9FtROlZV5aw rGTf0YHKpBoJv7DwVRKfizOT+z81DU3eQOtj19sFTnIngNsVDp89dD5VhTQrauppRb1j RsRibIu5B+xpKDkPc8Qo4W6mCfn7S21kAA6iS1/Xms9Eznk8XJZbfJmMqFrrLIYWHCUE yX+A== X-Gm-Message-State: AAQBX9eQlbT58Y9Uo+sEX2m62xByJymhPSsBtbMq7FoIoo7BamIzhQrb 6e9EPNmjNpiS1Ovq6TlijC0= X-Google-Smtp-Source: AKy350Zj/1L8JoSHiKrQE6lFfWs94MABQB5uS4N4wvKWoSnJs5ULVDdmqjBO2ugmak4joAHYRadWLg== X-Received: by 2002:a5d:604a:0:b0:2e4:aa42:7881 with SMTP id j10-20020a5d604a000000b002e4aa427881mr5021923wrt.49.1680271997297; Fri, 31 Mar 2023 07:13:17 -0700 (PDT) Received: from betli.gmail.com (catv-86-101-66-128.catv.fixed.vodafone.hu. [86.101.66.128]) by smtp.gmail.com with ESMTPSA id e19-20020a5d5953000000b002e6a1bf2162sm370426wri.16.2023.03.31.07.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 07:13:16 -0700 (PDT) From: Felician Nemeth References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> Date: Fri, 31 Mar 2023 16:13:14 +0200 In-Reply-To: <87tu0tl1s4.fsf@hyperspace> (Tony Zorman's message of "Sat, 14 Jan 2023 13:48:59 +0100") Message-ID: <87a5zt2emd.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWOdXElERN7LDLZs6/l 0dDQq6TepMcqAAACW0lEQVQ4jWWSzY7bMAyEaSm6mypylxjkroTRvUW8d9lavf+r7NDOZotWQHzg lyGHP0Sn5ed9qKrLWWIWos9/QJWIeCSywPNTd/AE0LtwFj7A+3WT5PwfeBrQKcsBnkfwVcNySWQr 3i34XN6gRNgis/v4uwSKHCD9lPitB0Aq9BHfHX4cgsI7cJJfLdZg/4bbCzoRmkD9MsagQSBDedZi CgNxkVSJmSOStTBUBKkywEnEoZzbwWj+ACiVJkF6pOpak2PMCqkMYDpaw+gatLR8atMOrB3JGzmm 3rSQo+tkxU+UAbhQSgtslULhsXKk6+IyQ1QTzeQB0MzjlpkCEUCeUdviWrwBcxVqpZjP+v0MYPA0 aq2rvIEZe4GRM0v+9QIB03rsABVSk5y+Mz3LSzExtJLlCCO6dV1uzDQFTBad+gO0TqqL9XE8x4ek +orvYiMJgzC8e+r6TqaPaK6QyqVNvoHtsRrooQ6tTi4vgaSkd8wIikodB3B0iIk58avsDdYNajpS bSKJ+mQnipGszB6zW4lGgsOkKHE2RWVcBpwhaIv3BYIAu3WsnC7YYKLRchp6w8fRGZIWiZuFsVai 7gbcUcJEhiDZ3K1+uzZvBlfaEO8oH4MLu6/hrKVM7QpQcIXJFuC1XjfbfKRxNslk94l9cYcEihV2 HWyNDQAXaLsvnrSyp7HaQhrAn13V6/XW11nh0XINBOEAV+tHK4EvAGNGvEwc0eZw8Vyr56imYEsV sOW9jxm/yb9AH1ufqGMviIK7A0Tc/723oM3tJ4HTOu9gDr3ftbdkxfdjsUv5AqWKwyfCYo5WAAAA AElFTkSuQmCC MIME-Version: 1.0 Content-Type: text/plain 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 (-) merge 60418 61937 thanks (I hope the above works, I've never merged bugs before.) Philip Kaludercic writes: > I have to admit that I am not a fan of this [adding package-vc support > to use-package]. Personally I install all my packages using regular > tarballs, and then manually select packages that I want to track in > source-form if I am interested in contributing a patch. > > One has to keep in mind that by default you will be checking out the tip > of the default development branch. This is not what GNU ELPA and NonGNU > ELPA do. I know *some other* archives do this, but IMO this contributes > to the instability that a lot of Emacs users experience in regards to > the packages in the Emacs world. Coincidentally I also believe that the > popularity of alternative (non-cooperative) package managers like this > "straight.el" boils down to the promise of being able to pin and revert > to previous packages states. Personally I believe that this is an > up-side-down approach to solve the problem from the wrong angle. The > default approach to package management should be reliable and suffice. I think Pandora's box is already open with having package-vc. Maybe use-package's package-vc integration should use more sensible defaults then? But if people don't like this feature, I personally won't press the issue further. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Mar 2023 15:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Felician Nemeth Cc: Tony Zorman , 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168027711629215 (code B ref 60418); Fri, 31 Mar 2023 15:39:02 +0000 Received: (at 60418) by debbugs.gnu.org; 31 Mar 2023 15:38:36 +0000 Received: from localhost ([127.0.0.1]:34304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piGpn-0007b9-MQ for submit@debbugs.gnu.org; Fri, 31 Mar 2023 11:38:36 -0400 Received: from mout01.posteo.de ([185.67.36.65]:52711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piGpl-0007au-1D for 60418@debbugs.gnu.org; Fri, 31 Mar 2023 11:38:33 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8B555240272 for <60418@debbugs.gnu.org>; Fri, 31 Mar 2023 17:38:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680277106; bh=cpTkoMMPN9jETDGRNrzeX6ExrGnvutZFdgOhPwGAz+4=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=nsjw3xrKBOb36i30i1fiW2pHvq7rUR20SHW13f7YJ/XoSAEqx9EQ9/kLJ1C2c861u OzGOB+FsXtWtDDW/KGt904uzfaxCXUNDFp2qSutZ/ryeJQiWc/a+safenaypsT1yxH 2wYMlwfAPXyA9ObSU8UjQkEUH8q7EbSX0p/o0EvpUu/QkAo/IC+4gBn2rI4VMhO74m DAQBzTpZRKvRA4iFezpgItPNppr/xql7MI6GZYF1z0dktzlbEywMRyI4n4WoOmVbJ8 DZosTM9CjTCaRpXnai9vSozCvEWrJtJkwhjA4/zD25gyxG0twaGa3WfxFuVJthQCbt g89MppEpy21Yg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Pp4FF4mp1z6twK; Fri, 31 Mar 2023 17:38:25 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87a5zt2emd.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Fri, 31 Mar 2023 16:13:14 +0200") References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> 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 Date: Fri, 31 Mar 2023 15:38:25 +0000 Message-ID: <87fs9l9bim.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 (---) Felician Nemeth writes: > merge 60418 61937 > thanks > > (I hope the above works, I've never merged bugs before.) > > Philip Kaludercic writes: > >> I have to admit that I am not a fan of this [adding package-vc support >> to use-package]. Personally I install all my packages using regular >> tarballs, and then manually select packages that I want to track in >> source-form if I am interested in contributing a patch. >> >> One has to keep in mind that by default you will be checking out the tip >> of the default development branch. This is not what GNU ELPA and NonGNU >> ELPA do. I know *some other* archives do this, but IMO this contributes >> to the instability that a lot of Emacs users experience in regards to >> the packages in the Emacs world. Coincidentally I also believe that the >> popularity of alternative (non-cooperative) package managers like this >> "straight.el" boils down to the promise of being able to pin and revert >> to previous packages states. Personally I believe that this is an >> up-side-down approach to solve the problem from the wrong angle. The >> default approach to package management should be reliable and suffice. > > I think Pandora's box is already open with having package-vc. > > Maybe use-package's package-vc integration should use more sensible > defaults then? But if people don't like this feature, I personally > won't press the issue further. I am afraid I don't know what you mean by more sensible? My central point is that I wouldn't want to encourage people to download packages using package-vc by default. -- Philip Kaludercic From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Apr 2023 14:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Felician Nemeth Cc: Tony Zorman , 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168087670914257 (code B ref 60418); Fri, 07 Apr 2023 14:12:02 +0000 Received: (at 60418) by debbugs.gnu.org; 7 Apr 2023 14:11:49 +0000 Received: from localhost ([127.0.0.1]:56972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkmof-0003ht-2O for submit@debbugs.gnu.org; Fri, 07 Apr 2023 10:11:49 -0400 Received: from mout02.posteo.de ([185.67.36.66]:37771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkmoc-0003he-GV for 60418@debbugs.gnu.org; Fri, 07 Apr 2023 10:11:47 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A579E24046A for <60418@debbugs.gnu.org>; Fri, 7 Apr 2023 16:11:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680876700; bh=WlkDccQx4BP0ME58Xp/5UzSSTimO2pbbFuzUBdsRlxs=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Rg4GK7p34WaeYVSsGU4c7BLPp3CyN4fgvfQyHnBPorBWObR+Ww9DAC+BjrgDimFlK pz4gB35uuxlTqXwIQzEomkOwn7Qrq0tT0Q8go8Hp/Pg2x86oXofF+AE3a48Ig/P7SP A9EegH1V04ABVU6zzfsJJsur9uNgCoiFRpeS0r9bMhOZRimKeeL+pMD/o6PSnvHgC5 r4KRLayXgYQVK/HKl/RjmrFbg7txEoc9/qocROQMxz0GlE1ig7UsHN20TRWDaGSzgw Gt+9n94Ot+NY1ddhRon/3Sj2wXrTo+O9fvVHDMLUic5YpMjlGMpTCFj+u7yt7GQMW7 jiHZcbr1tUAGQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PtKzv6FFtz9rxH; Fri, 7 Apr 2023 16:11:39 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87fs9l9bim.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 31 Mar 2023 15:38:25 +0000") References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> 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 Date: Fri, 07 Apr 2023 14:11:39 +0000 Message-ID: <87y1n3zsro.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 (---) Philip Kaludercic writes: > Felician Nemeth writes: > >> merge 60418 61937 >> thanks >> >> (I hope the above works, I've never merged bugs before.) >> >> Philip Kaludercic writes: >> >>> I have to admit that I am not a fan of this [adding package-vc support >>> to use-package]. Personally I install all my packages using regular >>> tarballs, and then manually select packages that I want to track in >>> source-form if I am interested in contributing a patch. >>> >>> One has to keep in mind that by default you will be checking out the tip >>> of the default development branch. This is not what GNU ELPA and NonGNU >>> ELPA do. I know *some other* archives do this, but IMO this contributes >>> to the instability that a lot of Emacs users experience in regards to >>> the packages in the Emacs world. Coincidentally I also believe that the >>> popularity of alternative (non-cooperative) package managers like this >>> "straight.el" boils down to the promise of being able to pin and revert >>> to previous packages states. Personally I believe that this is an >>> up-side-down approach to solve the problem from the wrong angle. The >>> default approach to package management should be reliable and suffice. >> >> I think Pandora's box is already open with having package-vc. >> >> Maybe use-package's package-vc integration should use more sensible >> defaults then? But if people don't like this feature, I personally >> won't press the issue further. > > I am afraid I don't know what you mean by more sensible? My central > point is that I wouldn't want to encourage people to download packages > using package-vc by default. ping? -- Philip Kaludercic From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 07 10:11:12 2023 Received: (at control) by debbugs.gnu.org; 7 Apr 2023 14:11:12 +0000 Received: from localhost ([127.0.0.1]:56969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkmo3-0003h1-Pt for submit@debbugs.gnu.org; Fri, 07 Apr 2023 10:11:11 -0400 Received: from mout01.posteo.de ([185.67.36.65]:33257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkmo1-0003go-Fo for control@debbugs.gnu.org; Fri, 07 Apr 2023 10:11:10 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 476D624029C for ; Fri, 7 Apr 2023 16:11:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680876663; bh=aN2JoKM04YYv7UOAYD0uxYGbvTDftmI7CgCmXfcLKvA=; h=Date:To:From:Subject:From; b=BRPscKK84kurNSAhfSjIhl/ULh+cSizpEu3B0gBFmqlxR05PRzaRjYBm5orxZz5fK m7XLhHBESQNWddJTXVEZICIRbHN53F3e9UcnIhpR0ZMdE9jMlievvXL4Vo1uPk+kng O2UdqDTlHOvYlyLoZKzsK5gvkhbHUfzAssZNibR6/Upe1g4sD3tgj/EwhSKfXGx9Jx rYBwKwSXG/Lu4GEHD01jf5cDcbYxR0MfsJ6jBPmDRsgJ9T0KIx25V38V3dpM+MqGEk nA9WWw++WfL0A8+9yUPPO9hCVIsJJBsysTNPnSIzIEoShzywdSjqyiR65BXkZuaA+W BJKuEcR0RMbHA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PtKzB5mHCz9rxK for ; Fri, 7 Apr 2023 16:11:02 +0200 (CEST) Date: Fri, 07 Apr 2023 14:11:02 +0000 Message-Id: <87355b2361.fsf@posteo.net> To: control@debbugs.gnu.org From: Philip Kaludercic Subject: control message for bug #61937 X-Spam-Score: -2.3 (--) 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: -3.3 (---) merge 61937 60418 quit From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Apr 2023 08:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: Tony Zorman , 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168094370618095 (code B ref 60418); Sat, 08 Apr 2023 08:49:02 +0000 Received: (at 60418) by debbugs.gnu.org; 8 Apr 2023 08:48:26 +0000 Received: from localhost ([127.0.0.1]:57683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pl4FF-0004hl-Uh for submit@debbugs.gnu.org; Sat, 08 Apr 2023 04:48:26 -0400 Received: from mail-ej1-f45.google.com ([209.85.218.45]:45610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pl4FD-0004h2-Jj for 60418@debbugs.gnu.org; Sat, 08 Apr 2023 04:48:24 -0400 Received: by mail-ej1-f45.google.com with SMTP id gb34so1936900ejc.12 for <60418@debbugs.gnu.org>; Sat, 08 Apr 2023 01:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680943698; x=1683535698; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=nA6t+/JTIHCHAcsFE0TqzWhamYhAEBXWRRGPuVeR5O4=; b=hBrS1cxW2xmPJzbDejB5nEJdHeXGOpTDB2dk2r0HLELQ72JK/BtNjXvt3wBZlIhtn3 Qyycpil0RKtXdl7OczNjyyPSrdM8nln7IL2wBvATs2FbWq4zOxMt/f1q3VHeJJLEkPmF JdUticMTh2unKQOA2FlTFC+2GMQ4e8o5MM4D8xwxRtMZXZKxgDWzNjGo8oJk1BnNBppt QtQqwPWaft2YqqEFVr+5Bz+zx1QwSItADNjms3ZOmbsIWSFvGny2jOILR3tB3dakM2oQ KdClrLPZ0rzB40lyNHcCr4ZNFNm7uBQtIbSEt82vVu6uw8V1Su3lyLz/OcXF0hNFLW89 UUEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680943698; x=1683535698; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nA6t+/JTIHCHAcsFE0TqzWhamYhAEBXWRRGPuVeR5O4=; b=yf0Z9txKhQmlua7vdFjJDNvElbxJnxoe17ejehpnycHmu+uo9PBdlJEKxVXyfhEt6N aVASsU7A5I4IEhorqtW1QrnXM6UV7jbeamYdLNn4vHr9Nhusbchh88ZWaHEMf+23xerC DfRtWF2O/LGrqZgs1kEDe0dAlzDhcrDYhf9UGNa0oUncqt5qroI7YchwjqrQiAyCuyLj GdajNrNmR24Eu6nJVnPIgu9bbevqIF4JZ4ESWU5fu7F4fitXvwla74Rcqh3fWMkpG+Su RB2CfuT/Noyqa/tNT/E+NKZOqVrKgY3h1+THZVdgYfda02ItddaGYI+35JsZbb0Tey6y vXBA== X-Gm-Message-State: AAQBX9cBvC4eG/bWY7YnsnbgxzsKxPo5c7coOn4GFoZhO23oLy7ZDZhb 3kaRw79x+8pMXao0cUxYQQg= X-Google-Smtp-Source: AKy350Z4HXpAsFDJf4qmThvwZ1h/kfzWEsHXUpJQ09ZR6FtsfofSmU09QNDrs07fokY+SsxLo9BP2Q== X-Received: by 2002:a17:906:f296:b0:92f:7c42:8631 with SMTP id gu22-20020a170906f29600b0092f7c428631mr1889297ejb.16.1680943697679; Sat, 08 Apr 2023 01:48:17 -0700 (PDT) Received: from betli.gmail.com (catv-86-101-66-128.catv.fixed.vodafone.hu. [86.101.66.128]) by smtp.gmail.com with ESMTPSA id t6-20020a05640203c600b004fb30fc1dabsm2591462edw.96.2023.04.08.01.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Apr 2023 01:48:17 -0700 (PDT) From: Felician Nemeth References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> Date: Sat, 08 Apr 2023 10:48:16 +0200 In-Reply-To: <87y1n3zsro.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 07 Apr 2023 14:11:39 +0000") Message-ID: <871qku220f.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUMBwgHAgMFAAGPjY7/ //80MDHq6eqJt3pKAAABr0lEQVQ4jX2UzZKDIAzHqR177q7TPbtx2HMr6guQcrbY9txZ0fd/hA0f onXazcEJ/CD8E4Js8/HS9mwjXtqeMRxHXJkakTEm4b4GPVQW8PU8ov4fQCqeThlF60MBWdo1IXzd 2nEEZE7CEAZLwI0N/gJAhTj7ESQAX4gPgO8lyI+cvgViSVPlNomAj2M9gW40eg7VWY3cATjUcyiO Z+i03cFruGLYoUR7VyU3HihdmCEVhoDN65FXkpbSxkomOzsTQN/gySaodGb9Gdi1oSRXP46gdBWh LcUKJNdeGCWac74GKakmne0aHCFvyqJPYLsCFAVlhRTvGdzMdLHqtgRyUulyXIAH7CYQ3AB0Nody JQhAkq/qtOnbjhxdzYDkXPxlH5y4WdUAeUcX1NVJ6GR7UQEYPGWoAnA36OQNn5lRRp38vHTAp9Br LoTmvlPPDoRCKzpjG1SXT89AaT5l456BamJuMcs+NIOMzJ/s5dI6yUVcrARlruwOebfdv6gunTn4 ww3+QjGBEn5suVyLHoSGvAqREuDLN+iqZ+VcFg+HBbsJUU9+FZthbez9T+bdb+kPv2Ls6ct3hTkA AAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain 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 (-) >>>> One has to keep in mind that by default you will be checking out the tip >>>> of the default development branch. [...] >>> Maybe use-package's package-vc integration should use more sensible >>> defaults then? But if people don't like this feature, I personally >>> won't press the issue further. >> >> I am afraid I don't know what you mean by more sensible? My central >> point is that I wouldn't want to encourage people to download packages >> using package-vc by default. The integration of package-vc with use-package makes a bit easier what's already possible. One possible way to mitigate the problem of running instable code is to check out the commit with the latest tag. (I don't know how feasible is to implement this.) Alternatively, use-package cloud refuse a :vc keyword if an additional :i-know-this-is-in-development-code keyword was not set. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Apr 2023 09:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Felician Nemeth Cc: Tony Zorman , 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168094479820331 (code B ref 60418); Sat, 08 Apr 2023 09:07:01 +0000 Received: (at 60418) by debbugs.gnu.org; 8 Apr 2023 09:06:38 +0000 Received: from localhost ([127.0.0.1]:57703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pl4Ws-0005Hq-1X for submit@debbugs.gnu.org; Sat, 08 Apr 2023 05:06:38 -0400 Received: from mout01.posteo.de ([185.67.36.65]:38749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pl4Wp-0005Hc-Qq for 60418@debbugs.gnu.org; Sat, 08 Apr 2023 05:06:36 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id AFDAB240188 for <60418@debbugs.gnu.org>; Sat, 8 Apr 2023 11:06:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680944789; bh=sRVbyALxzG398GlnZSwzMDuWCrFUwo0Aj862v5kxPjQ=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Y+JthbuiKjwVc4TnlqP+D32BpowXdJlf7s8fUNO1QBxT6LH61VXf9YKwnFpgx8lbr LgGEMUKARTrVEvJxfQFh/d4HeJMbf6b1zns4sgNmM6EAyx2Vl/wJWLoNzGk4RnuWqp 3tDVzUxxQ5Zql9GwyookmGImWQ+EtHQUmOabxRRxc2vIjj7bCS6fprqdSD0LhpsxqO tcSf9kaT9IhDWsa7ABq7s6C18Z3qEj+icHpW3ys/Ace4Rz3zbtLGzyIlzhcCeBHjJA wLGTsCMBOPQ3eHiaJNpPhI3GA765C8VDuEkOnP19LXSgkOXaqExhWvMxsXRnSUKI81 csWLvRC4wA7HA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Ptq9K0Mgpz6tw4; Sat, 8 Apr 2023 11:06:29 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <871qku220f.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Sat, 08 Apr 2023 10:48:16 +0200") References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> 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 Date: Sat, 08 Apr 2023 09:06:28 +0000 Message-ID: <874jpq920b.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 (---) Felician Nemeth writes: >>>>> One has to keep in mind that by default you will be checking out the tip >>>>> of the default development branch. [...] > >>>> Maybe use-package's package-vc integration should use more sensible >>>> defaults then? But if people don't like this feature, I personally >>>> won't press the issue further. >>> >>> I am afraid I don't know what you mean by more sensible? My central >>> point is that I wouldn't want to encourage people to download packages >>> using package-vc by default. > > The integration of package-vc with use-package makes a bit easier what's > already possible. > > One possible way to mitigate the problem of running instable code is to > check out the commit with the latest tag. (I don't know how feasible is > to implement this.) package-vc can check out the latest revision that bumped the version tag (which is what {Non,}GNU ELPA uses to create new versions of a package), you just need to call `package-vc-install' with `:last-release' as REV. So the technical means are there. But if this is done, the question what advantage this has over just installing a tarball this has? You would almost always get the same code. > Alternatively, use-package cloud refuse a :vc > keyword if an additional :i-know-this-is-in-development-code keyword was > not set. Just to clarify, I am not vetoing anything here. If the functionality is added to use-package (which is up to the use-package maintainers to decide), then I don't think users need to be infantilized with these kinds of little ceremonies. All I want to understand is the motivation behind this feature in the first place. -- Philip Kaludercic From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Apr 2023 09:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: Tony Zorman , 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168094595822095 (code B ref 60418); Sat, 08 Apr 2023 09:26:02 +0000 Received: (at 60418) by debbugs.gnu.org; 8 Apr 2023 09:25:58 +0000 Received: from localhost ([127.0.0.1]:57725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pl4pa-0005kI-Jm for submit@debbugs.gnu.org; Sat, 08 Apr 2023 05:25:58 -0400 Received: from mail-ej1-f42.google.com ([209.85.218.42]:46775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pl4pZ-0005k5-3H for 60418@debbugs.gnu.org; Sat, 08 Apr 2023 05:25:57 -0400 Received: by mail-ej1-f42.google.com with SMTP id xi5so1877703ejb.13 for <60418@debbugs.gnu.org>; Sat, 08 Apr 2023 02:25:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680945951; x=1683537951; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=WeVKeapj6KaNjf+h7bUPkpANjKJR7SgAtVxrlasUd9Y=; b=QNNQqfMQhA8Uh86G2VG+Mvg4rp6Bc8h8WXSAtJ9LBRYsC1Pn0K2NnEUiO0bPWNdMFX vUoMmLBZ/x28OUFfnc2jEJdK2sYjrlQQQ0NG2xt4fHIF7GOwyN4xWBg06PpXe3b+f1f2 8EEJMok5AFJPaM4rYLY/xBjtrzAz4A46CXV4ymgXdAWbukbCFNWKKHAyUL12RUO1TBwo vIgk57mbltWwDQ40GKa3vqiMZzkMKIJcNDeSRDpVFM80GatUUjq8lWyLKMtS2Pto+sFB UkqpxOeZludJnnIi1jpNzrbC/GlKUUSZbXwmUUpq3XN1vGzC/QlnhdLvPtX40MBgtJAp EvIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680945951; x=1683537951; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WeVKeapj6KaNjf+h7bUPkpANjKJR7SgAtVxrlasUd9Y=; b=eGWLRUZZZ9bRP6SEL/mRmAo8OW8hllKs2uE7yN9MBJ2L1qdOG+t9mnLlhTJW8bMvx0 qwgMW8EEaFomP3GcTp/ejqi/1C8asNL9Q0jZHktJtMpBgMUiFp54cHpgn9eLL9GC35f0 k0HyOBTPp/62kYin1LYuibWh2Z7JiYzZe7FyJk50GuNZr+sTA60NCBKy33nDznQDeP/Q 2rU/tjwxxr8ayE2+kyQ+hg56MA5ktuREamTYAO7+yQZLg7oWpzC+S0NNJETYpacU26A/ hg4KDnjP9N0PBGUTBwmrW9c29UHAiSA8KzX/9NxZmtEWgrX2sw9yE+3QskACbo/S52Gj f3sQ== X-Gm-Message-State: AAQBX9eMlETEG2w+4icbzCCGh9b1Icq96803OXBfTEhVGD8OC1g55AEX cC2yXgTGWLijHJrSTXpzVwU= X-Google-Smtp-Source: AKy350YEz04WtmHeXa/LX4qwNXSLR6SyV1ncUPoWvMimhZBEvwiayu+YBF3SzlIi+fvhev1YYVz7tw== X-Received: by 2002:a17:906:13da:b0:930:d17b:959b with SMTP id g26-20020a17090613da00b00930d17b959bmr2094914ejc.22.1680945950952; Sat, 08 Apr 2023 02:25:50 -0700 (PDT) Received: from betli.gmail.com (catv-86-101-66-128.catv.fixed.vodafone.hu. [86.101.66.128]) by smtp.gmail.com with ESMTPSA id mm25-20020a170906cc5900b0093e9fb91837sm2964503ejb.76.2023.04.08.02.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Apr 2023 02:25:50 -0700 (PDT) From: Felician Nemeth References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> Date: Sat, 08 Apr 2023 11:25:49 +0200 In-Reply-To: <874jpq920b.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 08 Apr 2023 09:06:28 +0000") Message-ID: <87cz4ezpwi.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUMBwgHAgMFAAGPjY7/ //80MDHq6eqJt3pKAAABr0lEQVQ4jX2UzZKDIAzHqR177q7TPbtx2HMr6guQcrbY9txZ0fd/hA0f onXazcEJ/CD8E4Js8/HS9mwjXtqeMRxHXJkakTEm4b4GPVQW8PU8ov4fQCqeThlF60MBWdo1IXzd 2nEEZE7CEAZLwI0N/gJAhTj7ESQAX4gPgO8lyI+cvgViSVPlNomAj2M9gW40eg7VWY3cATjUcyiO Z+i03cFruGLYoUR7VyU3HihdmCEVhoDN65FXkpbSxkomOzsTQN/gySaodGb9Gdi1oSRXP46gdBWh LcUKJNdeGCWac74GKakmne0aHCFvyqJPYLsCFAVlhRTvGdzMdLHqtgRyUulyXIAH7CYQ3AB0Nody JQhAkq/qtOnbjhxdzYDkXPxlH5y4WdUAeUcX1NVJ6GR7UQEYPGWoAnA36OQNn5lRRp38vHTAp9Br LoTmvlPPDoRCKzpjG1SXT89AaT5l456BamJuMcs+NIOMzJ/s5dI6yUVcrARlruwOebfdv6gunTn4 ww3+QjGBEn5suVyLHoSGvAqREuDLN+iqZ+VcFg+HBbsJUU9+FZthbez9T+bdb+kPv2Ls6ct3hTkA AAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain 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 (-) Philip Kaludercic writes: > package-vc can check out the latest revision that bumped the version tag > (which is what {Non,}GNU ELPA uses to create new versions of a package), > you just need to call `package-vc-install' with `:last-release' as REV. > So the technical means are there. > > But if this is done, the question what advantage this has over just > installing a tarball this has? You would almost always get the same > code. Convenience, I suppose. You can copy your init file to a new machine, and it will work. > [...] All I want to understand is the motivation behind this feature > in the first place. One use-case is to let package developers to distribute thier packages without a package archive. Or more precisely, to let users conveniently install packages that are not in a package archive. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Apr 2023 10:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Felician Nemeth Cc: Tony Zorman , 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168095050330741 (code B ref 60418); Sat, 08 Apr 2023 10:42:02 +0000 Received: (at 60418) by debbugs.gnu.org; 8 Apr 2023 10:41:43 +0000 Received: from localhost ([127.0.0.1]:57784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pl60t-0007zl-5W for submit@debbugs.gnu.org; Sat, 08 Apr 2023 06:41:43 -0400 Received: from mout02.posteo.de ([185.67.36.66]:49969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pl60q-0007zX-NA for 60418@debbugs.gnu.org; Sat, 08 Apr 2023 06:41:41 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9BB27240189 for <60418@debbugs.gnu.org>; Sat, 8 Apr 2023 12:41:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680950494; bh=zLwwnBx1xSNxnZioQZYZRqEugll0g9zvzqi0Q8EJEKU=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=GUlHNqAFxnpAoUIQ+IPiYcC/MetOLAjdRrCmkGRFoRJw+FfyBsBQj6CN3SoXOBAZL OUNAB1GV47/rPzsvnQCtdZaWYgDmBToJnAl7evGqaDC9ViR1hWDEll+HfvBkq8NnHX bUG2820GxRvTJ3JBawocodEtYcl+ix1fWx98R+pPT6IJGNp8mMCqTF+8O+rEUaPXAg xZgeVP9ngYD3wdunjs13qZV5aQ62Ma/lZj1wwHHUDTOVjInr6XGtVw6VF8cZhdRatr HuzWkuG9N2OFxd1EdLcqgFGS60gNo6GHGuKW6pOQ1ZuTpeNrX5RUjNUWweXMHjQwgt NW9JiuD74Uknw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PtsH21D3Lz9rxM; Sat, 8 Apr 2023 12:41:34 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87cz4ezpwi.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Sat, 08 Apr 2023 11:25:49 +0200") References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> 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 Date: Sat, 08 Apr 2023 10:41:33 +0000 Message-ID: <87zg7ioduq.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 (---) Felician Nemeth writes: > Philip Kaludercic writes: > >> package-vc can check out the latest revision that bumped the version tag >> (which is what {Non,}GNU ELPA uses to create new versions of a package), >> you just need to call `package-vc-install' with `:last-release' as REV. >> So the technical means are there. >> >> But if this is done, the question what advantage this has over just >> installing a tarball this has? You would almost always get the same >> code. > > Convenience, I suppose. You can copy your init file to a new machine, > and it will work. But isn't that is already given with use-package and package using tarballs? >> [...] All I want to understand is the motivation behind this feature >> in the first place. > > One use-case is to let package developers to distribute thier packages > without a package archive. Or more precisely, to let users conveniently > install packages that are not in a package archive. Hmm, I had not considered this use-case. I think that if we combine this with falling back to :last-release by default, this could be a good way to solve this problem. -- Philip Kaludercic From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Apr 2023 14:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: Tony Zorman , 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168122222025605 (code B ref 60418); Tue, 11 Apr 2023 14:11:02 +0000 Received: (at 60418) by debbugs.gnu.org; 11 Apr 2023 14:10:20 +0000 Received: from localhost ([127.0.0.1]:37954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmEhQ-0006ev-6B for submit@debbugs.gnu.org; Tue, 11 Apr 2023 10:10:20 -0400 Received: from mail-ej1-f54.google.com ([209.85.218.54]:35347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmEhM-0006ee-AJ for 60418@debbugs.gnu.org; Tue, 11 Apr 2023 10:10:19 -0400 Received: by mail-ej1-f54.google.com with SMTP id jg21so20382281ejc.2 for <60418@debbugs.gnu.org>; Tue, 11 Apr 2023 07:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681222210; x=1683814210; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=3sCqzQHlda8joQExZWFtWCAwTUprrXjR1w7gs9eTwDU=; b=Q7c21CuV9wDmdF4KIjXjddafBbpUIPuFA8KfxmN74plS/6rBdHCRPEi0WSlJ2R/Xz/ iFByuw62jx7aIYM48JKFto6pQ1jQeA3BUw9mMOXgsVatWg6E4b6IgfbnlpZjfRp7KUwm lV4MvH10blN/PExgorNZsxrNEVy3GeIFklhcR6k+ZPN4BFgv8D3i8bNPn6UFCHyCMN92 ZUtFrCzF0RJ99B9XAzKv9JFnMkMsu4V6bH4CnMZAB0/JzrgkOHk14C9LuwQAHNHwnLi+ b9zqF1ItsUywx3a6p64hsari/Joh4d3+7lKA2a8WumC0FAZjlx02vsS73F57d9mZs0Bo q15w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681222210; x=1683814210; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3sCqzQHlda8joQExZWFtWCAwTUprrXjR1w7gs9eTwDU=; b=7+ruVNzkMNf1ZmQ0ccQANAkqdZgkvLdL10RMbj0v815p85o5GmgBLA9pWwwyAd/5ZW ICF/B88S8XKSMbOfjV4tAf6xacpLGzmbIMXxKNjsGN3HamtwpvZ55pWgkd+1Jf85NdlN eRfyXruf6b4Fk8SYzn36KyqHrSiGRnV0KHii11mZ5wr8jfF9Z6iVex4/xmU+DCmN9xTS M//T/f86fdiAJGMYRxS3AaQ8JwHIFrT7H9RPzL/a0QmsljLHENriRaGPt/0ieWURAiqQ ggIcruZZXLFZLekzkouR4ZYRXGf9XZ8dV+9rAe0SmbwzfzC4DOHk0k91Sg8sVwE/Yf7T WkaQ== X-Gm-Message-State: AAQBX9f0630hccKiBHcRxaL1NMhZsuBsuuiKUy56vDbG3QV/IPbjhvzH XrXimtj6uK5LTEaLGn532qs= X-Google-Smtp-Source: AKy350bs/f6xIk10zEXIdQ77aOtBx1BDxmgyAaHzJy60T9HsXhxsG98Q81v2BHVlb0e1NvEqPg4CdA== X-Received: by 2002:a17:907:9693:b0:948:a1ae:b2c4 with SMTP id hd19-20020a170907969300b00948a1aeb2c4mr13116549ejc.6.1681222210182; Tue, 11 Apr 2023 07:10:10 -0700 (PDT) Received: from betli.gmail.com (catv-86-101-66-128.catv.fixed.vodafone.hu. [86.101.66.128]) by smtp.gmail.com with ESMTPSA id d19-20020a1709067f1300b0094a671c2298sm2783317ejr.62.2023.04.11.07.10.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Apr 2023 07:10:09 -0700 (PDT) From: Felician Nemeth References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87zg7ioduq.fsf@posteo.net> Date: Tue, 11 Apr 2023 16:10:09 +0200 In-Reply-To: <87zg7ioduq.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 08 Apr 2023 10:41:33 +0000") Message-ID: <87h6tmy0fy.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWOdXElERN7LDLZs6/l 0dDQq6TepMcqAAACW0lEQVQ4jWWSzY7bMAyEaSm6mypylxjkroTRvUW8d9lavf+r7NDOZotWQHzg lyGHP0Sn5ed9qKrLWWIWos9/QJWIeCSywPNTd/AE0LtwFj7A+3WT5PwfeBrQKcsBnkfwVcNySWQr 3i34XN6gRNgis/v4uwSKHCD9lPitB0Aq9BHfHX4cgsI7cJJfLdZg/4bbCzoRmkD9MsagQSBDedZi CgNxkVSJmSOStTBUBKkywEnEoZzbwWj+ACiVJkF6pOpak2PMCqkMYDpaw+gatLR8atMOrB3JGzmm 3rSQo+tkxU+UAbhQSgtslULhsXKk6+IyQ1QTzeQB0MzjlpkCEUCeUdviWrwBcxVqpZjP+v0MYPA0 aq2rvIEZe4GRM0v+9QIB03rsABVSk5y+Mz3LSzExtJLlCCO6dV1uzDQFTBad+gO0TqqL9XE8x4ek +orvYiMJgzC8e+r6TqaPaK6QyqVNvoHtsRrooQ6tTi4vgaSkd8wIikodB3B0iIk58avsDdYNajpS bSKJ+mQnipGszB6zW4lGgsOkKHE2RWVcBpwhaIv3BYIAu3WsnC7YYKLRchp6w8fRGZIWiZuFsVai 7gbcUcJEhiDZ3K1+uzZvBlfaEO8oH4MLu6/hrKVM7QpQcIXJFuC1XjfbfKRxNslk94l9cYcEihV2 HWyNDQAXaLsvnrSyp7HaQhrAn13V6/XW11nh0XINBOEAV+tHK4EvAGNGvEwc0eZw8Vyr56imYEsV sOW9jxm/yb9AH1ufqGMviIK7A0Tc/723oM3tJ4HTOu9gDr3ftbdkxfdjsUv5AqWKwyfCYo5WAAAA AElFTkSuQmCC MIME-Version: 1.0 Content-Type: text/plain 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 (-) Philip Kaludercic writes: > Felician Nemeth writes: > >> Philip Kaludercic writes: >> >>> package-vc can check out the latest revision that bumped the version tag >>> (which is what {Non,}GNU ELPA uses to create new versions of a package), >>> you just need to call `package-vc-install' with `:last-release' as REV. >>> So the technical means are there. >>> >>> But if this is done, the question what advantage this has over just >>> installing a tarball this has? You would almost always get the same >>> code. >> >> Convenience, I suppose. You can copy your init file to a new machine, >> and it will work. > > But isn't that is already given with use-package and package using > tarballs? I don't know, but a package might have just a public git repository without tarballs. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 07:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: 60418@debbugs.gnu.org, Felician Nemeth , stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16812854678346 (code B ref 60418); Wed, 12 Apr 2023 07:45:01 +0000 Received: (at 60418) by debbugs.gnu.org; 12 Apr 2023 07:44:27 +0000 Received: from localhost ([127.0.0.1]:38933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmV9X-0002AY-1K for submit@debbugs.gnu.org; Wed, 12 Apr 2023 03:44:27 -0400 Received: from mout01.posteo.de ([185.67.36.65]:57423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmV9U-0002A9-Fi for 60418@debbugs.gnu.org; Wed, 12 Apr 2023 03:44:25 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id ED5A12401B7 for <60418@debbugs.gnu.org>; Wed, 12 Apr 2023 09:44:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1681285459; bh=7E4LUgL8e5ZXj748C9IwOZPZIMthjqtB9J4c+0uZEig=; h=From:To:Cc:Subject:Date:Autocrypt:From; b=pQwSUv7mwnR0sS4t8cRAR6rt3AX+IAYJqn0RxAIwVzGwG37zjpfSgg70lfo8Hiwju CGRZ3GIrjGFvRplI3Ey++7EiGFglDmQsrnov8DrwUPbfkrSUFBKzGYMrzALx+tc7eE rQ9wzoTzBMOL3LZwM2TlBfxFg3DH3N+7oqg0bW0nMghoxgxeHUkMV+ZUAU+6grdX2G lsVCJMj3XkkgY842+MHGCZhRhANRtABzA8AEftQYg/WPbBguXUpdfsbhpzXS5iQDcs QTCQW4nTJ+vUweLtYvFBqLfny2LR5lz7zRqM0rpdpk+gTafdIpmI1PfGcEDKjZX/rF T54gx19BAoSLA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PxF8d6jm4z9rxL; Wed, 12 Apr 2023 09:44:17 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87h6tlinft.fsf@hyperspace> (Tony Zorman's message of "Wed, 12 Apr 2023 09:12:22 +0200") Date: Wed, 12 Apr 2023 07:34:01 +0000 Message-ID: <87r0spa712.fsf@posteo.net> References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.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 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 Sat, Apr 08 2023 11:25, Felician Nemeth wrote: >>> [...] All I want to understand is the motivation behind this feature >>> in the first place. >> >> One use-case is to let package developers to distribute thier packages >> without a package archive. Or more precisely, to let users conveniently >> install packages that are not in a package archive. > > FWIW, this was also my motivation for making this change. It's just > incredibly convenient to be able to do this without installing > third-party dependencies. I think that this is a legitimate point, and I would be ready to push this change if you could adjust the patch to checkout the latest release instead of the latest commit by default, as Felician proposed. Does that sound good to you? > Further, it also makes testing out new changes very easy. For example, I > wanted to try out the overhauled LaTeX preview system that was proposed > for Org mode [1]. Rather than having to clone the respective repo and > check out the branch manually, this was just a > > (use-package org > :vc (:url "https://git.tecosaur.net/tec/org-mode.git" :branch "dev")) > > away, which is certainly a win in my book. To be fair, use-package is not necessary here. You can also just use package-vc-checkout to download a package to some directory and check it out that way. I have a command somewhere that even automates the selection and would just "install" the package for a single session. > [1]: https://lists.gnu.org/archive/html/emacs-orgmode/2023-03/msg00196.html From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 15:22:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Felician Nemeth , Philip Kaludercic Cc: 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168131290417508 (code B ref 60418); Wed, 12 Apr 2023 15:22:05 +0000 Received: (at 60418) by debbugs.gnu.org; 12 Apr 2023 15:21:44 +0000 Received: from localhost ([127.0.0.1]:40665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcI3-0004YD-Fs for submit@debbugs.gnu.org; Wed, 12 Apr 2023 11:21:44 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:46752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmUee-0001Kk-SC for 60418@debbugs.gnu.org; Wed, 12 Apr 2023 03:12:38 -0400 Received: from smtp102.mailbox.org (unknown [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4PxDRr2ZXDz9sS2; Wed, 12 Apr 2023 09:12:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1681283544; 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=QAFBcoalt4STJnOSMvN+Q7jUPEd99KKEnLYoKYUZsbY=; b=G0GNkLt6DO5XD1cl4SV5dD1+IinjWLqVOtmTunaIMTXwr728w+TGtHmQ8pkRfK6BjNqUTC b8UN0x6ce4S6lAGKny2azj1E+bWNaJfZS8t6fUCaHpA1FWlrmHhQiBQ/lq+DqOdv9qi8X0 zwfGPd84hGQbJ9LkVB2CAxzb9F5J3BG7ngENKaOpcjWO5wKgQC4Ra1AEHAOjQ5rwo4La5i KgqGG6OKoUgeYvYOx0o+eYV+PAihi7DFMwgGvQUqksTbCkll3qMcZKHs2b9uXkDwTeZpn7 DpAUWd6RvybehqmPtfdJ1H/gnrOTcq+vzAFxQuCwd1jo5Xp47t2wfw0qonb1GA== From: Tony Zorman In-Reply-To: <87cz4ezpwi.fsf@betli.tmit.bme.hu> References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> Date: Wed, 12 Apr 2023 09:12:22 +0200 Message-ID: <87h6tlinft.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-ID: a1fc5df1d26ddbd10aa X-MBO-RS-META: 4htnb4mwa3c7jg489chya1xio6zaeqjf X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Wed, 12 Apr 2023 11:21:37 -0400 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.7 (-) On Sat, Apr 08 2023 11:25, Felician Nemeth wrote: >> [...] All I want to understand is the motivation behind this feature >> in the first place. > > One use-case is to let package developers to distribute thier packages > without a package archive. Or more precisely, to let users conveniently > install packages that are not in a package archive. FWIW, this was also my motivation for making this change. It's just incredibly convenient to be able to do this without installing third-party dependencies. Further, it also makes testing out new changes very easy. For example, I wanted to try out the overhauled LaTeX preview system that was proposed for Org mode [1]. Rather than having to clone the respective repo and check out the branch manually, this was just a (use-package org :vc (:url "https://git.tecosaur.net/tec/org-mode.git" :branch "dev")) away, which is certainly a win in my book. [1]: https://lists.gnu.org/archive/html/emacs-orgmode/2023-03/msg00196.html -- Tony Zorman | https://tony-zorman.com/ From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 15:22:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: 60418@debbugs.gnu.org, Felician Nemeth , stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168131290517516 (code B ref 60418); Wed, 12 Apr 2023 15:22:05 +0000 Received: (at 60418) by debbugs.gnu.org; 12 Apr 2023 15:21:45 +0000 Received: from localhost ([127.0.0.1]:40667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcI4-0004YM-NF for submit@debbugs.gnu.org; Wed, 12 Apr 2023 11:21:45 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:33196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmWLZ-00074X-2R for 60418@debbugs.gnu.org; Wed, 12 Apr 2023 05:00:59 -0400 Received: from smtp202.mailbox.org (unknown [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4PxGrw54sZz9sl5; Wed, 12 Apr 2023 11:00:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1681290048; 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=kZEq9qWZz3uH/YPPPqwO5UGZr8pJNoFK0MjYnUphg0A=; b=FEKeVjm91dNxAlVV1OMTm0K6/l9IIqzMQzMiIKhx4yniDkp/IPIrFCWht1p5FiDWt/bn9i H+wMEM3G9+4zomCTsGgFynf3QWNUTsD5LS8VSDLWdcsSTirAgiRQTNLd0K+K/98VUvUzV7 /UDjxb8z9JlMocoHNIEBV91DURWWmAlwdoTDT3WMXppueA1IgH4f0KBhXNnK/FqjX9IyhG 1gp7bqvpNRELYt5CQK6Hwn+NZirrtcTjooakfV71K+SHYsYXjOUwO9qAB/Ws6Iq2sCfSMO LlfhgaAARQ9Ntg3yOB269SwKdaMnpTjqPhtzDLVklGHLUHSXAtTeMtLVSrC5Xg== From: Tony Zorman In-Reply-To: <87r0spa712.fsf@posteo.net> References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> Date: Wed, 12 Apr 2023 11:00:46 +0200 Message-ID: <87edopiif5.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-META: wap1m18rfsgt7cyo97kpaasiejahnx5g X-MBO-RS-ID: 8cf8f87938475d54f3c X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Wed, 12 Apr 2023 11:21:37 -0400 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.7 (-) On Wed, Apr 12 2023 07:34, Philip Kaludercic wrote: > I think that this is a legitimate point, and I would be ready to push > this change if you could adjust the patch to checkout the latest release > instead of the latest commit by default, as Felician proposed. Does > that sound good to you? Yes, sounds good to me. I should have time to prepare a revised patch this weekend. >> Further, it also makes testing out new changes very easy. For example, I >> wanted to try out the overhauled LaTeX preview system that was proposed >> for Org mode [1]. Rather than having to clone the respective repo and >> check out the branch manually, this was just a >> >> (use-package org >> :vc (:url "https://git.tecosaur.net/tec/org-mode.git" :branch "dev")) >> >> away, which is certainly a win in my book. > > To be fair, use-package is not necessary here. You can also just use > package-vc-checkout to download a package to some directory and check it > out that way. I have a command somewhere that even automates the > selection and would just "install" the package for a single session. Fair point. I should have mentioned that I already had a `use-package` declaration for org-mode, so trying out the branch simply required adding a single line, which is why that felt so nice. -- Tony Zorman | https://tony-zorman.com/ From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Apr 2023 15:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: 60418@debbugs.gnu.org, Felician Nemeth , stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16816597962464 (code B ref 60418); Sun, 16 Apr 2023 15:44:01 +0000 Received: (at 60418) by debbugs.gnu.org; 16 Apr 2023 15:43:16 +0000 Received: from localhost ([127.0.0.1]:52347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po4X5-0000df-Td for submit@debbugs.gnu.org; Sun, 16 Apr 2023 11:43:16 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:42918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po4X2-0000dK-Il for 60418@debbugs.gnu.org; Sun, 16 Apr 2023 11:43:14 -0400 Received: from smtp1.mailbox.org (unknown [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4PzvbD2sKzz9sWl; Sun, 16 Apr 2023 17:43:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1681659784; 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=ObcwB4cvaXbgH+GDQF0w6sjBkZjO8H0oz1NvcqoniuE=; b=esuPCD7DIaqJsdSy+6X9CbHQCVLis+KhrrcvTTlr3xs6zHP2C+PSvsYj8e/XDziRP6BAE8 MQJlmtDMN2R/3CwT3AML1zOIdfzHXWx2wIjMxnIdWgaLY23pGKmH1BSiJvlOs0rqs3QvHG sinn9r+FHc7yL42QbbStswUeMRCihM19ijWh+EQXhj5f93fG8utyt3KD/fJZAkQtAGdKg9 wPj1G57hLMn3yX/fRVBBZ4yvz9w9GOyFoQiGIjW4VCx5gdmn5rSZMMyUrWXVBvSJa3Q0D2 I2mM0NVshR4nd9IqYL/6KBJdY+Idsat5B2XTdY/0QbL1t/hUasbdbnHAlc0Zmw== From: Tony Zorman In-Reply-To: <87edopiif5.fsf@hyperspace> References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> Date: Sun, 16 Apr 2023 17:43:02 +0200 Message-ID: <87wn2bzvcp.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: hknpisx6z1ozhtr5faippfws134m5q6a X-MBO-RS-ID: 22c2b3eadbba4113a46 X-Spam-Score: -0.7 (/) 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.7 (-) --=-=-= Content-Type: text/plain Alright, attached are patches that contain the requested change: we now default to :last-release. Tony --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-vc-keyword-to-use-package.patch >From dd13136ddf9a8db0ae526769ad4885085cc0b19b Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 11:05:04 +0100 Subject: [PATCH 1/2] Add :vc keyword to use-package * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. (use-package-handler/:load-path): Insert 'load-path' into 'state'. (use-package-vc-install): Install the package with package-vc.el. (use-package-handler/:vc): Handler for the :vc keyword. (use-package-normalize--vc-arg): Normalization for more complex arguments to 'use-package-normalize/:vc', in order to make them compatible with the specification of 'package-vc-selected-packages'. (use-package-normalize/:vc): Normalizer for the :vc keyword. (use-package): Document :vc. * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): Do not ensure a package when :vc is used in the declaration. * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): (use-package-test/:vc-2): (use-package-test/:vc-3): (use-package-test/:vc-4): (use-package-test/:vc-5): (use-package-test-normalize/:vc): Add tests for :vc. --- lisp/use-package/use-package-core.el | 83 +++++++++++++++++++++- lisp/use-package/use-package-ensure.el | 3 +- test/lisp/use-package/use-package-tests.el | 49 +++++++++++++ 3 files changed, 132 insertions(+), 3 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 7ab5bdc276..2f84c225d6 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -76,6 +76,7 @@ use-package-keywords :functions :preface :if :when :unless + :vc :no-require :catch :after @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path #'use-package-normalize-paths)) (defun use-package-handler/:load-path (name _keyword arg rest state) - (let ((body (use-package-process-keywords name rest state))) + (let ((body (use-package-process-keywords name rest + (plist-put state :load-path arg)))) (use-package-concat (mapcar #'(lambda (path) `(eval-and-compile (add-to-list 'load-path ,path))) @@ -1577,6 +1579,82 @@ use-package-handler/:config (when use-package-compute-statistics `((use-package-statistics-gather :config ',name t)))))) +;;;; :vc + +(defun use-package-vc-install (arg &optional local-path) + "ARG is a list of the form (NAME OPTIONS REVISION). +The optional LOCAL-PATH boolean decides whether +`package-vc-install-from-checkout' or `package-vc-install' will +end up being called." + (pcase-let* ((`(,name ,opts ,rev) arg) + (spec (if opts (cons name opts) name))) + (unless (package-installed-p name) + (if local-path + (package-vc-install-from-checkout local-path (symbol-name name)) + (package-vc-install spec rev))))) + +(defun use-package-handler/:vc (name _keyword arg rest state) + "Generate code for the :vc keyword." + (let ((body (use-package-process-keywords name rest state)) + (local-path (car (plist-get state :load-path)))) + ;; See `use-package-handler/:ensure' for an explanation. + (if (bound-and-true-p byte-compile-current-file) + (funcall #'use-package-vc-install arg local-path) ; compile time + (push `(use-package-vc-install ',arg ,local-path) body)))) ; run time + +(defun use-package-normalize--vc-arg (arg) + "Normalize possible arguments to the :vc keyword. +ARG is a cons-cell of approximately the form that +`package-vc-selected-packages' accepts, plus an additional `:rev' +keyword. If `:rev' is not given, it defaults to `:last-release'. + +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant +with `package-vc-selected-packages' and REV is a (possibly nil) +revision." + (cl-flet* ((mk-string (s) + (if (and s (stringp s)) s (symbol-name s))) + (mk-sym (s) + (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 :head) nil) + (t (mk-string v)))) + (:vc-backend (mk-sym v)) + (_ (mk-string v))))) + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) + (`(,name . ,opts) arg)) + (if (stringp opts) ; (NAME . VERSION-STRING) ? + (list name opts) + ;; Error handling + (cl-loop for (k _) on opts by #'cddr + if (not (member k valid-kws)) + do (use-package-error + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" + k valid-kws))) + ;; Actual normalization + (list name + (cl-loop for (k v) on opts by #'cddr + if (not (eq k :rev)) + nconc (list k (normalize k v))) + (normalize :rev (plist-get opts :rev))))))) + +(defun use-package-normalize/:vc (name _keyword args) + (let ((arg (car args))) + (pcase arg + ((or 'nil 't) (list name)) ; guess name + ((pred symbolp) (list arg)) ; use this name + ((pred stringp) (list name arg)) ; version string + guess name + ((pred plistp) ; plist + guess name + (use-package-normalize--vc-arg (cons name arg))) + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name + (pred stringp))) + (use-package-normalize--vc-arg arg)) + (_ (use-package-error "Unrecognised argument to :vc.\ + The keyword wants an argument of nil, t, a name of a package,\ + or a cons-cell as accepted by `package-vc-selected-packages', where \ + the accepted plist is augmented by a `:rev' keyword."))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; The main macro @@ -1666,7 +1744,8 @@ use-package (compare with `custom-set-variables'). :custom-face Call `custom-set-faces' with each face definition. :ensure Loads the package using package.el if necessary. -:pin Pin the package to an archive." +:pin Pin the package to an archive. +:vc Integration with `package-vc.el'." (declare (indent defun)) (unless (memq :disabled args) (macroexp-progn diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/use-package-ensure.el index e0ea982594..425a3e8917 100644 --- a/lisp/use-package/use-package-ensure.el +++ b/lisp/use-package/use-package-ensure.el @@ -182,7 +182,8 @@ use-package-ensure-elpa ;;;###autoload (defun use-package-handler/:ensure (name _keyword ensure rest state) - (let* ((body (use-package-process-keywords name rest state))) + (let* ((body (use-package-process-keywords name rest state)) + (ensure (unless (plist-member rest :vc) ensure))) ;; We want to avoid installing packages when the `use-package' macro is ;; being macro-expanded by elisp completion (see `lisp--local-variables'), ;; but still install packages when byte-compiling, to avoid requiring diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index 6374a0d103..b04d087e65 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -1951,6 +1951,55 @@ bind-key/845 (should (eq (nth 1 binding) 'ignore)) (should (eq (nth 2 binding) nil)))) +(ert-deftest use-package-test/:vc-1 () + (match-expansion + (use-package foo :vc (:url "bar")) + '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) + +(ert-deftest use-package-test/:vc-2 () + (match-expansion + (use-package foo + :vc (baz . (:url "baz" :vc-backend "Git" + :main-file qux.el :rev "rev-string"))) + `(use-package-vc-install '(baz + (:url "baz" :vc-backend Git :main-file "qux.el") + "rev-string") + nil))) + +(ert-deftest use-package-test/:vc-3 () + (match-expansion + (use-package foo :vc (bar . "baz")) + `(use-package-vc-install '(bar "baz") nil))) + +(ert-deftest use-package-test/:vc-4 () + (match-expansion + (use-package foo :vc (bar . (:url "baz" :rev :head))) + '(use-package-vc-install '(bar (:url "baz") nil) nil))) + +(ert-deftest use-package-test/:vc-5 () + (let ((load-path? '(pred (apply-partially + #'string= + (expand-file-name "bar" user-emacs-directory))))) + (match-expansion + (use-package foo :vc other-name :load-path "bar") + `(progn (eval-and-compile + (add-to-list 'load-path ,load-path?)) + (use-package-vc-install '(other-name) ,load-path?))))) + +(ert-deftest use-package-test-normalize/:vc () + (should (equal '(foo "version-string") + (use-package-normalize/:vc 'foo :vc '("version-string")))) + (should (equal '(bar "version-string") + (use-package-normalize/:vc 'foo :vc '((bar . "version-string"))))) + (should (equal '(foo (:url "bar") "baz") + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev "baz"))))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc '(t)))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc nil))) + (should (equal '(bar) + (use-package-normalize/:vc 'foo :vc '(bar))))) + ;; Local Variables: ;; no-byte-compile: t ;; no-update-autoloads: t -- 2.40.0 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0002-Document-use-package-s-vc-keyword.patch Content-Transfer-Encoding: quoted-printable >From f4bc4ac5448eda45c9de938dceb280b9854c1b1b Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 12:23:56 +0100 Subject: [PATCH 2/2] ; Document use-package's :vc keyword * doc/misc/use-package.texi (Installing packages): (Install package): Add documentation for :vc and link to the related chapter in the Emacs manual. * etc/NEWS: Mention :vc keyword --- doc/misc/use-package.texi | 41 +++++++++++++++++++++++++++++++++++++-- etc/NEWS | 12 ++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index 87105c4db0..6316af23ca 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi @@ -1554,8 +1554,10 @@ Installing packages (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The @code{use-package} macro provides the @code{:ensure} and @code{:pin} keywords that interface with that package manager to automatically -install packages. This is particularly useful if you use your init -file on more than one system. +install packages. Further, the @code{:vc} keyword may be used to +control how package sources are fetched (@pxref{Fetching Package +Sources,,, emacs, GNU Emacs Manual}). This is particularly useful if +you use your init file on more than one system. =20 @menu * Install package:: @@ -1607,6 +1609,41 @@ Install package You can override the above setting for a single package by adding @w{@code{:ensure nil}} to its declaration. =20 +@findex :vc +The @code{:vc} keyword can be used to control how packages are fetched. +It accepts the same arguments as @code{package-vc-selected-packages}, +except that a name need not explicitly given: it is inferred from the +declaration. Further, the accepted property list is augmented by a +@code{:rev} keyword, which has the same shape as the @code{REV} argument +to @code{package-vc-install}. Notably=E2=80=94even when not specified=E2= =80=94@code{:rev} +defaults to checking out the last release of the package. You can use +@code{:rev :head} to check out the latest commit. + +For example, + +@lisp +@group +(use-package foo + :vc (:url "https://bar.com/foo" :rev :head)) +@end group +@end lisp + +would try=E2=80=94by invoking @code{package-vc-install}=E2=80=94to 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: + +@lisp +@group +(use-package foo + :vc t + :load-path "/path/to/foo/) +@end group +@end lisp + +The above dispatches to @code{package-vc-install-from-checkout}. + @node Pinning packages @section Pinning packages using @code{:pin} @cindex installing package from specific archive diff --git a/etc/NEWS b/etc/NEWS index b121002b24..40cf44dd30 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -276,6 +276,18 @@ distracting and easily confused with actual code, or a= significant early aid that relieves you from moving the buffer or reaching for the mouse to consult an error message. =20 +** use-package + +*** New ':vc' keyword +This keyword enables the user to control how packages are fetched by +utilising 'package-vc.el'. By default, it relays its arguments to +'package-vc-install', but=E2=80=94when combined with the ':load-path' +keyword=E2=80=94it can also call upon 'package-vc-install-from-checkout' +instead. Further, if no revision is given via the ':rev' argument, we +fall back to the last release (via 'package-vc-install's +':last-release' argument). To check out the last commit, use ':rev +:head'. + * New Modes and Packages in Emacs 30.1 =20 --=20 2.40.0 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Apr 2023 16:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16816614246056 (code B ref 60418); Sun, 16 Apr 2023 16:11:02 +0000 Received: (at 60418) by debbugs.gnu.org; 16 Apr 2023 16:10:24 +0000 Received: from localhost ([127.0.0.1]:52393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po4xL-0001Zc-Gq for submit@debbugs.gnu.org; Sun, 16 Apr 2023 12:10:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po4xJ-0001ZN-44 for 60418@debbugs.gnu.org; Sun, 16 Apr 2023 12:10:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1po4xC-0003Z3-D7; Sun, 16 Apr 2023 12:10:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=T9y5YiLuppBV/K0y2uCChp6w2eeplArGDAW/q+qqL58=; b=Gdp1qMovffVSKO1w0VKg cWgWqsciqs1dGjoqxhwonMd+N+4z3ja6TuQEpHLva4lND0VXu71zwkb4qCCbFBhzmr+dHsYViByxT VYlzwKgMGL8ZNoLUmTM9TaeNglrkYdhTfaM572mmp1RIVdOqfzj44FM2vuGMl3hkVzewpC7HcCgsF a609ty62kA0ifkr0bgvMTXfj55+6+KrTHxjQSeKWHY4V/mM3Ue+N0y0IsIUVXqA3XT+k3BW8IKpBk 89h97oVX2yUrTRk3J3RaFJ8IDjJx7qKTuI8Ytowyd4UsCy8UKpRQylQ15xq3cKAyYWA/RP8fnjFwc fDNBtATW395udg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1po4xB-0003Zo-BW; Sun, 16 Apr 2023 12:10:13 -0400 Date: Sun, 16 Apr 2023 19:10:16 +0300 Message-Id: <835y9vbyfr.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87wn2bzvcp.fsf@hyperspace> (bug-gnu-emacs@gnu.org) References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 (---) > Cc: 60418@debbugs.gnu.org, Felician Nemeth , > stefankangas@gmail.com > Date: Sun, 16 Apr 2023 17:43:02 +0200 > From: Tony Zorman via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Alright, attached are patches that contain the requested change: we now > default to :last-release. Thanks, please see below a few minor comments. > +(defun use-package-vc-install (arg &optional local-path) > + "ARG is a list of the form (NAME OPTIONS REVISION). This should tell what the function does, not just what the arguments look like. > +The optional LOCAL-PATH boolean decides whether > +`package-vc-install-from-checkout' or `package-vc-install' will > +end up being called." This should tell explicitly which of the two is called when LOCAL-PATH is nil and when it's non-nil. > +(defun use-package-handler/:vc (name _keyword arg rest state) > + "Generate code for the :vc keyword." I don't think this is an accurate description of what the function does. Also, we try very hard to mention at least the mandatory arguments in the first line of the doc strings. > @@ -1666,7 +1744,8 @@ use-package > (compare with `custom-set-variables'). > :custom-face Call `custom-set-faces' with each face definition. > :ensure Loads the package using package.el if necessary. > -:pin Pin the package to an archive." > +:pin Pin the package to an archive. > +:vc Integration with `package-vc.el'." The description of other keywords say what is the effect of each one; the description of :vc doesn't. "Integration with package.el" is not a useful description, it says nothing about what this keyword does. > +@findex :vc > +The @code{:vc} keyword can be used to control how packages are fetched. Without saying more regarding what "fetched" is about, this description is not as useful as it could have been. You should give some context which would explain how "fetching" is related to use-package. My suggestion, btw, is to use a more descriptive "downloading", not "fetching". > +It accepts the same arguments as @code{package-vc-selected-packages}, There should be a cross-reference here to the Emacs manual where it describes package-vc-selected-packages. > +except that a name need not explicitly given: it is inferred from the ^ "be" is missing there. > +declaration. Further, the accepted property list is augmented by a > +@code{:rev} keyword, which has the same shape as the @code{REV} argument > +to @code{package-vc-install}. Notably—even when not specified—@code{:rev} ^ Please don't use non-ASCII characters in Texinfo sources, that is usually unnecessary. In this case, to produce an em-dash, use two dashes in a row -- they will be converted to em-dash on output. > +would try—by invoking @code{package-vc-install}—to install the latest Same here. > +The above dispatches to @code{package-vc-install-from-checkout}. A cross-reference here would be beneficial, again. > +** use-package > + > +*** New ':vc' keyword Heading lines in NEWS should end in a period. Also, this entry should be marked with "+++", as the necessary changes in the manuals are included. > +This keyword enables the user to control how packages are fetched by > +utilising 'package-vc.el'. By default, it relays its arguments to > +'package-vc-install', but—when combined with the ':load-path' > +keyword—it can also call upon 'package-vc-install-from-checkout' > +instead. Please also avoid non-ASCII characters in NEWS. > Further, if no revision is given via the ':rev' argument, we > +fall back to the last release (via 'package-vc-install's > +':last-release' argument). To check out the last commit, use ':rev You seem to like to say "Further," at the beginning of sentences, but please be aware that this word usually adds no useful information, so you can easily drop it in most cases. For example, in the text above: the sentence will be as informative without "Further" as with it. Also, "we fall back" is not our style in documentation (who is "we"?). We say "use-package will fall back" instead. Thanks for working on this. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Ruijie Yu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Apr 2023 16:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com X-Debbugs-Original-Cc: Philip Kaludercic , Felician Nemeth , 60418@debbugs.gnu.org, bug-gnu-emacs@gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16816623157491 (code B ref 60418); Sun, 16 Apr 2023 16:26:02 +0000 Received: (at 60418) by debbugs.gnu.org; 16 Apr 2023 16:25:15 +0000 Received: from localhost ([127.0.0.1]:52403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po5Bj-0001wl-GW for submit@debbugs.gnu.org; Sun, 16 Apr 2023 12:25:15 -0400 Received: from netyu.xyz ([152.44.41.246]:33510 helo=mail.netyu.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po5Bh-0001wd-Sa for 60418@debbugs.gnu.org; Sun, 16 Apr 2023 12:25:14 -0400 Received: from fw.net.yu ( [222.248.4.98]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 192bdca4 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 16 Apr 2023 16:25:12 +0000 (UTC) References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> User-agent: mu4e 1.9.22; emacs 30.0.50 From: Ruijie Yu Date: Mon, 17 Apr 2023 00:18:48 +0800 In-reply-to: <87wn2bzvcp.fsf@hyperspace> Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.6 (/) 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.6 (/) Tony Zorman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > --- a/test/lisp/use-package/use-package-tests.el > +++ b/test/lisp/use-package/use-package-tests.el > @@ -1951,6 +1951,55 @@ bind-key/845 > (should (eq (nth 1 binding) 'ignore)) > (should (eq (nth 2 binding) nil)))) > > +(ert-deftest use-package-test/:vc-1 () > + (match-expansion > + (use-package foo :vc (:url "bar")) > + '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) > + > +(ert-deftest use-package-test/:vc-2 () > + (match-expansion > + (use-package foo > + :vc (baz . (:url "baz" :vc-backend "Git" > + :main-file qux.el :rev "rev-string"))) > + `(use-package-vc-install '(baz > + (:url "baz" :vc-backend Git :main-file "qux.el") > + "rev-string") > + nil))) I'm curious, what is the significance to using quote versus quasiquote? I noticed that there is no unquote inside the quasiquote at all, and am wondering whether it is simply a typo or some sort of peculiarity in `match-expansion'. Admittedly I didn't look into the definition of `match-expansion' since "git fetch" is taking its time on my end for some reason. -- Best, RY From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Apr 2023 19:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.1681760399995 (code B ref 60418); Mon, 17 Apr 2023 19:40:02 +0000 Received: (at 60418) by debbugs.gnu.org; 17 Apr 2023 19:39:59 +0000 Received: from localhost ([127.0.0.1]:56977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poUhj-0000Fz-Db for submit@debbugs.gnu.org; Mon, 17 Apr 2023 15:39:59 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:59148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poUhh-0000Fk-Qr for 60418@debbugs.gnu.org; Mon, 17 Apr 2023 15:39:58 -0400 Received: from smtp1.mailbox.org (unknown [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Q0cny3BqRz9sjK; Mon, 17 Apr 2023 21:39:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1681760390; 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=7faocydV4fowUJqaKBeLrVdWbGf7xPRpRPO/q9EpOqU=; b=OcyiH4pEWkWIbqsSosVqLy/6E1FYT75CIiUlCxaOcnp6F4TpbfnIRGDZFjc9NUQ3r1ycCS ssN/wDZJSQwBqR2RuyGD96rHEe9OHD8lPq15XB69byNnyPV7jFBmhAEbwOHJca6CqkHZpj CRxITJR9uIy2MoGJE4YgDGJaA/i6FHTDahwgT0CO0S3xD8Kw9G9glU8T4zn8OyS5J8xG7j H5/t+6WrZuOMsp1lQRbtCbjQkLsYRfUw8kT5gK3zjeVKo9IZOryYJfUZwn9Dze8NpQoy1B /+b5rowbSYqS5ZHNpaNFIOnHRh7uPDd55sg+OtpuwdmdybHdKGUd4sfPWw7Xzg== From: Tony Zorman In-Reply-To: <835y9vbyfr.fsf@gnu.org> References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> Date: Mon, 17 Apr 2023 21:39:47 +0200 Message-ID: <87mt36uwl8.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-META: 1mwyuupr6mt83dotzkyetnx7hymomz4u X-MBO-RS-ID: 477b2e197ab666d9341 X-Spam-Score: -0.7 (/) 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.7 (-) On Sun, Apr 16 2023 19:10, Eli Zaretskii wrote: > Thanks, please see below a few minor comments. Thanks for the comments! Sorry, I should have mirrored existing conventions more closely (plus, proofreading; I reckon very few of the "further"s would have survived even the first one). I do have one question before preparing a new patch though. >> +(defun use-package-handler/:vc (name _keyword arg rest state) >> + "Generate code for the :vc keyword." > > I don't think this is an accurate description of what the function > does. Also, we try very hard to mention at least the mandatory > arguments in the first line of the doc strings. I think I initially copied this from the handler for ":custom" (where it's perhaps more applicable) and then forgot to change it. Still, I'm not totally sure what to write here without assuming that the reader already knows what the handler for a use-package keyword does (which is, I guess, why none of the other handlers have much in the way of documentation). Would it be a good idea to link to a relevant entry in the info manual ((use-package) > Keyword extensions > Creating an extension)? Thanks again! -- Tony Zorman | https://tony-zorman.com/ From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Apr 2023 12:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168182002828679 (code B ref 60418); Tue, 18 Apr 2023 12:14:01 +0000 Received: (at 60418) by debbugs.gnu.org; 18 Apr 2023 12:13:48 +0000 Received: from localhost ([127.0.0.1]:58065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pokDT-0007SV-Kk for submit@debbugs.gnu.org; Tue, 18 Apr 2023 08:13:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pokDQ-0007SG-MN for 60418@debbugs.gnu.org; Tue, 18 Apr 2023 08:13:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pokDJ-0000dM-SV; Tue, 18 Apr 2023 08:13:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=7Is+GbQabiKWcQaqtgGmSJo8haPsOjCYcNNbZNArG3U=; b=Gk1CQPRuhv3P nSA7xQbW5Z4J//W3BZmrYj+QYAiJtRbjorzcQ61kJ1YhCYwgekmHReyml/zlSWoKJ63SLZVgphI/8 Yhq6xZ+0Hj6n2MoSMPzK9yxXSSh0YmCgcfx5vvCQAa1z0wvqRuXGGoEZRvsbz1X1xGRNoTAWsMMtU ifls4S4zOelE9jiFVW7rslSXyH8Byl6bU/6BHQLtoi1JUv0OCZBB4Brui/Y7eeiJNE3aVuEUOv9F+ QoEkOzkf21qoYnjAXGvjYy01c1rso73M1D8LSBgpKNqnfl5JQPkVPl01uSf4OuNzRq+sa9kPZtGtk MKjMXYE8hUh88gp13LIgvw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pokDJ-0002zR-90; Tue, 18 Apr 2023 08:13:37 -0400 Date: Tue, 18 Apr 2023 15:13:44 +0300 Message-Id: <83ttxd8k1z.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87mt36uwl8.fsf@hyperspace> (message from Tony Zorman on Mon, 17 Apr 2023 21:39:47 +0200) References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> 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 (---) > From: Tony Zorman > Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, > stefankangas@gmail.com > Date: Mon, 17 Apr 2023 21:39:47 +0200 > > >> +(defun use-package-handler/:vc (name _keyword arg rest state) > >> + "Generate code for the :vc keyword." > > > > I don't think this is an accurate description of what the function > > does. Also, we try very hard to mention at least the mandatory > > arguments in the first line of the doc strings. > > I think I initially copied this from the handler for ":custom" (where > it's perhaps more applicable) and then forgot to change it. Still, I'm > not totally sure what to write here without assuming that the reader > already knows what the handler for a use-package keyword does (which is, > I guess, why none of the other handlers have much in the way of > documentation). Would it be a good idea to link to a relevant entry in > the info manual ((use-package) > Keyword extensions > Creating an > extension)? You could say something short on the first line assuming the reader knows, then explain a bit more in the subsequent lines. And yes, pointing to the Info manual is also an option, but something should still be in the doc string. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Apr 2023 17:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168192591311605 (code B ref 60418); Wed, 19 Apr 2023 17:39:02 +0000 Received: (at 60418) by debbugs.gnu.org; 19 Apr 2023 17:38:33 +0000 Received: from localhost ([127.0.0.1]:35790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppBlI-000316-91 for submit@debbugs.gnu.org; Wed, 19 Apr 2023 13:38:33 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:48786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppBl9-00030m-Kv for 60418@debbugs.gnu.org; Wed, 19 Apr 2023 13:38:30 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Q1p0l39Xmz9t69; Wed, 19 Apr 2023 19:38:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1681925895; 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=gFQTQ6xqDxSyIQTo4x6fBnwoZkBO75lPB4Kta+5WteM=; b=cB4RFKXye9g3o+P5KzmVlTdadLA7HwmMgo4iX4v+qVlMrF5xYUrsyOftUoVZmWcr2ecotG Q9aRS7P8guO8D/OZ4vwN5PIKv1FDYKA4Qszx9l25eJLDIOzl+enMIcK+58K5xPUzDi2mZ4 ZSFsybpc+jQr8en06yC6/rV/FoelzjmDNRk7lP4JPPCHbiLOoLZiEE+BfGZ8QWOjJgW/Nm eOkclgJDMu0b5eIimdbTLajh+yyLyeb+Qr6gG83+nGnaF0zMN7P0gkQgTIZ8jGDdMHBm+7 7xE+92VddUpYiGZg1/NDH0INv/N7g4p+0q8OEqlcOkZY3O/8DCQZ4eYomhs3Wg== From: Tony Zorman In-Reply-To: <83ttxd8k1z.fsf@gnu.org> References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> Date: Wed, 19 Apr 2023 19:38:10 +0200 Message-ID: <87v8hrn56l.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: n4rsozjjewdixpf1ktzuunk6io7fzp4f X-MBO-RS-ID: d783af164d01d7567cf X-Spam-Score: -0.7 (/) 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.7 (-) --=-=-= Content-Type: text/plain On Tue, Apr 18 2023 15:13, Eli Zaretskii wrote: >> From: Tony Zorman >> Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, >> stefankangas@gmail.com >> Date: Mon, 17 Apr 2023 21:39:47 +0200 >> >> >> +(defun use-package-handler/:vc (name _keyword arg rest state) >> >> + "Generate code for the :vc keyword." >> > >> > I don't think this is an accurate description of what the function >> > does. Also, we try very hard to mention at least the mandatory >> > arguments in the first line of the doc strings. >> >> I think I initially copied this from the handler for ":custom" (where >> it's perhaps more applicable) and then forgot to change it. Still, I'm >> not totally sure what to write here without assuming that the reader >> already knows what the handler for a use-package keyword does (which is, >> I guess, why none of the other handlers have much in the way of >> documentation). Would it be a good idea to link to a relevant entry in >> the info manual ((use-package) > Keyword extensions > Creating an >> extension)? > > You could say something short on the first line assuming the reader > knows, then explain a bit more in the subsequent lines. And yes, > pointing to the Info manual is also an option, but something should > still be in the doc string. I've now attached revised patches that should hopefully contain some more useful documentation. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-vc-keyword-to-use-package.patch >From c3c026655f372d84c9da4281d1a230629d13b55f Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 11:05:04 +0100 Subject: [PATCH 1/2] Add :vc keyword to use-package * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. (use-package-handler/:load-path): Insert 'load-path' into 'state'. (use-package-vc-install): Install the package with package-vc.el. (use-package-handler/:vc): Handler for the :vc keyword. (use-package-normalize--vc-arg): Normalization for more complex arguments to 'use-package-normalize/:vc', in order to make them compatible with the specification of 'package-vc-selected-packages'. (use-package-normalize/:vc): Normalizer for the :vc keyword. (use-package): Document :vc. * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): Do not ensure a package when :vc is used in the declaration. * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): (use-package-test/:vc-2): (use-package-test/:vc-3): (use-package-test/:vc-4): (use-package-test/:vc-5): (use-package-test-normalize/:vc): Add tests for :vc. --- lisp/use-package/use-package-core.el | 111 ++++++++++++++++++++- lisp/use-package/use-package-ensure.el | 3 +- test/lisp/use-package/use-package-tests.el | 49 +++++++++ 3 files changed, 160 insertions(+), 3 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 7ab5bdc276..0067ffc4f0 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -76,6 +76,7 @@ use-package-keywords :functions :preface :if :when :unless + :vc :no-require :catch :after @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path #'use-package-normalize-paths)) (defun use-package-handler/:load-path (name _keyword arg rest state) - (let ((body (use-package-process-keywords name rest state))) + (let ((body (use-package-process-keywords name rest + (plist-put state :load-path arg)))) (use-package-concat (mapcar #'(lambda (path) `(eval-and-compile (add-to-list 'load-path ,path))) @@ -1577,6 +1579,109 @@ use-package-handler/:config (when use-package-compute-statistics `((use-package-statistics-gather :config ',name t)))))) +;;;; :vc + +(defun use-package-vc-install (arg &optional local-path) + "Install a package with `package-vc.el'. +ARG is a list of the form (NAME OPTIONS REVISION), as returned by +`use-package-normalize--vc-arg'. If LOCAL-PATH is non-nil, call +`package-vc-install-from-checkout'; otherwise, indicating a +remote host, call `package-vc-install' instead." + (pcase-let* ((`(,name ,opts ,rev) arg) + (spec (if opts (cons name opts) name))) + (unless (package-installed-p name) + (if local-path + (package-vc-install-from-checkout local-path (symbol-name name)) + (package-vc-install spec rev))))) + +(defun use-package-handler/:vc (name _keyword arg rest state) + "Generate code to install package NAME, or do so directly. +When the use-package declaration is part of a byte-compiled file, +install the package during compilation; otherwise, add it to the +macro expansion and wait until runtime. The remaining arguments +are as follows: + +_KEYWORD is ignored. + +ARG is the normalized input to the `:vc' keyword, as returned by +the `use-package-normalize/:vc' function. + +REST is a plist of other (following) keywords and their +arguments, each having already been normalised by the respective +function. + +STATE is a plist of any state that keywords processed before +`:vc' (see `use-package-keywords') may have accumulated. + +Also see (info \"(use-package) Creating an extension\")." + (let ((body (use-package-process-keywords name rest state)) + (local-path (car (plist-get state :load-path)))) + ;; See `use-package-handler/:ensure' for an explanation. + (if (bound-and-true-p byte-compile-current-file) + (funcall #'use-package-vc-install arg local-path) ; compile time + (push `(use-package-vc-install ',arg ,local-path) body)))) ; runtime + +(defun use-package-normalize--vc-arg (arg) + "Normalize possible arguments to the `:vc' keyword. +ARG is a cons-cell of approximately the form that +`package-vc-selected-packages' accepts, plus an additional `:rev' +keyword. If `:rev' is not given, it defaults to `:last-release'. + +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant +with `package-vc-selected-packages' and REV is a (possibly nil, +indicating the latest commit) revision." + (cl-flet* ((mk-string (s) + (if (and s (stringp s)) s (symbol-name s))) + (mk-sym (s) + (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 :head) nil) + (t (mk-string v)))) + (:vc-backend (mk-sym v)) + (_ (mk-string v))))) + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) + (`(,name . ,opts) arg)) + (if (stringp opts) ; (NAME . VERSION-STRING) ? + (list name opts) + ;; Error handling + (cl-loop for (k _) on opts by #'cddr + if (not (member k valid-kws)) + do (use-package-error + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" + k valid-kws))) + ;; Actual normalization + (list name + (cl-loop for (k v) on opts by #'cddr + if (not (eq k :rev)) + nconc (list k (normalize k v))) + (normalize :rev (plist-get opts :rev))))))) + +(defun use-package-normalize/:vc (name _keyword args) + "Normalize possible arguments to the `:vc' keyword. +NAME is the name of the `use-package' declaration, _KEYWORD is +ignored, and ARGS it a list of arguments given to the `:vc' +keyword, the cdr of which is ignored. + +See `use-package-normalize--vc-arg' for most of the actual +normalization work. Also see (info \"(use-package) Creating an +extension\")." + (let ((arg (car args))) + (pcase arg + ((or 'nil 't) (list name)) ; guess name + ((pred symbolp) (list arg)) ; use this name + ((pred stringp) (list name arg)) ; version string + guess name + ((pred plistp) ; plist + guess name + (use-package-normalize--vc-arg (cons name arg))) + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name + (pred stringp))) + (use-package-normalize--vc-arg arg)) + (_ (use-package-error "Unrecognised argument to :vc.\ + The keyword wants an argument of nil, t, a name of a package,\ + or a cons-cell as accepted by `package-vc-selected-packages', where \ + the accepted plist is augmented by a `:rev' keyword."))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; The main macro @@ -1666,7 +1771,9 @@ use-package (compare with `custom-set-variables'). :custom-face Call `custom-set-faces' with each face definition. :ensure Loads the package using package.el if necessary. -:pin Pin the package to an archive." +:pin Pin the package to an archive. +:vc Install the package directly from a version control system + (using `package-vc.el')." (declare (indent defun)) (unless (memq :disabled args) (macroexp-progn diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/use-package-ensure.el index e0ea982594..425a3e8917 100644 --- a/lisp/use-package/use-package-ensure.el +++ b/lisp/use-package/use-package-ensure.el @@ -182,7 +182,8 @@ use-package-ensure-elpa ;;;###autoload (defun use-package-handler/:ensure (name _keyword ensure rest state) - (let* ((body (use-package-process-keywords name rest state))) + (let* ((body (use-package-process-keywords name rest state)) + (ensure (unless (plist-member rest :vc) ensure))) ;; We want to avoid installing packages when the `use-package' macro is ;; being macro-expanded by elisp completion (see `lisp--local-variables'), ;; but still install packages when byte-compiling, to avoid requiring diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index 6374a0d103..b04d087e65 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -1951,6 +1951,55 @@ bind-key/845 (should (eq (nth 1 binding) 'ignore)) (should (eq (nth 2 binding) nil)))) +(ert-deftest use-package-test/:vc-1 () + (match-expansion + (use-package foo :vc (:url "bar")) + '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) + +(ert-deftest use-package-test/:vc-2 () + (match-expansion + (use-package foo + :vc (baz . (:url "baz" :vc-backend "Git" + :main-file qux.el :rev "rev-string"))) + `(use-package-vc-install '(baz + (:url "baz" :vc-backend Git :main-file "qux.el") + "rev-string") + nil))) + +(ert-deftest use-package-test/:vc-3 () + (match-expansion + (use-package foo :vc (bar . "baz")) + `(use-package-vc-install '(bar "baz") nil))) + +(ert-deftest use-package-test/:vc-4 () + (match-expansion + (use-package foo :vc (bar . (:url "baz" :rev :head))) + '(use-package-vc-install '(bar (:url "baz") nil) nil))) + +(ert-deftest use-package-test/:vc-5 () + (let ((load-path? '(pred (apply-partially + #'string= + (expand-file-name "bar" user-emacs-directory))))) + (match-expansion + (use-package foo :vc other-name :load-path "bar") + `(progn (eval-and-compile + (add-to-list 'load-path ,load-path?)) + (use-package-vc-install '(other-name) ,load-path?))))) + +(ert-deftest use-package-test-normalize/:vc () + (should (equal '(foo "version-string") + (use-package-normalize/:vc 'foo :vc '("version-string")))) + (should (equal '(bar "version-string") + (use-package-normalize/:vc 'foo :vc '((bar . "version-string"))))) + (should (equal '(foo (:url "bar") "baz") + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev "baz"))))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc '(t)))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc nil))) + (should (equal '(bar) + (use-package-normalize/:vc 'foo :vc '(bar))))) + ;; Local Variables: ;; no-byte-compile: t ;; no-update-autoloads: t -- 2.40.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-Document-use-package-s-vc-keyword.patch >From 652bb5b80c57f9891f74c48f66e96fba29007f44 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 12:23:56 +0100 Subject: [PATCH 2/2] ; Document use-package's :vc keyword * doc/misc/use-package.texi (Installing packages): (Install package): Add documentation for :vc and link to the related chapter in the Emacs manual. * etc/NEWS: Mention :vc keyword --- doc/misc/use-package.texi | 45 +++++++++++++++++++++++++++++++++++++-- etc/NEWS | 13 +++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index 87105c4db0..d1d847c0e0 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi @@ -1554,8 +1554,11 @@ Installing packages (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The @code{use-package} macro provides the @code{:ensure} and @code{:pin} keywords that interface with that package manager to automatically -install packages. This is particularly useful if you use your init -file on more than one system. +install packages. The @code{:vc} keyword may be used to control how +package sources are downloaded (e.g., from remote hosts) +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). This +is particularly useful if you use your init file on more than one +system. @menu * Install package:: @@ -1607,6 +1610,44 @@ Install package You can override the above setting for a single package by adding @w{@code{:ensure nil}} to its declaration. +@findex :vc +The @code{:vc} keyword can be used to control how packages are +downloaded and/or installed. It accepts the same arguments as +@code{package-vc-selected-packages} (@pxref{Specifying Package +Sources,,, emacs, GNU Emacs Manual}), except that a name need not +explicitly be given: it is inferred from the declaration. The +accepted property list is augmented by a @code{:rev} keyword, which +has the same shape as the @code{REV} argument to +@code{package-vc-install}. Notably -- even when not specified -- +@code{:rev} defaults to checking out the last release of the package. +You can use @code{:rev :head} to check out the latest commit. + +For example, + +@lisp +@group +(use-package foo + :vc (:url "https://bar.com/foo" :rev :head)) +@end group +@end lisp + +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: + +@lisp +@group +(use-package foo + :vc t + :load-path "/path/to/foo/) +@end group +@end lisp + +The above dispatches to @code{package-vc-install-from-checkout} +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). + @node Pinning packages @section Pinning packages using @code{:pin} @cindex installing package from specific archive diff --git a/etc/NEWS b/etc/NEWS index b121002b24..c63bd42fc8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -276,6 +276,19 @@ distracting and easily confused with actual code, or a significant early aid that relieves you from moving the buffer or reaching for the mouse to consult an error message. +** use-package + ++++ +*** New ':vc' keyword. +This keyword enables the user to control how packages are fetched by +utilising 'package-vc.el'. By default, it relays its arguments to +'package-vc-install', but -- when combined with the ':load-path' +keyword -- it can also call upon 'package-vc-install-from-checkout' +instead. If no revision is given via the ':rev' argument, use-package +falls back to the last release (via 'package-vc-install's +':last-release' argument). To check out the last commit, use ':rev +:head'. + * New Modes and Packages in Emacs 30.1 -- 2.40.0 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Apr 2023 09:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman , John Wiegley Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16821555844807 (code B ref 60418); Sat, 22 Apr 2023 09:27:01 +0000 Received: (at 60418) by debbugs.gnu.org; 22 Apr 2023 09:26:24 +0000 Received: from localhost ([127.0.0.1]:41798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pq9Vf-0001FS-FD for submit@debbugs.gnu.org; Sat, 22 Apr 2023 05:26:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pq9Vd-0001FF-60 for 60418@debbugs.gnu.org; Sat, 22 Apr 2023 05:26:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pq9VV-0000rz-QZ; Sat, 22 Apr 2023 05:26:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lKfu8PbY/9IKf52OgY9EuET92HBBf9roEmhJ0kiw2RQ=; b=JAV5wsVRLWMg ihQuMuLEWOpUX/hUwSU+tXBJ7BN7wcFygVpwBZs3VoITzXTH0NWF8DRD9qiqO9ouZD7YNI4po7HlG Ansd6KjKBPvtVMyxHy2N+M3j3hYlU06b1geflC7Bs6QMVJcpshyHkfRH+7bwkTeOeMECFxjVvLh8r SYAGQ90fbXvPlnPLI/BXMZkw54+am49j1JV4StEhQb5VLxk20mzo3RRZjTyHOM4fXb1T9oyYfVrJ2 LXHYYXjDGC4tSbwF3Unz0zHSyBqTkTd+m56p8cQdddeLmg8d1pNYb6+x9dV8V1S+ydBr1ynVGuhWD TkfN7nMtdhCdII/jcyNttg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pq9VV-0006ZG-AQ; Sat, 22 Apr 2023 05:26:13 -0400 Date: Sat, 22 Apr 2023 12:26:31 +0300 Message-Id: <83sfcs1d4o.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87v8hrn56l.fsf@hyperspace> (message from Tony Zorman on Wed, 19 Apr 2023 19:38:10 +0200) References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> 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 (---) > From: Tony Zorman > Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, > stefankangas@gmail.com > Date: Wed, 19 Apr 2023 19:38:10 +0200 John, any comments to this changeset? Philip, will you install this when you think it's ready? > On Tue, Apr 18 2023 15:13, Eli Zaretskii wrote: > >> From: Tony Zorman > >> Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, > >> stefankangas@gmail.com > >> Date: Mon, 17 Apr 2023 21:39:47 +0200 > >> > >> >> +(defun use-package-handler/:vc (name _keyword arg rest state) > >> >> + "Generate code for the :vc keyword." > >> > > >> > I don't think this is an accurate description of what the function > >> > does. Also, we try very hard to mention at least the mandatory > >> > arguments in the first line of the doc strings. > >> > >> I think I initially copied this from the handler for ":custom" (where > >> it's perhaps more applicable) and then forgot to change it. Still, I'm > >> not totally sure what to write here without assuming that the reader > >> already knows what the handler for a use-package keyword does (which is, > >> I guess, why none of the other handlers have much in the way of > >> documentation). Would it be a good idea to link to a relevant entry in > >> the info manual ((use-package) > Keyword extensions > Creating an > >> extension)? > > > > You could say something short on the first line assuming the reader > > knows, then explain a bit more in the subsequent lines. And yes, > > pointing to the Info manual is also an option, but something should > > still be in the doc string. > > I've now attached revised patches that should hopefully contain some > more useful documentation. > > >From c3c026655f372d84c9da4281d1a230629d13b55f Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Thu, 29 Dec 2022 11:05:04 +0100 > Subject: [PATCH 1/2] Add :vc keyword to use-package > > * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. > (use-package-handler/:load-path): Insert 'load-path' into 'state'. > (use-package-vc-install): Install the package with package-vc.el. > (use-package-handler/:vc): Handler for the :vc keyword. > (use-package-normalize--vc-arg): Normalization for more complex > arguments to 'use-package-normalize/:vc', in order to make them > compatible with the specification of 'package-vc-selected-packages'. > (use-package-normalize/:vc): Normalizer for the :vc keyword. > (use-package): Document :vc. > > * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): > Do not ensure a package when :vc is used in the declaration. > > * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): > (use-package-test/:vc-2): > (use-package-test/:vc-3): > (use-package-test/:vc-4): > (use-package-test/:vc-5): > (use-package-test-normalize/:vc): > Add tests for :vc. > --- > lisp/use-package/use-package-core.el | 111 ++++++++++++++++++++- > lisp/use-package/use-package-ensure.el | 3 +- > test/lisp/use-package/use-package-tests.el | 49 +++++++++ > 3 files changed, 160 insertions(+), 3 deletions(-) > > diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el > index 7ab5bdc276..0067ffc4f0 100644 > --- a/lisp/use-package/use-package-core.el > +++ b/lisp/use-package/use-package-core.el > @@ -76,6 +76,7 @@ use-package-keywords > :functions > :preface > :if :when :unless > + :vc > :no-require > :catch > :after > @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path > #'use-package-normalize-paths)) > > (defun use-package-handler/:load-path (name _keyword arg rest state) > - (let ((body (use-package-process-keywords name rest state))) > + (let ((body (use-package-process-keywords name rest > + (plist-put state :load-path arg)))) > (use-package-concat > (mapcar #'(lambda (path) > `(eval-and-compile (add-to-list 'load-path ,path))) > @@ -1577,6 +1579,109 @@ use-package-handler/:config > (when use-package-compute-statistics > `((use-package-statistics-gather :config ',name t)))))) > > +;;;; :vc > + > +(defun use-package-vc-install (arg &optional local-path) > + "Install a package with `package-vc.el'. > +ARG is a list of the form (NAME OPTIONS REVISION), as returned by > +`use-package-normalize--vc-arg'. If LOCAL-PATH is non-nil, call > +`package-vc-install-from-checkout'; otherwise, indicating a > +remote host, call `package-vc-install' instead." > + (pcase-let* ((`(,name ,opts ,rev) arg) > + (spec (if opts (cons name opts) name))) > + (unless (package-installed-p name) > + (if local-path > + (package-vc-install-from-checkout local-path (symbol-name name)) > + (package-vc-install spec rev))))) > + > +(defun use-package-handler/:vc (name _keyword arg rest state) > + "Generate code to install package NAME, or do so directly. > +When the use-package declaration is part of a byte-compiled file, > +install the package during compilation; otherwise, add it to the > +macro expansion and wait until runtime. The remaining arguments > +are as follows: > + > +_KEYWORD is ignored. > + > +ARG is the normalized input to the `:vc' keyword, as returned by > +the `use-package-normalize/:vc' function. > + > +REST is a plist of other (following) keywords and their > +arguments, each having already been normalised by the respective > +function. > + > +STATE is a plist of any state that keywords processed before > +`:vc' (see `use-package-keywords') may have accumulated. > + > +Also see (info \"(use-package) Creating an extension\")." > + (let ((body (use-package-process-keywords name rest state)) > + (local-path (car (plist-get state :load-path)))) > + ;; See `use-package-handler/:ensure' for an explanation. > + (if (bound-and-true-p byte-compile-current-file) > + (funcall #'use-package-vc-install arg local-path) ; compile time > + (push `(use-package-vc-install ',arg ,local-path) body)))) ; runtime > + > +(defun use-package-normalize--vc-arg (arg) > + "Normalize possible arguments to the `:vc' keyword. > +ARG is a cons-cell of approximately the form that > +`package-vc-selected-packages' accepts, plus an additional `:rev' > +keyword. If `:rev' is not given, it defaults to `:last-release'. > + > +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant > +with `package-vc-selected-packages' and REV is a (possibly nil, > +indicating the latest commit) revision." > + (cl-flet* ((mk-string (s) > + (if (and s (stringp s)) s (symbol-name s))) > + (mk-sym (s) > + (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 :head) nil) > + (t (mk-string v)))) > + (:vc-backend (mk-sym v)) > + (_ (mk-string v))))) > + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) > + (`(,name . ,opts) arg)) > + (if (stringp opts) ; (NAME . VERSION-STRING) ? > + (list name opts) > + ;; Error handling > + (cl-loop for (k _) on opts by #'cddr > + if (not (member k valid-kws)) > + do (use-package-error > + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" > + k valid-kws))) > + ;; Actual normalization > + (list name > + (cl-loop for (k v) on opts by #'cddr > + if (not (eq k :rev)) > + nconc (list k (normalize k v))) > + (normalize :rev (plist-get opts :rev))))))) > + > +(defun use-package-normalize/:vc (name _keyword args) > + "Normalize possible arguments to the `:vc' keyword. > +NAME is the name of the `use-package' declaration, _KEYWORD is > +ignored, and ARGS it a list of arguments given to the `:vc' > +keyword, the cdr of which is ignored. > + > +See `use-package-normalize--vc-arg' for most of the actual > +normalization work. Also see (info \"(use-package) Creating an > +extension\")." > + (let ((arg (car args))) > + (pcase arg > + ((or 'nil 't) (list name)) ; guess name > + ((pred symbolp) (list arg)) ; use this name > + ((pred stringp) (list name arg)) ; version string + guess name > + ((pred plistp) ; plist + guess name > + (use-package-normalize--vc-arg (cons name arg))) > + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name > + (pred stringp))) > + (use-package-normalize--vc-arg arg)) > + (_ (use-package-error "Unrecognised argument to :vc.\ > + The keyword wants an argument of nil, t, a name of a package,\ > + or a cons-cell as accepted by `package-vc-selected-packages', where \ > + the accepted plist is augmented by a `:rev' keyword."))))) > + > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > ;; > ;;; The main macro > @@ -1666,7 +1771,9 @@ use-package > (compare with `custom-set-variables'). > :custom-face Call `custom-set-faces' with each face definition. > :ensure Loads the package using package.el if necessary. > -:pin Pin the package to an archive." > +:pin Pin the package to an archive. > +:vc Install the package directly from a version control system > + (using `package-vc.el')." > (declare (indent defun)) > (unless (memq :disabled args) > (macroexp-progn > diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/use-package-ensure.el > index e0ea982594..425a3e8917 100644 > --- a/lisp/use-package/use-package-ensure.el > +++ b/lisp/use-package/use-package-ensure.el > @@ -182,7 +182,8 @@ use-package-ensure-elpa > > ;;;###autoload > (defun use-package-handler/:ensure (name _keyword ensure rest state) > - (let* ((body (use-package-process-keywords name rest state))) > + (let* ((body (use-package-process-keywords name rest state)) > + (ensure (unless (plist-member rest :vc) ensure))) > ;; We want to avoid installing packages when the `use-package' macro is > ;; being macro-expanded by elisp completion (see `lisp--local-variables'), > ;; but still install packages when byte-compiling, to avoid requiring > diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el > index 6374a0d103..b04d087e65 100644 > --- a/test/lisp/use-package/use-package-tests.el > +++ b/test/lisp/use-package/use-package-tests.el > @@ -1951,6 +1951,55 @@ bind-key/845 > (should (eq (nth 1 binding) 'ignore)) > (should (eq (nth 2 binding) nil)))) > > +(ert-deftest use-package-test/:vc-1 () > + (match-expansion > + (use-package foo :vc (:url "bar")) > + '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) > + > +(ert-deftest use-package-test/:vc-2 () > + (match-expansion > + (use-package foo > + :vc (baz . (:url "baz" :vc-backend "Git" > + :main-file qux.el :rev "rev-string"))) > + `(use-package-vc-install '(baz > + (:url "baz" :vc-backend Git :main-file "qux.el") > + "rev-string") > + nil))) > + > +(ert-deftest use-package-test/:vc-3 () > + (match-expansion > + (use-package foo :vc (bar . "baz")) > + `(use-package-vc-install '(bar "baz") nil))) > + > +(ert-deftest use-package-test/:vc-4 () > + (match-expansion > + (use-package foo :vc (bar . (:url "baz" :rev :head))) > + '(use-package-vc-install '(bar (:url "baz") nil) nil))) > + > +(ert-deftest use-package-test/:vc-5 () > + (let ((load-path? '(pred (apply-partially > + #'string= > + (expand-file-name "bar" user-emacs-directory))))) > + (match-expansion > + (use-package foo :vc other-name :load-path "bar") > + `(progn (eval-and-compile > + (add-to-list 'load-path ,load-path?)) > + (use-package-vc-install '(other-name) ,load-path?))))) > + > +(ert-deftest use-package-test-normalize/:vc () > + (should (equal '(foo "version-string") > + (use-package-normalize/:vc 'foo :vc '("version-string")))) > + (should (equal '(bar "version-string") > + (use-package-normalize/:vc 'foo :vc '((bar . "version-string"))))) > + (should (equal '(foo (:url "bar") "baz") > + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev "baz"))))) > + (should (equal '(foo) > + (use-package-normalize/:vc 'foo :vc '(t)))) > + (should (equal '(foo) > + (use-package-normalize/:vc 'foo :vc nil))) > + (should (equal '(bar) > + (use-package-normalize/:vc 'foo :vc '(bar))))) > + > ;; Local Variables: > ;; no-byte-compile: t > ;; no-update-autoloads: t > -- > 2.40.0 > > > >From 652bb5b80c57f9891f74c48f66e96fba29007f44 Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Thu, 29 Dec 2022 12:23:56 +0100 > Subject: [PATCH 2/2] ; Document use-package's :vc keyword > > * doc/misc/use-package.texi (Installing packages): > (Install package): > Add documentation for :vc and link to the related chapter in the Emacs > manual. > > * etc/NEWS: Mention :vc keyword > --- > doc/misc/use-package.texi | 45 +++++++++++++++++++++++++++++++++++++-- > etc/NEWS | 13 +++++++++++ > 2 files changed, 56 insertions(+), 2 deletions(-) > > diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi > index 87105c4db0..d1d847c0e0 100644 > --- a/doc/misc/use-package.texi > +++ b/doc/misc/use-package.texi > @@ -1554,8 +1554,11 @@ Installing packages > (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The > @code{use-package} macro provides the @code{:ensure} and @code{:pin} > keywords that interface with that package manager to automatically > -install packages. This is particularly useful if you use your init > -file on more than one system. > +install packages. The @code{:vc} keyword may be used to control how > +package sources are downloaded (e.g., from remote hosts) > +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). This > +is particularly useful if you use your init file on more than one > +system. > > @menu > * Install package:: > @@ -1607,6 +1610,44 @@ Install package > You can override the above setting for a single package by adding > @w{@code{:ensure nil}} to its declaration. > > +@findex :vc > +The @code{:vc} keyword can be used to control how packages are > +downloaded and/or installed. It accepts the same arguments as > +@code{package-vc-selected-packages} (@pxref{Specifying Package > +Sources,,, emacs, GNU Emacs Manual}), except that a name need not > +explicitly be given: it is inferred from the declaration. The > +accepted property list is augmented by a @code{:rev} keyword, which > +has the same shape as the @code{REV} argument to > +@code{package-vc-install}. Notably -- even when not specified -- > +@code{:rev} defaults to checking out the last release of the package. > +You can use @code{:rev :head} to check out the latest commit. > + > +For example, > + > +@lisp > +@group > +(use-package foo > + :vc (:url "https://bar.com/foo" :rev :head)) > +@end group > +@end lisp > + > +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: > + > +@lisp > +@group > +(use-package foo > + :vc t > + :load-path "/path/to/foo/) > +@end group > +@end lisp > + > +The above dispatches to @code{package-vc-install-from-checkout} > +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). > + > @node Pinning packages > @section Pinning packages using @code{:pin} > @cindex installing package from specific archive > diff --git a/etc/NEWS b/etc/NEWS > index b121002b24..c63bd42fc8 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -276,6 +276,19 @@ distracting and easily confused with actual code, or a significant > early aid that relieves you from moving the buffer or reaching for the > mouse to consult an error message. > > +** use-package > + > ++++ > +*** New ':vc' keyword. > +This keyword enables the user to control how packages are fetched by > +utilising 'package-vc.el'. By default, it relays its arguments to > +'package-vc-install', but -- when combined with the ':load-path' > +keyword -- it can also call upon 'package-vc-install-from-checkout' > +instead. If no revision is given via the ':rev' argument, use-package > +falls back to the last release (via 'package-vc-install's > +':last-release' argument). To check out the last commit, use ':rev > +:head'. > + > > * New Modes and Packages in Emacs 30.1 > > -- > 2.40.0 From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Apr 2023 11:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168216315629179 (code B ref 60418); Sat, 22 Apr 2023 11:33:02 +0000 Received: (at 60418) by debbugs.gnu.org; 22 Apr 2023 11:32:36 +0000 Received: from localhost ([127.0.0.1]:41977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqBTn-0007aY-4B for submit@debbugs.gnu.org; Sat, 22 Apr 2023 07:32:36 -0400 Received: from mout02.posteo.de ([185.67.36.66]:40405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqBTk-0007aH-7M for 60418@debbugs.gnu.org; Sat, 22 Apr 2023 07:32:33 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 423722401D1 for <60418@debbugs.gnu.org>; Sat, 22 Apr 2023 13:32:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682163146; bh=yqrGANr+4ddTZeJl4dKmVJsuPF6guV3IT3cbrf3jfTU=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=IKBHUUP2O/OmXQ3IoSb+/xq1SqVVDa3tRYFNu3eUe9HFjWLQ9CJaXmqMZOxgkIEwe g8kP59LNRFjz4j/PC7Q+qISoYeyLDMqBGNBVrhdsmC6QqQfzi9M5rBsZIUW9o6Xpe4 mZb5EX2pSsu+qI7OT6GpV+Hk3k5IMU2fo8bbMHK6xm7Soa4xK3XE0WpggZztGQbOKc +56ZVBUvJv/UyP4oxQd2Kzl4s7WyNqFrxQQrjca9Y6j+vC2wt2q8OwyiT4OEt0eeEA 66OJJoM0qJ6s1OX1SUyvcvsuVHIQYU+b0ENlhMtjDhsW5xfqANFXtERfXfb8UwDMCK /XQCQtDN3CaDQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q3TlF1Mmxz6txh; Sat, 22 Apr 2023 13:32:25 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87v8hrn56l.fsf@hyperspace> (Tony Zorman's message of "Wed, 19 Apr 2023 19:38:10 +0200") References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.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 Date: Sat, 22 Apr 2023 11:32:24 +0000 Message-ID: <87cz3w2lvb.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 Tue, Apr 18 2023 15:13, Eli Zaretskii wrote: >>> From: Tony Zorman >>> Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, >>> stefankangas@gmail.com >>> Date: Mon, 17 Apr 2023 21:39:47 +0200 >>> >>> >> +(defun use-package-handler/:vc (name _keyword arg rest state) >>> >> + "Generate code for the :vc keyword." >>> > >>> > I don't think this is an accurate description of what the function >>> > does. Also, we try very hard to mention at least the mandatory >>> > arguments in the first line of the doc strings. >>> >>> I think I initially copied this from the handler for ":custom" (where >>> it's perhaps more applicable) and then forgot to change it. Still, I'm >>> not totally sure what to write here without assuming that the reader >>> already knows what the handler for a use-package keyword does (which is, >>> I guess, why none of the other handlers have much in the way of >>> documentation). Would it be a good idea to link to a relevant entry in >>> the info manual ((use-package) > Keyword extensions > Creating an >>> extension)? >> >> You could say something short on the first line assuming the reader >> knows, then explain a bit more in the subsequent lines. And yes, >> pointing to the Info manual is also an option, but something should >> still be in the doc string. > > I've now attached revised patches that should hopefully contain some > more useful documentation. > > From c3c026655f372d84c9da4281d1a230629d13b55f Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Thu, 29 Dec 2022 11:05:04 +0100 > Subject: [PATCH 1/2] Add :vc keyword to use-package > > * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. > (use-package-handler/:load-path): Insert 'load-path' into 'state'. > (use-package-vc-install): Install the package with package-vc.el. > (use-package-handler/:vc): Handler for the :vc keyword. > (use-package-normalize--vc-arg): Normalization for more complex > arguments to 'use-package-normalize/:vc', in order to make them > compatible with the specification of 'package-vc-selected-packages'. > (use-package-normalize/:vc): Normalizer for the :vc keyword. > (use-package): Document :vc. > > * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): > Do not ensure a package when :vc is used in the declaration. > > * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): > (use-package-test/:vc-2): > (use-package-test/:vc-3): > (use-package-test/:vc-4): > (use-package-test/:vc-5): > (use-package-test-normalize/:vc): > Add tests for :vc. > --- > lisp/use-package/use-package-core.el | 111 ++++++++++++++++++++- > lisp/use-package/use-package-ensure.el | 3 +- > test/lisp/use-package/use-package-tests.el | 49 +++++++++ > 3 files changed, 160 insertions(+), 3 deletions(-) > > diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el > index 7ab5bdc276..0067ffc4f0 100644 > --- a/lisp/use-package/use-package-core.el > +++ b/lisp/use-package/use-package-core.el > @@ -76,6 +76,7 @@ use-package-keywords > :functions > :preface > :if :when :unless > + :vc > :no-require > :catch > :after > @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path > #'use-package-normalize-paths)) > > (defun use-package-handler/:load-path (name _keyword arg rest state) > - (let ((body (use-package-process-keywords name rest state))) > + (let ((body (use-package-process-keywords name rest > + (plist-put state :load-path arg)))) > (use-package-concat > (mapcar #'(lambda (path) > `(eval-and-compile (add-to-list 'load-path ,path))) > @@ -1577,6 +1579,109 @@ use-package-handler/:config > (when use-package-compute-statistics > `((use-package-statistics-gather :config ',name t)))))) > > +;;;; :vc > + > +(defun use-package-vc-install (arg &optional local-path) > + "Install a package with `package-vc.el'. > +ARG is a list of the form (NAME OPTIONS REVISION), as returned by > +`use-package-normalize--vc-arg'. If LOCAL-PATH is non-nil, call > +`package-vc-install-from-checkout'; otherwise, indicating a > +remote host, call `package-vc-install' instead." > + (pcase-let* ((`(,name ,opts ,rev) arg) > + (spec (if opts (cons name opts) name))) > + (unless (package-installed-p name) > + (if local-path > + (package-vc-install-from-checkout local-path (symbol-name name)) > + (package-vc-install spec rev))))) > + > +(defun use-package-handler/:vc (name _keyword arg rest state) > + "Generate code to install package NAME, or do so directly. > +When the use-package declaration is part of a byte-compiled file, > +install the package during compilation; otherwise, add it to the > +macro expansion and wait until runtime. The remaining arguments > +are as follows: > + > +_KEYWORD is ignored. > + > +ARG is the normalized input to the `:vc' keyword, as returned by > +the `use-package-normalize/:vc' function. > + > +REST is a plist of other (following) keywords and their > +arguments, each having already been normalised by the respective > +function. > + > +STATE is a plist of any state that keywords processed before > +`:vc' (see `use-package-keywords') may have accumulated. > + > +Also see (info \"(use-package) Creating an extension\")." > + (let ((body (use-package-process-keywords name rest state)) > + (local-path (car (plist-get state :load-path)))) > + ;; See `use-package-handler/:ensure' for an explanation. > + (if (bound-and-true-p byte-compile-current-file) > + (funcall #'use-package-vc-install arg local-path) ; compile time > + (push `(use-package-vc-install ',arg ,local-path) body)))) ; runtime > + > +(defun use-package-normalize--vc-arg (arg) > + "Normalize possible arguments to the `:vc' keyword. > +ARG is a cons-cell of approximately the form that > +`package-vc-selected-packages' accepts, plus an additional `:rev' > +keyword. If `:rev' is not given, it defaults to `:last-release'. > + > +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant > +with `package-vc-selected-packages' and REV is a (possibly nil, > +indicating the latest commit) revision." > + (cl-flet* ((mk-string (s) > + (if (and s (stringp s)) s (symbol-name s))) > + (mk-sym (s) > + (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 :head) nil) > + (t (mk-string v)))) > + (:vc-backend (mk-sym v)) > + (_ (mk-string v))))) > + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) > + (`(,name . ,opts) arg)) > + (if (stringp opts) ; (NAME . VERSION-STRING) ? > + (list name opts) > + ;; Error handling > + (cl-loop for (k _) on opts by #'cddr > + if (not (member k valid-kws)) > + do (use-package-error > + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" > + k valid-kws))) > + ;; Actual normalization > + (list name > + (cl-loop for (k v) on opts by #'cddr > + if (not (eq k :rev)) > + nconc (list k (normalize k v))) > + (normalize :rev (plist-get opts :rev))))))) > + > +(defun use-package-normalize/:vc (name _keyword args) > + "Normalize possible arguments to the `:vc' keyword. > +NAME is the name of the `use-package' declaration, _KEYWORD is > +ignored, and ARGS it a list of arguments given to the `:vc' > +keyword, the cdr of which is ignored. > + > +See `use-package-normalize--vc-arg' for most of the actual > +normalization work. Also see (info \"(use-package) Creating an > +extension\")." > + (let ((arg (car args))) > + (pcase arg > + ((or 'nil 't) (list name)) ; guess name > + ((pred symbolp) (list arg)) ; use this name > + ((pred stringp) (list name arg)) ; version string + guess name > + ((pred plistp) ; plist + guess name > + (use-package-normalize--vc-arg (cons name arg))) > + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name > + (pred stringp))) > + (use-package-normalize--vc-arg arg)) > + (_ (use-package-error "Unrecognised argument to :vc.\ > + The keyword wants an argument of nil, t, a name of a package,\ > + or a cons-cell as accepted by `package-vc-selected-packages', where \ > + the accepted plist is augmented by a `:rev' keyword."))))) > + > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > ;; > ;;; The main macro > @@ -1666,7 +1771,9 @@ use-package > (compare with `custom-set-variables'). > :custom-face Call `custom-set-faces' with each face definition. > :ensure Loads the package using package.el if necessary. > -:pin Pin the package to an archive." > +:pin Pin the package to an archive. > +:vc Install the package directly from a version control system > + (using `package-vc.el')." > (declare (indent defun)) > (unless (memq :disabled args) > (macroexp-progn > diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/use-package-ensure.el > index e0ea982594..425a3e8917 100644 > --- a/lisp/use-package/use-package-ensure.el > +++ b/lisp/use-package/use-package-ensure.el > @@ -182,7 +182,8 @@ use-package-ensure-elpa > > ;;;###autoload > (defun use-package-handler/:ensure (name _keyword ensure rest state) > - (let* ((body (use-package-process-keywords name rest state))) > + (let* ((body (use-package-process-keywords name rest state)) > + (ensure (unless (plist-member rest :vc) ensure))) I think it is better to write this as (and (not (plist-member rest :vc)) ensure). > ;; We want to avoid installing packages when the `use-package' macro is > ;; being macro-expanded by elisp completion (see `lisp--local-variables'), > ;; but still install packages when byte-compiling, to avoid requiring > diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el > index 6374a0d103..b04d087e65 100644 > --- a/test/lisp/use-package/use-package-tests.el > +++ b/test/lisp/use-package/use-package-tests.el > @@ -1951,6 +1951,55 @@ bind-key/845 > (should (eq (nth 1 binding) 'ignore)) > (should (eq (nth 2 binding) nil)))) > > +(ert-deftest use-package-test/:vc-1 () > + (match-expansion > + (use-package foo :vc (:url "bar")) > + '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) > + > +(ert-deftest use-package-test/:vc-2 () > + (match-expansion > + (use-package foo > + :vc (baz . (:url "baz" :vc-backend "Git" > + :main-file qux.el :rev "rev-string"))) > + `(use-package-vc-install '(baz > + (:url "baz" :vc-backend Git :main-file "qux.el") > + "rev-string") > + nil))) > + > +(ert-deftest use-package-test/:vc-3 () > + (match-expansion > + (use-package foo :vc (bar . "baz")) > + `(use-package-vc-install '(bar "baz") nil))) > + > +(ert-deftest use-package-test/:vc-4 () > + (match-expansion > + (use-package foo :vc (bar . (:url "baz" :rev :head))) > + '(use-package-vc-install '(bar (:url "baz") nil) nil))) > + > +(ert-deftest use-package-test/:vc-5 () > + (let ((load-path? '(pred (apply-partially > + #'string= > + (expand-file-name "bar" user-emacs-directory))))) > + (match-expansion > + (use-package foo :vc other-name :load-path "bar") > + `(progn (eval-and-compile > + (add-to-list 'load-path ,load-path?)) > + (use-package-vc-install '(other-name) ,load-path?))))) > + > +(ert-deftest use-package-test-normalize/:vc () > + (should (equal '(foo "version-string") > + (use-package-normalize/:vc 'foo :vc '("version-string")))) > + (should (equal '(bar "version-string") > + (use-package-normalize/:vc 'foo :vc '((bar . "version-string"))))) > + (should (equal '(foo (:url "bar") "baz") > + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev "baz"))))) > + (should (equal '(foo) > + (use-package-normalize/:vc 'foo :vc '(t)))) > + (should (equal '(foo) > + (use-package-normalize/:vc 'foo :vc nil))) > + (should (equal '(bar) > + (use-package-normalize/:vc 'foo :vc '(bar))))) On my machine, these tests appear to fail? Also, it would probably be useful to document them (at leat the ...-1 to ...-5 ones) so that a failure can be more easily understood. > ;; Local Variables: > ;; no-byte-compile: t > ;; no-update-autoloads: t > -- > 2.40.0 > > From 652bb5b80c57f9891f74c48f66e96fba29007f44 Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Thu, 29 Dec 2022 12:23:56 +0100 > Subject: [PATCH 2/2] ; Document use-package's :vc keyword > > * doc/misc/use-package.texi (Installing packages): > (Install package): > Add documentation for :vc and link to the related chapter in the Emacs > manual. > > * etc/NEWS: Mention :vc keyword > --- > doc/misc/use-package.texi | 45 +++++++++++++++++++++++++++++++++++++-- > etc/NEWS | 13 +++++++++++ > 2 files changed, 56 insertions(+), 2 deletions(-) > > diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi > index 87105c4db0..d1d847c0e0 100644 > --- a/doc/misc/use-package.texi > +++ b/doc/misc/use-package.texi > @@ -1554,8 +1554,11 @@ Installing packages > (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The > @code{use-package} macro provides the @code{:ensure} and @code{:pin} > keywords that interface with that package manager to automatically > -install packages. This is particularly useful if you use your init > -file on more than one system. > +install packages. The @code{:vc} keyword may be used to control how > +package sources are downloaded (e.g., from remote hosts) > +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). This The double-parentheses here look weird IMO. > +is particularly useful if you use your init file on more than one > +system. > > @menu > * Install package:: > @@ -1607,6 +1610,44 @@ Install package > You can override the above setting for a single package by adding > @w{@code{:ensure nil}} to its declaration. > > +@findex :vc > +The @code{:vc} keyword can be used to control how packages are > +downloaded and/or installed. This sounds vague, I think it makes sense to start with some context motivating why/when :vc should be used. > It accepts the same arguments as > +@code{package-vc-selected-packages} (@pxref{Specifying Package > +Sources,,, emacs, GNU Emacs Manual}), except that a name need not This link does not appear to work. I believe you can only link to a node, and this is just a section. Also, referring to the variable has become an unnecessary redirection, since the variable documentation now refers to the manual. > +explicitly be given: it is inferred from the declaration. The > +accepted property list is augmented by a @code{:rev} keyword, which > +has the same shape as the @code{REV} argument to > +@code{package-vc-install}. Notably -- even when not specified -- > +@code{:rev} defaults to checking out the last release of the package. > +You can use @code{:rev :head} to check out the latest commit. The term "head" is a bit Git-specific, how about something like "tip" or "newest"? > +For example, > + > +@lisp > +@group > +(use-package foo > + :vc (:url "https://bar.com/foo" :rev :head)) > +@end group > +@end lisp I think it would make sense to use the same examples as the Emacs manual has been updated to use (BBDB) so that users can directly try out the code. > +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: > + > +@lisp > +@group > +(use-package foo > + :vc t > + :load-path "/path/to/foo/) > +@end group > +@end lisp > + > +The above dispatches to @code{package-vc-install-from-checkout} > +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). Does this reference here really help? > @node Pinning packages > @section Pinning packages using @code{:pin} > @cindex installing package from specific archive > diff --git a/etc/NEWS b/etc/NEWS > index b121002b24..c63bd42fc8 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -276,6 +276,19 @@ distracting and easily confused with actual code, or a significant > early aid that relieves you from moving the buffer or reaching for the > mouse to consult an error message. > > +** use-package > + > ++++ > +*** New ':vc' keyword. > +This keyword enables the user to control how packages are fetched by > +utilising 'package-vc.el'. By default, it relays its arguments to > +'package-vc-install', but -- when combined with the ':load-path' > +keyword -- it can also call upon 'package-vc-install-from-checkout' > +instead. If no revision is given via the ':rev' argument, use-package > +falls back to the last release (via 'package-vc-install's > +':last-release' argument). To check out the last commit, use ':rev > +:head'. > + > > * New Modes and Packages in Emacs 30.1 > > -- > 2.40.0 (Sorry for all the back and forth, I hope you understand that this is just to get stuff right and not for my own sake of being pedantic. If you don't have the time, I can also make the changes I'd just like to hear your opinions.) -- Philip Kaludercic From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Apr 2023 11:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Tony Zorman , John Wiegley , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168216326029351 (code B ref 60418); Sat, 22 Apr 2023 11:35:01 +0000 Received: (at 60418) by debbugs.gnu.org; 22 Apr 2023 11:34:20 +0000 Received: from localhost ([127.0.0.1]:41982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqBVT-0007dJ-Gu for submit@debbugs.gnu.org; Sat, 22 Apr 2023 07:34:20 -0400 Received: from mout02.posteo.de ([185.67.36.66]:58015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqBVR-0007d2-CL for 60418@debbugs.gnu.org; Sat, 22 Apr 2023 07:34:18 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D3DCD240284 for <60418@debbugs.gnu.org>; Sat, 22 Apr 2023 13:34:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682163251; bh=Voh8J8ltm9LQYzWrCcBUP/YTYZiDlQSoIyp9IOJ26mc=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=LcN+iC0xP4uUDvIyH2lsXWYbGOofSbGkl6APoj/xUJzj6zDLh4y6CupPgmDplgbn1 rj7eJKCw+Vr2n2LXJ/wlW9sCkeIaYTtJyqL0PXPrHdDayUYT3Bmv/wBqlIEr6topG/ Qumq4i9DE6WDgQH3+vo9TIGcyL90xQtNyZVoMIGyju5TiiYYb8MqCKFMExQH8EVmQT jn5NQlkP7oMMSprVm69Wa5lMuZHD1ZCgEs5/mAtwMnUwIZqntfoK1BLlPmI9Owmjdk O4r+YcjauqXiyPrnd6wSrysVOtD3HAoVCyZaCq7fapgiVP/TiIrDe6KPU2EX6/XOVO 6bUDO+VOwzp4g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q3TnH21lwz6txV; Sat, 22 Apr 2023 13:34:11 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <83sfcs1d4o.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Apr 2023 12:26:31 +0300") References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <83sfcs1d4o.fsf@gnu.org> 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 Date: Sat, 22 Apr 2023 11:34:10 +0000 Message-ID: <874jp82lsd.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 (---) Eli Zaretskii writes: >> From: Tony Zorman >> Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, >> stefankangas@gmail.com >> Date: Wed, 19 Apr 2023 19:38:10 +0200 > > John, any comments to this changeset? > > Philip, will you install this when you think it's ready? Can do, I just had a few more comments in my other message. >> On Tue, Apr 18 2023 15:13, Eli Zaretskii wrote: >> >> From: Tony Zorman >> >> Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, >> >> stefankangas@gmail.com >> >> Date: Mon, 17 Apr 2023 21:39:47 +0200 >> >> >> >> >> +(defun use-package-handler/:vc (name _keyword arg rest state) >> >> >> + "Generate code for the :vc keyword." >> >> > >> >> > I don't think this is an accurate description of what the function >> >> > does. Also, we try very hard to mention at least the mandatory >> >> > arguments in the first line of the doc strings. >> >> >> >> I think I initially copied this from the handler for ":custom" (where >> >> it's perhaps more applicable) and then forgot to change it. Still, I'm >> >> not totally sure what to write here without assuming that the reader >> >> already knows what the handler for a use-package keyword does (which is, >> >> I guess, why none of the other handlers have much in the way of >> >> documentation). Would it be a good idea to link to a relevant entry in >> >> the info manual ((use-package) > Keyword extensions > Creating an >> >> extension)? >> > >> > You could say something short on the first line assuming the reader >> > knows, then explain a bit more in the subsequent lines. And yes, >> > pointing to the Info manual is also an option, but something should >> > still be in the doc string. >> >> I've now attached revised patches that should hopefully contain some >> more useful documentation. >> >> >From c3c026655f372d84c9da4281d1a230629d13b55f Mon Sep 17 00:00:00 2001 >> From: Tony Zorman >> Date: Thu, 29 Dec 2022 11:05:04 +0100 >> Subject: [PATCH 1/2] Add :vc keyword to use-package >> >> * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. >> (use-package-handler/:load-path): Insert 'load-path' into 'state'. >> (use-package-vc-install): Install the package with package-vc.el. >> (use-package-handler/:vc): Handler for the :vc keyword. >> (use-package-normalize--vc-arg): Normalization for more complex >> arguments to 'use-package-normalize/:vc', in order to make them >> compatible with the specification of 'package-vc-selected-packages'. >> (use-package-normalize/:vc): Normalizer for the :vc keyword. >> (use-package): Document :vc. >> >> * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): >> Do not ensure a package when :vc is used in the declaration. >> >> * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): >> (use-package-test/:vc-2): >> (use-package-test/:vc-3): >> (use-package-test/:vc-4): >> (use-package-test/:vc-5): >> (use-package-test-normalize/:vc): >> Add tests for :vc. >> --- >> lisp/use-package/use-package-core.el | 111 ++++++++++++++++++++- >> lisp/use-package/use-package-ensure.el | 3 +- >> test/lisp/use-package/use-package-tests.el | 49 +++++++++ >> 3 files changed, 160 insertions(+), 3 deletions(-) >> >> diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el >> index 7ab5bdc276..0067ffc4f0 100644 >> --- a/lisp/use-package/use-package-core.el >> +++ b/lisp/use-package/use-package-core.el >> @@ -76,6 +76,7 @@ use-package-keywords >> :functions >> :preface >> :if :when :unless >> + :vc >> :no-require >> :catch >> :after >> @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path >> #'use-package-normalize-paths)) >> >> (defun use-package-handler/:load-path (name _keyword arg rest state) >> - (let ((body (use-package-process-keywords name rest state))) >> + (let ((body (use-package-process-keywords name rest >> + (plist-put state :load-path arg)))) >> (use-package-concat >> (mapcar #'(lambda (path) >> `(eval-and-compile (add-to-list 'load-path ,path))) >> @@ -1577,6 +1579,109 @@ use-package-handler/:config >> (when use-package-compute-statistics >> `((use-package-statistics-gather :config ',name t)))))) >> >> +;;;; :vc >> + >> +(defun use-package-vc-install (arg &optional local-path) >> + "Install a package with `package-vc.el'. >> +ARG is a list of the form (NAME OPTIONS REVISION), as returned by >> +`use-package-normalize--vc-arg'. If LOCAL-PATH is non-nil, call >> +`package-vc-install-from-checkout'; otherwise, indicating a >> +remote host, call `package-vc-install' instead." >> + (pcase-let* ((`(,name ,opts ,rev) arg) >> + (spec (if opts (cons name opts) name))) >> + (unless (package-installed-p name) >> + (if local-path >> + (package-vc-install-from-checkout local-path (symbol-name name)) >> + (package-vc-install spec rev))))) >> + >> +(defun use-package-handler/:vc (name _keyword arg rest state) >> + "Generate code to install package NAME, or do so directly. >> +When the use-package declaration is part of a byte-compiled file, >> +install the package during compilation; otherwise, add it to the >> +macro expansion and wait until runtime. The remaining arguments >> +are as follows: >> + >> +_KEYWORD is ignored. >> + >> +ARG is the normalized input to the `:vc' keyword, as returned by >> +the `use-package-normalize/:vc' function. >> + >> +REST is a plist of other (following) keywords and their >> +arguments, each having already been normalised by the respective >> +function. >> + >> +STATE is a plist of any state that keywords processed before >> +`:vc' (see `use-package-keywords') may have accumulated. >> + >> +Also see (info \"(use-package) Creating an extension\")." >> + (let ((body (use-package-process-keywords name rest state)) >> + (local-path (car (plist-get state :load-path)))) >> + ;; See `use-package-handler/:ensure' for an explanation. >> + (if (bound-and-true-p byte-compile-current-file) >> + (funcall #'use-package-vc-install arg local-path) ; compile time >> + (push `(use-package-vc-install ',arg ,local-path) body)))) ; runtime >> + >> +(defun use-package-normalize--vc-arg (arg) >> + "Normalize possible arguments to the `:vc' keyword. >> +ARG is a cons-cell of approximately the form that >> +`package-vc-selected-packages' accepts, plus an additional `:rev' >> +keyword. If `:rev' is not given, it defaults to `:last-release'. >> + >> +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant >> +with `package-vc-selected-packages' and REV is a (possibly nil, >> +indicating the latest commit) revision." >> + (cl-flet* ((mk-string (s) >> + (if (and s (stringp s)) s (symbol-name s))) >> + (mk-sym (s) >> + (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 :head) nil) >> + (t (mk-string v)))) >> + (:vc-backend (mk-sym v)) >> + (_ (mk-string v))))) >> + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) >> + (`(,name . ,opts) arg)) >> + (if (stringp opts) ; (NAME . VERSION-STRING) ? >> + (list name opts) >> + ;; Error handling >> + (cl-loop for (k _) on opts by #'cddr >> + if (not (member k valid-kws)) >> + do (use-package-error >> + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" >> + k valid-kws))) >> + ;; Actual normalization >> + (list name >> + (cl-loop for (k v) on opts by #'cddr >> + if (not (eq k :rev)) >> + nconc (list k (normalize k v))) >> + (normalize :rev (plist-get opts :rev))))))) >> + >> +(defun use-package-normalize/:vc (name _keyword args) >> + "Normalize possible arguments to the `:vc' keyword. >> +NAME is the name of the `use-package' declaration, _KEYWORD is >> +ignored, and ARGS it a list of arguments given to the `:vc' >> +keyword, the cdr of which is ignored. >> + >> +See `use-package-normalize--vc-arg' for most of the actual >> +normalization work. Also see (info \"(use-package) Creating an >> +extension\")." >> + (let ((arg (car args))) >> + (pcase arg >> + ((or 'nil 't) (list name)) ; guess name >> + ((pred symbolp) (list arg)) ; use this name >> + ((pred stringp) (list name arg)) ; version string + guess name >> + ((pred plistp) ; plist + guess name >> + (use-package-normalize--vc-arg (cons name arg))) >> + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name >> + (pred stringp))) >> + (use-package-normalize--vc-arg arg)) >> + (_ (use-package-error "Unrecognised argument to :vc.\ >> + The keyword wants an argument of nil, t, a name of a package,\ >> + or a cons-cell as accepted by `package-vc-selected-packages', where \ >> + the accepted plist is augmented by a `:rev' keyword."))))) >> + >> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> ;; >> ;;; The main macro >> @@ -1666,7 +1771,9 @@ use-package >> (compare with `custom-set-variables'). >> :custom-face Call `custom-set-faces' with each face definition. >> :ensure Loads the package using package.el if necessary. >> -:pin Pin the package to an archive." >> +:pin Pin the package to an archive. >> +:vc Install the package directly from a version control system >> + (using `package-vc.el')." >> (declare (indent defun)) >> (unless (memq :disabled args) >> (macroexp-progn >> diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/use-package-ensure.el >> index e0ea982594..425a3e8917 100644 >> --- a/lisp/use-package/use-package-ensure.el >> +++ b/lisp/use-package/use-package-ensure.el >> @@ -182,7 +182,8 @@ use-package-ensure-elpa >> >> ;;;###autoload >> (defun use-package-handler/:ensure (name _keyword ensure rest state) >> - (let* ((body (use-package-process-keywords name rest state))) >> + (let* ((body (use-package-process-keywords name rest state)) >> + (ensure (unless (plist-member rest :vc) ensure))) >> ;; We want to avoid installing packages when the `use-package' macro is >> ;; being macro-expanded by elisp completion (see `lisp--local-variables'), >> ;; but still install packages when byte-compiling, to avoid requiring >> diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el >> index 6374a0d103..b04d087e65 100644 >> --- a/test/lisp/use-package/use-package-tests.el >> +++ b/test/lisp/use-package/use-package-tests.el >> @@ -1951,6 +1951,55 @@ bind-key/845 >> (should (eq (nth 1 binding) 'ignore)) >> (should (eq (nth 2 binding) nil)))) >> >> +(ert-deftest use-package-test/:vc-1 () >> + (match-expansion >> + (use-package foo :vc (:url "bar")) >> + '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) >> + >> +(ert-deftest use-package-test/:vc-2 () >> + (match-expansion >> + (use-package foo >> + :vc (baz . (:url "baz" :vc-backend "Git" >> + :main-file qux.el :rev "rev-string"))) >> + `(use-package-vc-install '(baz >> + (:url "baz" :vc-backend Git :main-file "qux.el") >> + "rev-string") >> + nil))) >> + >> +(ert-deftest use-package-test/:vc-3 () >> + (match-expansion >> + (use-package foo :vc (bar . "baz")) >> + `(use-package-vc-install '(bar "baz") nil))) >> + >> +(ert-deftest use-package-test/:vc-4 () >> + (match-expansion >> + (use-package foo :vc (bar . (:url "baz" :rev :head))) >> + '(use-package-vc-install '(bar (:url "baz") nil) nil))) >> + >> +(ert-deftest use-package-test/:vc-5 () >> + (let ((load-path? '(pred (apply-partially >> + #'string= >> + (expand-file-name "bar" user-emacs-directory))))) >> + (match-expansion >> + (use-package foo :vc other-name :load-path "bar") >> + `(progn (eval-and-compile >> + (add-to-list 'load-path ,load-path?)) >> + (use-package-vc-install '(other-name) ,load-path?))))) >> + >> +(ert-deftest use-package-test-normalize/:vc () >> + (should (equal '(foo "version-string") >> + (use-package-normalize/:vc 'foo :vc '("version-string")))) >> + (should (equal '(bar "version-string") >> + (use-package-normalize/:vc 'foo :vc '((bar . "version-string"))))) >> + (should (equal '(foo (:url "bar") "baz") >> + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev "baz"))))) >> + (should (equal '(foo) >> + (use-package-normalize/:vc 'foo :vc '(t)))) >> + (should (equal '(foo) >> + (use-package-normalize/:vc 'foo :vc nil))) >> + (should (equal '(bar) >> + (use-package-normalize/:vc 'foo :vc '(bar))))) >> + >> ;; Local Variables: >> ;; no-byte-compile: t >> ;; no-update-autoloads: t >> -- >> 2.40.0 >> >> >> >From 652bb5b80c57f9891f74c48f66e96fba29007f44 Mon Sep 17 00:00:00 2001 >> From: Tony Zorman >> Date: Thu, 29 Dec 2022 12:23:56 +0100 >> Subject: [PATCH 2/2] ; Document use-package's :vc keyword >> >> * doc/misc/use-package.texi (Installing packages): >> (Install package): >> Add documentation for :vc and link to the related chapter in the Emacs >> manual. >> >> * etc/NEWS: Mention :vc keyword >> --- >> doc/misc/use-package.texi | 45 +++++++++++++++++++++++++++++++++++++-- >> etc/NEWS | 13 +++++++++++ >> 2 files changed, 56 insertions(+), 2 deletions(-) >> >> diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi >> index 87105c4db0..d1d847c0e0 100644 >> --- a/doc/misc/use-package.texi >> +++ b/doc/misc/use-package.texi >> @@ -1554,8 +1554,11 @@ Installing packages >> (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The >> @code{use-package} macro provides the @code{:ensure} and @code{:pin} >> keywords that interface with that package manager to automatically >> -install packages. This is particularly useful if you use your init >> -file on more than one system. >> +install packages. The @code{:vc} keyword may be used to control how >> +package sources are downloaded (e.g., from remote hosts) >> +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). This >> +is particularly useful if you use your init file on more than one >> +system. >> >> @menu >> * Install package:: >> @@ -1607,6 +1610,44 @@ Install package >> You can override the above setting for a single package by adding >> @w{@code{:ensure nil}} to its declaration. >> >> +@findex :vc >> +The @code{:vc} keyword can be used to control how packages are >> +downloaded and/or installed. It accepts the same arguments as >> +@code{package-vc-selected-packages} (@pxref{Specifying Package >> +Sources,,, emacs, GNU Emacs Manual}), except that a name need not >> +explicitly be given: it is inferred from the declaration. The >> +accepted property list is augmented by a @code{:rev} keyword, which >> +has the same shape as the @code{REV} argument to >> +@code{package-vc-install}. Notably -- even when not specified -- >> +@code{:rev} defaults to checking out the last release of the package. >> +You can use @code{:rev :head} to check out the latest commit. >> + >> +For example, >> + >> +@lisp >> +@group >> +(use-package foo >> + :vc (:url "https://bar.com/foo" :rev :head)) >> +@end group >> +@end lisp >> + >> +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: >> + >> +@lisp >> +@group >> +(use-package foo >> + :vc t >> + :load-path "/path/to/foo/) >> +@end group >> +@end lisp >> + >> +The above dispatches to @code{package-vc-install-from-checkout} >> +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). >> + >> @node Pinning packages >> @section Pinning packages using @code{:pin} >> @cindex installing package from specific archive >> diff --git a/etc/NEWS b/etc/NEWS >> index b121002b24..c63bd42fc8 100644 >> --- a/etc/NEWS >> +++ b/etc/NEWS >> @@ -276,6 +276,19 @@ distracting and easily confused with actual code, or a significant >> early aid that relieves you from moving the buffer or reaching for the >> mouse to consult an error message. >> >> +** use-package >> + >> ++++ >> +*** New ':vc' keyword. >> +This keyword enables the user to control how packages are fetched by >> +utilising 'package-vc.el'. By default, it relays its arguments to >> +'package-vc-install', but -- when combined with the ':load-path' >> +keyword -- it can also call upon 'package-vc-install-from-checkout' >> +instead. If no revision is given via the ':rev' argument, use-package >> +falls back to the last release (via 'package-vc-install's >> +':last-release' argument). To check out the last commit, use ':rev >> +:head'. >> + >> >> * New Modes and Packages in Emacs 30.1 >> >> -- >> 2.40.0 -- Philip Kaludercic From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: John Wiegley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Apr 2023 05:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: felician.nemeth@gmail.com, Eli Zaretskii , 60418@debbugs.gnu.org, Tony Zorman , stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16822290813923 (code B ref 60418); Sun, 23 Apr 2023 05:52:01 +0000 Received: (at 60418) by debbugs.gnu.org; 23 Apr 2023 05:51:21 +0000 Received: from localhost ([127.0.0.1]:44469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqSd6-00011C-UY for submit@debbugs.gnu.org; Sun, 23 Apr 2023 01:51:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqSd5-00010S-65 for 60418@debbugs.gnu.org; Sun, 23 Apr 2023 01:51:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqScw-0000WT-Tz; Sun, 23 Apr 2023 01:51:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:Date:In-Reply-To:Subject:To: From; bh=HjnuClqXXNYNgakrGTghRCVWOv/BuAz7fhRKN4nxE94=; b=YGEkzzkXZgi+6ZNBvkYK Rou1+dFeyO+0s7mbSSOJe+dGg6WPTXiEhw2kqk00CQr9XHnso7WhscJqFZCmqQnZ1F6b3RTYBjGyC jDG0rikURNFCQPWX4qrVaJtVRuL6GvpU90hYDG78g0F2UaKJt2e7FbeeayNaACczLqoYAAVFvMUkH arqbeWdGWgTuV5AhZXCe8mB9pjcjE99DRRRYGq/KzmfNoGFNWo7wuGpaEHHfVJvkPXFUmrM2iw6di QSeKyKKy1Gy9WBqOn64E536w/q4zsNR/PevI8ofulrQ6KJgnGsEv1fUnN24/bMDI7GaUCrcLARTut Fz6EcH2e1/a+Ew==; Received: from auth1-smtp.messagingengine.com ([66.111.4.227]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqScw-0004Ds-5Z; Sun, 23 Apr 2023 01:51:10 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id CE9CC27C0054; Sun, 23 Apr 2023 01:51:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 23 Apr 2023 01:51:07 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtjedguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufgjfffkfhgfgggtsehttdertddtredtnecuhfhrohhmpeflohhh nhcuhghivghglhgvhicuoehjohhhnhifsehgnhhurdhorhhgqeenucggtffrrghtthgvrh hnpeeigedvueelgeduheffieefhffftdeiheeutedtudelfeeuledvudetuefhleeikeen ucffohhmrghinhepnhgvfigrrhhtihhsrghnshdrtghomhenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhhnhifodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqdeikeejkedtleeggedqudejjeehfeekudeiqdhjohhhnh ifpeepghhnuhdrohhrghesnhgvfigrrhhtihhsrghnshdrtghomh X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 23 Apr 2023 01:51:06 -0400 (EDT) From: John Wiegley In-Reply-To: <874jp82lsd.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 22 Apr 2023 11:34:10 +0000") Date: Sat, 22 Apr 2023 22:51:02 -0700 Message-ID: References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <83sfcs1d4o.fsf@gnu.org> <874jp82lsd.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) 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 (---) >>>>> Philip Kaludercic writes: > Eli Zaretskii writes: >> John, any comments to this changeset? >> >> Philip, will you install this when you think it's ready? > Can do, I just had a few more comments in my other message. These changes look fine to me. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Apr 2023 06:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16822300705863 (code B ref 60418); Sun, 23 Apr 2023 06:08:01 +0000 Received: (at 60418) by debbugs.gnu.org; 23 Apr 2023 06:07:50 +0000 Received: from localhost ([127.0.0.1]:44509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqSt4-0001WV-8w for submit@debbugs.gnu.org; Sun, 23 Apr 2023 02:07:50 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:58462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqSt1-0001WF-Qg for 60418@debbugs.gnu.org; Sun, 23 Apr 2023 02:07:48 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4Q3yV374qgz9sQc; Sun, 23 Apr 2023 08:07:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1682230060; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d1fUUB7bu2Qg9g3jXwyKl+ddDawtqpQpGqyJ4qVTyQQ=; b=DIwDojfwpVKDAmnr6QkjVlXRg11TVISRWLiqw99K8gSwgF/hbIE9d+EW284PA4xKaBYfmz N7OtXPLRAFuPgd82gxsjNCAcXAZ4wSGnhw4+Sy2+2U7PqYPTvOHFS+9CmBZHW+Q7ZO8xgH Y3jYMg1X7S9tXsJGWeWL0Cjgyv86QYPCZOR1WTFUoZ7I+SzTJAj48jvxf0oPRcjPMQBvo0 x/UVdR55YH6S6Yt3wp2BXwFWDQJt+qxZa5rRpsoUQjJmjDN2FzPBIaLhMt7O25hZbnAx49 8zlhN0Z3DeU45VsFVdH9Qu/4tzg98QKBtOisorcAwXqUDgspECxw5y1EI56YtQ== From: Tony Zorman In-Reply-To: <87cz3w2lvb.fsf@posteo.net> References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> Date: Sun, 23 Apr 2023 08:07:37 +0200 Message-ID: <87jzy3ku6u.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-ID: 77b73d2efa3ac442ed9 X-MBO-RS-META: 9fwwdc49gghjfofd68cpg87nr7ex9hzk X-Spam-Score: -0.7 (/) 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.7 (-) On Sat, Apr 22 2023 11:32, Philip Kaludercic wrote: > (Sorry for all the back and forth, I hope you understand that this is > just to get stuff right and not for my own sake of being pedantic. If > you don't have the time, I can also make the changes I'd just like to > hear your opinions.) No, I totally get it. Getting this stuff right the first time is much easier than going back and trying to fix it afterwards. I agree with most of your suggestions, so I'm just going to answer those where I have questions/comments. >> +(ert-deftest use-package-test/:vc-1 () >> + (match-expansion >> + (use-package foo :vc (:url "bar")) >> + '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) >> + >> +(ert-deftest use-package-test/:vc-2 () >> + (match-expansion >> + (use-package foo >> + :vc (baz . (:url "baz" :vc-backend "Git" >> + :main-file qux.el :rev "rev-string"))) >> + `(use-package-vc-install '(baz >> + (:url "baz" :vc-backend Git :main-file "q= ux.el") >> + "rev-string") >> + nil))) >> + >> +(ert-deftest use-package-test/:vc-3 () >> + (match-expansion >> + (use-package foo :vc (bar . "baz")) >> + `(use-package-vc-install '(bar "baz") nil))) >> + >> +(ert-deftest use-package-test/:vc-4 () >> + (match-expansion >> + (use-package foo :vc (bar . (:url "baz" :rev :head))) >> + '(use-package-vc-install '(bar (:url "baz") nil) nil))) >> + >> +(ert-deftest use-package-test/:vc-5 () >> + (let ((load-path? '(pred (apply-partially >> + #'string=3D >> + (expand-file-name "bar" user-emacs-director= y))))) >> + (match-expansion >> + (use-package foo :vc other-name :load-path "bar") >> + `(progn (eval-and-compile >> + (add-to-list 'load-path ,load-path?)) >> + (use-package-vc-install '(other-name) ,load-path?))))) >> + >> +(ert-deftest use-package-test-normalize/:vc () >> + (should (equal '(foo "version-string") >> + (use-package-normalize/:vc 'foo :vc '("version-string"= )))) >> + (should (equal '(bar "version-string") >> + (use-package-normalize/:vc 'foo :vc '((bar . "version-= string"))))) >> + (should (equal '(foo (:url "bar") "baz") >> + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev= "baz"))))) >> + (should (equal '(foo) >> + (use-package-normalize/:vc 'foo :vc '(t)))) >> + (should (equal '(foo) >> + (use-package-normalize/:vc 'foo :vc nil))) >> + (should (equal '(bar) >> + (use-package-normalize/:vc 'foo :vc '(bar))))) > > On my machine, these tests appear to fail? Also, it would probably be > useful to document them (at leat the ...-1 to ...-5 ones) so that a > failure can be more easily understood. They don't fail for me=E2=80=94maybe I'm running the tests wrong? So far, I= 've done so interactively by evaluating the whole buffer and then running `M-x ert'. The -1=E2=80=A6-5 tests just test the macro expansion, so e.g. (ert-deftest use-package-test/:vc-1 () (match-expansion (use-package foo :vc (:url "bar")) '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) would test if the first argument to `match-expansion' actually expands into the second one or not (which I guess explains why the error messages are a bit hard to understand).=20=20=20 >> It accepts the same arguments as >> +@code{package-vc-selected-packages} (@pxref{Specifying Package >> +Sources,,, emacs, GNU Emacs Manual}), except that a name need not > > This link does not appear to work. I believe you can only link to a > node, and this is just a section. Also, referring to the variable has > become an unnecessary redirection, since the variable documentation now > refers to the manual. Oh, I see. I have to admit that info links are still a bit of a mystery to me; sorry. So should I just link to the closest node, which would be "Fetching Package Sources" again, here? >> +For example, >> + >> +@lisp >> +@group >> +(use-package foo >> + :vc (:url "https://bar.com/foo" :rev :head)) >> +@end group >> +@end lisp > > I think it would make sense to use the same examples as the Emacs manual > has been updated to use (BBDB) so that users can directly try out the > code. Sorry, I'm not sure I follow: the same examples as what exactly? Or do you just mean an actual package that users could try out when executing this code, instead of a dummy one? >> +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: >> + >> +@lisp >> +@group >> +(use-package foo >> + :vc t >> + :load-path "/path/to/foo/) >> +@end group >> +@end lisp >> + >> +The above dispatches to @code{package-vc-install-from-checkout} >> +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). > > Does this reference here really help? Perhaps not. I don't have any strong opinions about this, so if you prefer I can remove this. --=20 Tony Zorman | https://tony-zorman.com/ From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Apr 2023 12:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168225331125343 (code B ref 60418); Sun, 23 Apr 2023 12:36:02 +0000 Received: (at 60418) by debbugs.gnu.org; 23 Apr 2023 12:35:11 +0000 Received: from localhost ([127.0.0.1]:44818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqYvu-0006ag-Az for submit@debbugs.gnu.org; Sun, 23 Apr 2023 08:35:10 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqYvn-0006a0-Pv for 60418@debbugs.gnu.org; Sun, 23 Apr 2023 08:35:08 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id F10AC24015A for <60418@debbugs.gnu.org>; Sun, 23 Apr 2023 14:34:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682253298; bh=gm+JWRwdOvyhnLJbvHKmiNxitFwPysEcR/p0E1KarGc=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=fvHrQR+IXsxz98cuyHuZdjqdNh9w7q72tmGx0AM0EVgOlM18ddrIysU8XDEqBKplx QoFCSwjRUiPs/jIOhqU1LckS2GZp95cypC7E4pwFbK+9yc+LxmCjx5O/2A/KJ1u0a2 K11DuHKvpMCebF00zufxPGfYevXUNdhyDegyheMMBVMHSjvlF5/hCcpuuLUIJTlvHE itori2w7cqGRyKnXegAQ1MJeqsw/A+xiaE57B6FgbQsh4lmKt4XpgO1RBHLwP+mp4W D4eCxgh8evnUjRQ0bB+HWv3mFW3uhDof+7voAetfWdf2tkrrB3ADBXv1PppzZd8+2m cQ6pjycDkFRaQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q474x1Lmlz6twp; Sun, 23 Apr 2023 14:34:57 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87jzy3ku6u.fsf@hyperspace> (Tony Zorman's message of "Sun, 23 Apr 2023 08:07:37 +0200") References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.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 Date: Sun, 23 Apr 2023 12:35:29 +0000 Message-ID: <87bkje93ou.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 Sat, Apr 22 2023 11:32, Philip Kaludercic wrote: >> (Sorry for all the back and forth, I hope you understand that this is >> just to get stuff right and not for my own sake of being pedantic. If >> you don't have the time, I can also make the changes I'd just like to >> hear your opinions.) > > No, I totally get it. Getting this stuff right the first time is much > easier than going back and trying to fix it afterwards. OK, great. I just didn't want to make this seem like a ritual GNU thing ^^. > I agree with most of your suggestions, so I'm just going to answer those > where I have questions/comments. > >>> +(ert-deftest use-package-test/:vc-1 () >>> + (match-expansion >>> + (use-package foo :vc (:url "bar")) >>> + '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) >>> + >>> +(ert-deftest use-package-test/:vc-2 () >>> + (match-expansion >>> + (use-package foo >>> + :vc (baz . (:url "baz" :vc-backend "Git" >>> + :main-file qux.el :rev "rev-string"))) >>> + `(use-package-vc-install '(baz >>> + (:url "baz" :vc-backend Git :main-file "= qux.el") >>> + "rev-string") >>> + nil))) >>> + >>> +(ert-deftest use-package-test/:vc-3 () >>> + (match-expansion >>> + (use-package foo :vc (bar . "baz")) >>> + `(use-package-vc-install '(bar "baz") nil))) >>> + >>> +(ert-deftest use-package-test/:vc-4 () >>> + (match-expansion >>> + (use-package foo :vc (bar . (:url "baz" :rev :head))) >>> + '(use-package-vc-install '(bar (:url "baz") nil) nil))) >>> + >>> +(ert-deftest use-package-test/:vc-5 () >>> + (let ((load-path? '(pred (apply-partially >>> + #'string=3D >>> + (expand-file-name "bar" user-emacs-directo= ry))))) >>> + (match-expansion >>> + (use-package foo :vc other-name :load-path "bar") >>> + `(progn (eval-and-compile >>> + (add-to-list 'load-path ,load-path?)) >>> + (use-package-vc-install '(other-name) ,load-path?))))) >>> + >>> +(ert-deftest use-package-test-normalize/:vc () >>> + (should (equal '(foo "version-string") >>> + (use-package-normalize/:vc 'foo :vc '("version-string= ")))) >>> + (should (equal '(bar "version-string") >>> + (use-package-normalize/:vc 'foo :vc '((bar . "version= -string"))))) >>> + (should (equal '(foo (:url "bar") "baz") >>> + (use-package-normalize/:vc 'foo :vc '((:url "bar" :re= v "baz"))))) >>> + (should (equal '(foo) >>> + (use-package-normalize/:vc 'foo :vc '(t)))) >>> + (should (equal '(foo) >>> + (use-package-normalize/:vc 'foo :vc nil))) >>> + (should (equal '(bar) >>> + (use-package-normalize/:vc 'foo :vc '(bar))))) >> >> On my machine, these tests appear to fail? Also, it would probably be >> useful to document them (at leat the ...-1 to ...-5 ones) so that a >> failure can be more easily understood. > > They don't fail for me=E2=80=94maybe I'm running the tests wrong? So far,= I've > done so interactively by evaluating the whole buffer and then running > `M-x ert'. The -1=E2=80=A6-5 tests just test the macro expansion, so e.g. > > (ert-deftest use-package-test/:vc-1 () > (match-expansion > (use-package foo :vc (:url "bar")) > '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) > > would test if the first argument to `match-expansion' actually expands > into the second one or not (which I guess explains why the error > messages are a bit hard to understand).=20=20=20 But that isn't the case, or am I mistaken? The use-package form expands to a lot mroe than just (use-package-vc-install ...)? >>> It accepts the same arguments as >>> +@code{package-vc-selected-packages} (@pxref{Specifying Package >>> +Sources,,, emacs, GNU Emacs Manual}), except that a name need not >> >> This link does not appear to work. I believe you can only link to a >> node, and this is just a section. Also, referring to the variable has >> become an unnecessary redirection, since the variable documentation now >> refers to the manual. > > Oh, I see. I have to admit that info links are still a bit of a mystery > to me; sorry. So should I just link to the closest node, which would be > "Fetching Package Sources" again, here? You should be able to test this yourself by compiling Emacs and then opening the manual to see how it was compiled. >>> +For example, >>> + >>> +@lisp >>> +@group >>> +(use-package foo >>> + :vc (:url "https://bar.com/foo" :rev :head)) >>> +@end group >>> +@end lisp >> >> I think it would make sense to use the same examples as the Emacs manual >> has been updated to use (BBDB) so that users can directly try out the >> code. > > Sorry, I'm not sure I follow: the same examples as what exactly? Or do > you just mean an actual package that users could try out when executing > this code, instead of a dummy one? Sorry, I should have been more explicit here. I am referring to the changes in 6e6e8b5c974202d2691c1971be66c1cb3788b7c1, where we moved some of the documentation from package-vc.el to the Emacs manual. Part of the change included the addition of some package specification examples, that I think would be a good fit here as well. >>> +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: >>> + >>> +@lisp >>> +@group >>> +(use-package foo >>> + :vc t >>> + :load-path "/path/to/foo/) >>> +@end group >>> +@end lisp >>> + >>> +The above dispatches to @code{package-vc-install-from-checkout} >>> +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). >> >> Does this reference here really help? > > Perhaps not. I don't have any strong opinions about this, so if you > prefer I can remove this. I think it would read better. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Apr 2023 12:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168233983017051 (code B ref 60418); Mon, 24 Apr 2023 12:38:02 +0000 Received: (at 60418) by debbugs.gnu.org; 24 Apr 2023 12:37:10 +0000 Received: from localhost ([127.0.0.1]:47783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqvRO-0004Qw-59 for submit@debbugs.gnu.org; Mon, 24 Apr 2023 08:37:10 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:38988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqvRM-0004QX-A7 for 60418@debbugs.gnu.org; Mon, 24 Apr 2023 08:37:09 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Q4l4r1tYCz9t6f; Mon, 24 Apr 2023 14:37:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1682339820; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m4pUzwvL5986/wVNK1fguEROrfKLerilxPDD/wmF+M8=; b=oFMm1IfDXrhcLY+pYKOoHjHEv9KmK217BWlQuljKjJo0UQoYXZB/s3YyEZtfSG1fY/WdEi vlGjet0CLKsn5gzbEurpgABsIt8cAJwUXnqaLwGkeL+eN6HhuyrRVhPFskccERtPxonv4m /CY7HVNxFI7gclPevXl3zw1HuIHxRUP2uqmIPUy426T6KWqTzjRlldp1V3ghMoFHyvCnrI HKtwALtEyoe2UKiOLhGsM1uNWAEwpgXQlUInifWxYxcexHGdz9HOeyNg6jCWBmrtVywVj8 hX/wyLberiOAIh5/mY68AJzmzVdi8rNXoDreweAhnJnDNq359ycpI0gny1mOPQ== From: Tony Zorman In-Reply-To: <87bkje93ou.fsf@posteo.net> References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> Date: Mon, 24 Apr 2023 14:36:57 +0200 Message-ID: <87y1mhihhy.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-ID: 1581c334dbc0bc0beba X-MBO-RS-META: smc68fizm58p4i8nyd84w7fu6aui3edq X-Spam-Score: -0.7 (/) 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.7 (-) On Sun, Apr 23 2023 12:35, Philip Kaludercic wrote: > Tony Zorman writes: > >> On Sat, Apr 22 2023 11:32, Philip Kaludercic wrote: >>> (Sorry for all the back and forth, I hope you understand that this is >>> just to get stuff right and not for my own sake of being pedantic. If >>> you don't have the time, I can also make the changes I'd just like to >>> hear your opinions.) >> >> No, I totally get it. Getting this stuff right the first time is much >> easier than going back and trying to fix it afterwards. > > OK, great. I just didn't want to make this seem like a ritual GNU thing = ^^. Well, maybe a little bit of that as well :) >>> On my machine, these tests appear to fail? Also, it would probably be >>> useful to document them (at leat the ...-1 to ...-5 ones) so that a >>> failure can be more easily understood. >> >> They don't fail for me=E2=80=94maybe I'm running the tests wrong? So far= , I've >> done so interactively by evaluating the whole buffer and then running >> `M-x ert'. The -1=E2=80=A6-5 tests just test the macro expansion, so e.g. >> >> (ert-deftest use-package-test/:vc-1 () >> (match-expansion >> (use-package foo :vc (:url "bar")) >> '(use-package-vc-install '(foo (:url "bar") :last-release) nil))) >> >> would test if the first argument to `match-expansion' actually expands >> into the second one or not (which I guess explains why the error >> messages are a bit hard to understand).=20=20=20 > > But that isn't the case, or am I mistaken? The use-package form expands > to a lot mroe than just (use-package-vc-install ...)? I think a combination of 'use-package-expand-minimally' and 'macroexpand-1' does shrink it down to essentially just that. Oh, but while writing this I think I found the issue=E2=80=94global variabl= es, as always. I have 'use-package-always-ensure' and 'use-package-always-defer' set, which obviously influences macro expansion. The bottom line is that most examples need an extra '(require 'foo nil nil)' added, nothing too major. I'll fix that, thanks for helping me figure it out! --=20 Tony Zorman | https://tony-zorman.com/ From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 May 2023 19:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168297021615935 (code B ref 60418); Mon, 01 May 2023 19:44:01 +0000 Received: (at 60418) by debbugs.gnu.org; 1 May 2023 19:43:36 +0000 Received: from localhost ([127.0.0.1]:41090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptZQt-00048w-Fs for submit@debbugs.gnu.org; Mon, 01 May 2023 15:43:36 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:55734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptZQq-00048f-7S for 60418@debbugs.gnu.org; Mon, 01 May 2023 15:43:33 -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 ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Q9DCc22sKz9srJ; Mon, 1 May 2023 21:43:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1682970204; 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=43kq2d+iVJhLXQHQRHoKdl+2gDK9kT7rCcYZCz8tWNQ=; b=HQZ2AVrecz8fxEP//RMWhF2cCvANJjdyoegMdpvqsHmJm55c4DRsTJHVG1poOpK43bTmEP wvLi651at1ZSM/gAXBS0LGXOvliFo7T9S5mfHLkS8EnBnQ8gOQX3TVymkJtUKBxcWmmvXI HKr/i0LW2c8UvIgpEM6fFJSKr5LQSZ0gJ80O9kR908jty9R9kkQyk2/OI/C7M3GX23zta4 wXOW8/DMYpeVPEAgzk7f6gdfth5DuJsjQ+52PyhRA/NbLX2m4bhrCZ+OXUDFf7gPdXkKKu ZWC1R4O5ZoMJsbli+EM8Rqmt6kjzXRUda6JX4j2lY4qEOxPKZszJn25RKbxc0g== From: Tony Zorman In-Reply-To: <87y1mhihhy.fsf@hyperspace> References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> Date: Mon, 01 May 2023 21:43:22 +0200 Message-ID: <87ildbet2d.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: s3u1sidybzhmnz8zc17synuehttapbym X-MBO-RS-ID: e6afe7f105231f05488 X-Spam-Score: -0.7 (/) 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.7 (-) --=-=-= Content-Type: text/plain Hi, attached are the updated patches; sorry that this took so long. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-vc-keyword-to-use-package.patch >From 2b5f99fcaec6c8f985c60ed3ff5e119a7fb58e39 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 11:05:04 +0100 Subject: [PATCH 1/2] Add :vc keyword to use-package * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. (use-package-handler/:load-path): Insert 'load-path' into 'state'. (use-package-vc-install): Install the package with package-vc.el. (use-package-handler/:vc): Handler for the :vc keyword. (use-package-normalize--vc-arg): Normalization for more complex arguments to 'use-package-normalize/:vc', in order to make them compatible with the specification of 'package-vc-selected-packages'. (use-package-normalize/:vc): Normalizer for the :vc keyword. (use-package): Document :vc. * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): Do not ensure a package when :vc is used in the declaration. * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): (use-package-test/:vc-2): (use-package-test/:vc-3): (use-package-test/:vc-4): (use-package-test/:vc-5): (use-package-test-normalize/:vc): Add tests for :vc. --- lisp/use-package/use-package-core.el | 111 ++++++++++++++++++++- lisp/use-package/use-package-ensure.el | 3 +- test/lisp/use-package/use-package-tests.el | 54 ++++++++++ 3 files changed, 165 insertions(+), 3 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 7ab5bdc276..e7e7ecc710 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -76,6 +76,7 @@ use-package-keywords :functions :preface :if :when :unless + :vc :no-require :catch :after @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path #'use-package-normalize-paths)) (defun use-package-handler/:load-path (name _keyword arg rest state) - (let ((body (use-package-process-keywords name rest state))) + (let ((body (use-package-process-keywords name rest + (plist-put state :load-path arg)))) (use-package-concat (mapcar #'(lambda (path) `(eval-and-compile (add-to-list 'load-path ,path))) @@ -1577,6 +1579,109 @@ use-package-handler/:config (when use-package-compute-statistics `((use-package-statistics-gather :config ',name t)))))) +;;;; :vc + +(defun use-package-vc-install (arg &optional local-path) + "Install a package with `package-vc.el'. +ARG is a list of the form (NAME OPTIONS REVISION), as returned by +`use-package-normalize--vc-arg'. If LOCAL-PATH is non-nil, call +`package-vc-install-from-checkout'; otherwise, indicating a +remote host, call `package-vc-install' instead." + (pcase-let* ((`(,name ,opts ,rev) arg) + (spec (if opts (cons name opts) name))) + (unless (package-installed-p name) + (if local-path + (package-vc-install-from-checkout local-path (symbol-name name)) + (package-vc-install spec rev))))) + +(defun use-package-handler/:vc (name _keyword arg rest state) + "Generate code to install package NAME, or do so directly. +When the use-package declaration is part of a byte-compiled file, +install the package during compilation; otherwise, add it to the +macro expansion and wait until runtime. The remaining arguments +are as follows: + +_KEYWORD is ignored. + +ARG is the normalized input to the `:vc' keyword, as returned by +the `use-package-normalize/:vc' function. + +REST is a plist of other (following) keywords and their +arguments, each having already been normalised by the respective +function. + +STATE is a plist of any state that keywords processed before +`:vc' (see `use-package-keywords') may have accumulated. + +Also see the Info node `(use-package) Creating an extension'." + (let ((body (use-package-process-keywords name rest state)) + (local-path (car (plist-get state :load-path)))) + ;; See `use-package-handler/:ensure' for an explanation. + (if (bound-and-true-p byte-compile-current-file) + (funcall #'use-package-vc-install arg local-path) ; compile time + (push `(use-package-vc-install ',arg ,local-path) body)))) ; runtime + +(defun use-package-normalize--vc-arg (arg) + "Normalize possible arguments to the `:vc' keyword. +ARG is a cons-cell of approximately the form that +`package-vc-selected-packages' accepts, plus an additional `:rev' +keyword. If `:rev' is not given, it defaults to `:last-release'. + +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant +with `package-vc-selected-packages' and REV is a (possibly nil, +indicating the latest commit) revision." + (cl-flet* ((mk-string (s) + (if (and s (stringp s)) s (symbol-name s))) + (mk-sym (s) + (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 (mk-string v)))) + (:vc-backend (mk-sym v)) + (_ (mk-string v))))) + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) + (`(,name . ,opts) arg)) + (if (stringp opts) ; (NAME . VERSION-STRING) ? + (list name opts) + ;; Error handling + (cl-loop for (k _) on opts by #'cddr + if (not (member k valid-kws)) + do (use-package-error + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" + k valid-kws))) + ;; Actual normalization + (list name + (cl-loop for (k v) on opts by #'cddr + if (not (eq k :rev)) + nconc (list k (normalize k v))) + (normalize :rev (plist-get opts :rev))))))) + +(defun use-package-normalize/:vc (name _keyword args) + "Normalize possible arguments to the `:vc' keyword. +NAME is the name of the `use-package' declaration, _KEYWORD is +ignored, and ARGS it a list of arguments given to the `:vc' +keyword, the cdr of which is ignored. + +See `use-package-normalize--vc-arg' for most of the actual +normalization work. Also see the Info +node `(use-package) Creating an extension'." + (let ((arg (car args))) + (pcase arg + ((or 'nil 't) (list name)) ; guess name + ((pred symbolp) (list arg)) ; use this name + ((pred stringp) (list name arg)) ; version string + guess name + ((pred plistp) ; plist + guess name + (use-package-normalize--vc-arg (cons name arg))) + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name + (pred stringp))) + (use-package-normalize--vc-arg arg)) + (_ (use-package-error "Unrecognised argument to :vc.\ + The keyword wants an argument of nil, t, a name of a package,\ + or a cons-cell as accepted by `package-vc-selected-packages', where \ + the accepted plist is augmented by a `:rev' keyword."))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; The main macro @@ -1666,7 +1771,9 @@ use-package (compare with `custom-set-variables'). :custom-face Call `custom-set-faces' with each face definition. :ensure Loads the package using package.el if necessary. -:pin Pin the package to an archive." +:pin Pin the package to an archive. +:vc Install the package directly from a version control system + (using `package-vc.el')." (declare (indent defun)) (unless (memq :disabled args) (macroexp-progn diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/use-package-ensure.el index e0ea982594..395a0bbda0 100644 --- a/lisp/use-package/use-package-ensure.el +++ b/lisp/use-package/use-package-ensure.el @@ -182,7 +182,8 @@ use-package-ensure-elpa ;;;###autoload (defun use-package-handler/:ensure (name _keyword ensure rest state) - (let* ((body (use-package-process-keywords name rest state))) + (let* ((body (use-package-process-keywords name rest state)) + (ensure (and (not (plist-member rest :vc)) ensure))) ;; We want to avoid installing packages when the `use-package' macro is ;; being macro-expanded by elisp completion (see `lisp--local-variables'), ;; but still install packages when byte-compiling, to avoid requiring diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index 6374a0d103..c8c20fc51c 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -1951,6 +1951,60 @@ bind-key/845 (should (eq (nth 1 binding) 'ignore)) (should (eq (nth 2 binding) nil)))) +(ert-deftest use-package-test/:vc-1 () + (match-expansion + (use-package foo :vc (:url "bar")) + '(progn (use-package-vc-install '(foo (:url "bar") :last-release) nil) + (require 'foo nil nil)))) + +(ert-deftest use-package-test/:vc-2 () + (match-expansion + (use-package foo + :vc (baz . (:url "baz" :vc-backend "Git" + :main-file qux.el :rev "rev-string"))) + '(progn (use-package-vc-install '(baz + (:url "baz" :vc-backend Git :main-file "qux.el") + "rev-string") + nil) + (require 'foo nil nil)))) + +(ert-deftest use-package-test/:vc-3 () + (match-expansion + (use-package foo :vc (bar . "baz")) + '(progn (use-package-vc-install '(bar "baz") nil) + (require 'foo nil nil)))) + +(ert-deftest use-package-test/:vc-4 () + (match-expansion + (use-package foo :vc (bar . (:url "baz" :rev :newest))) + '(progn (use-package-vc-install '(bar (:url "baz") nil) nil) + (require 'foo nil nil)))) + +(ert-deftest use-package-test/:vc-5 () + (let ((load-path? '(pred (apply-partially + #'string= + (expand-file-name "bar" user-emacs-directory))))) + (match-expansion + (use-package foo :vc other-name :load-path "bar") + `(progn (eval-and-compile + (add-to-list 'load-path ,load-path?)) + (use-package-vc-install '(other-name) ,load-path?) + (require 'foo nil nil))))) + +(ert-deftest use-package-test-normalize/:vc () + (should (equal '(foo "version-string") + (use-package-normalize/:vc 'foo :vc '("version-string")))) + (should (equal '(bar "version-string") + (use-package-normalize/:vc 'foo :vc '((bar . "version-string"))))) + (should (equal '(foo (:url "bar") "baz") + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev "baz"))))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc '(t)))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc nil))) + (should (equal '(bar) + (use-package-normalize/:vc 'foo :vc '(bar))))) + ;; Local Variables: ;; no-byte-compile: t ;; no-update-autoloads: t -- 2.40.1 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-Document-use-package-s-vc-keyword.patch >From fba961176cd6ffb9998413f25956f7f6e044e064 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 12:23:56 +0100 Subject: [PATCH 2/2] ; Document use-package's :vc keyword * doc/misc/use-package.texi (Installing packages): (Install package): Add documentation for :vc and link to the related chapter in the Emacs manual. * etc/NEWS: Mention :vc keyword --- doc/misc/use-package.texi | 50 +++++++++++++++++++++++++++++++++++++-- etc/NEWS | 13 ++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index 87105c4db0..d75cb67e08 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi @@ -1554,8 +1554,11 @@ Installing packages (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The @code{use-package} macro provides the @code{:ensure} and @code{:pin} keywords that interface with that package manager to automatically -install packages. This is particularly useful if you use your init -file on more than one system. +install packages. The @code{:vc} keyword may be used to control how +package sources are downloaded; e.g., from remote hosts +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). This +is particularly useful if you use your init file on more than one +system. @menu * Install package:: @@ -1607,6 +1610,49 @@ Install package You can override the above setting for a single package by adding @w{@code{:ensure nil}} to its declaration. +@findex :vc +The @code{:vc} keyword can be used to control how packages are +downloaded and/or installed. More specifically, it allows one to fetch +and update packages directly from a version control system. This is +especially convenient when wanting to install a package that is not on +any package archive. + +The keyword accepts the same arguments as specified in +@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}, except +that a name need not explicitly be given: it is inferred from the +declaration. The accepted property list is augmented by a @code{:rev} +keyword, which has the same shape as the @code{REV} argument to +@code{package-vc-install}. Notably -- even when not specified -- +@code{:rev} defaults to checking out the last release of the package. +You can use @code{:rev :newest} to check out the latest commit. + +For example, + +@example +@group +(use-package bbdb + :vc (:url "https://git.savannah.nongnu.org/git/bbdb.git" + :rev :newest)) +@end group +@end example + +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: + +@example +@group +;; Use a local copy of BBDB instead of the one from GNU ELPA. +(use-package bbdb + :vc t + :load-path "/path/to/bbdb/dir/") +@end group +@end example + +The above dispatches to @code{package-vc-install-from-checkout}. + @node Pinning packages @section Pinning packages using @code{:pin} @cindex installing package from specific archive diff --git a/etc/NEWS b/etc/NEWS index b989f80f3c..20f6751121 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -322,6 +322,19 @@ instead of: and another_expression): do_something() +** use-package + ++++ +*** New ':vc' keyword. +This keyword enables the user to control how packages are fetched by +utilising 'package-vc.el'. By default, it relays its arguments to +'package-vc-install', but -- when combined with the ':load-path' +keyword -- it can also call upon 'package-vc-install-from-checkout' +instead. If no revision is given via the ':rev' argument, use-package +falls back to the last release (via 'package-vc-install's +':last-release' argument). To check out the last commit, use ':rev +:newest'. + * New Modes and Packages in Emacs 30.1 -- 2.40.1 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 May 2023 20:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168297129318759 (code B ref 60418); Mon, 01 May 2023 20:02:02 +0000 Received: (at 60418) by debbugs.gnu.org; 1 May 2023 20:01:33 +0000 Received: from localhost ([127.0.0.1]:41127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptZiG-0004sU-4N for submit@debbugs.gnu.org; Mon, 01 May 2023 16:01:33 -0400 Received: from mout02.posteo.de ([185.67.36.66]:55615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptZiC-0004sB-4i for 60418@debbugs.gnu.org; Mon, 01 May 2023 16:01:30 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2811A240170 for <60418@debbugs.gnu.org>; Mon, 1 May 2023 22:01:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682971282; bh=/CRshZAJvONKsqucddMk42V+QS1TQap5vyGpxYuXWxQ=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=BChtX0rwlR3hGXysXMEJP3s1d9upIn3/ZIBY/zP7MyA8MTh+Fx/0+ixnXhKXpfMI3 ffsZhlHufJo8IpAXyA5POT1p7zxZcLPLZdB5uaeQwQVXBZ8QFJB1W14wIphp2bNYZQ vEp2wGk+KS63F7nm9wCg+SaI2ndgiDrp3trCTn5M7IPNnv290NwTyhC+16WQt7dJKt Chc4IEuzd58g1to/nAfU86FD+ez8k7XpZGpGOywERkOSnJhib/W6mJTfjmNXNJrbkP Q8Z80+DdrivZh6shjuzqBODaa8QEhvrvOtN6Iav7QL1nGOYyDd/Lm8Ios1zknSBihI +leFzpIX3RMzQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q9DcK2k8lz9rxM; Mon, 1 May 2023 22:01:21 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87ildbet2d.fsf@hyperspace> (Tony Zorman's message of "Mon, 01 May 2023 21:43:22 +0200") References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.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 Date: Mon, 01 May 2023 20:01:54 +0000 Message-ID: <87a5ynizwt.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, > > attached are the updated patches; sorry that this took so long. No need to worry about that. > From 2b5f99fcaec6c8f985c60ed3ff5e119a7fb58e39 Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Thu, 29 Dec 2022 11:05:04 +0100 > Subject: [PATCH 1/2] Add :vc keyword to use-package > > * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. > (use-package-handler/:load-path): Insert 'load-path' into 'state'. > (use-package-vc-install): Install the package with package-vc.el. > (use-package-handler/:vc): Handler for the :vc keyword. > (use-package-normalize--vc-arg): Normalization for more complex > arguments to 'use-package-normalize/:vc', in order to make them > compatible with the specification of 'package-vc-selected-packages'. > (use-package-normalize/:vc): Normalizer for the :vc keyword. > (use-package): Document :vc. > > * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): > Do not ensure a package when :vc is used in the declaration. > > * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): > (use-package-test/:vc-2): > (use-package-test/:vc-3): > (use-package-test/:vc-4): > (use-package-test/:vc-5): > (use-package-test-normalize/:vc): > Add tests for :vc. > --- > lisp/use-package/use-package-core.el | 111 ++++++++++++++++++++- > lisp/use-package/use-package-ensure.el | 3 +- > test/lisp/use-package/use-package-tests.el | 54 ++++++++++ > 3 files changed, 165 insertions(+), 3 deletions(-) > > diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el > index 7ab5bdc276..e7e7ecc710 100644 > --- a/lisp/use-package/use-package-core.el > +++ b/lisp/use-package/use-package-core.el > @@ -76,6 +76,7 @@ use-package-keywords > :functions > :preface > :if :when :unless > + :vc > :no-require > :catch > :after > @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path > #'use-package-normalize-paths)) > > (defun use-package-handler/:load-path (name _keyword arg rest state) > - (let ((body (use-package-process-keywords name rest state))) > + (let ((body (use-package-process-keywords name rest > + (plist-put state :load-path arg)))) > (use-package-concat > (mapcar #'(lambda (path) > `(eval-and-compile (add-to-list 'load-path ,path))) > @@ -1577,6 +1579,109 @@ use-package-handler/:config > (when use-package-compute-statistics > `((use-package-statistics-gather :config ',name t)))))) > > +;;;; :vc > + > +(defun use-package-vc-install (arg &optional local-path) > + "Install a package with `package-vc.el'. > +ARG is a list of the form (NAME OPTIONS REVISION), as returned by > +`use-package-normalize--vc-arg'. If LOCAL-PATH is non-nil, call > +`package-vc-install-from-checkout'; otherwise, indicating a > +remote host, call `package-vc-install' instead." > + (pcase-let* ((`(,name ,opts ,rev) arg) > + (spec (if opts (cons name opts) name))) > + (unless (package-installed-p name) > + (if local-path > + (package-vc-install-from-checkout local-path (symbol-name name)) > + (package-vc-install spec rev))))) > + > +(defun use-package-handler/:vc (name _keyword arg rest state) > + "Generate code to install package NAME, or do so directly. > +When the use-package declaration is part of a byte-compiled file, > +install the package during compilation; otherwise, add it to the > +macro expansion and wait until runtime. The remaining arguments > +are as follows: > + > +_KEYWORD is ignored. I think we can remove this, the argument is explicitly marked as unused. > +ARG is the normalized input to the `:vc' keyword, as returned by > +the `use-package-normalize/:vc' function. > + > +REST is a plist of other (following) keywords and their > +arguments, each having already been normalised by the respective > +function. > + > +STATE is a plist of any state that keywords processed before > +`:vc' (see `use-package-keywords') may have accumulated. > + > +Also see the Info node `(use-package) Creating an extension'." > + (let ((body (use-package-process-keywords name rest state)) > + (local-path (car (plist-get state :load-path)))) > + ;; See `use-package-handler/:ensure' for an explanation. > + (if (bound-and-true-p byte-compile-current-file) > + (funcall #'use-package-vc-install arg local-path) ; compile time > + (push `(use-package-vc-install ',arg ,local-path) body)))) ; runtime > + > +(defun use-package-normalize--vc-arg (arg) > + "Normalize possible arguments to the `:vc' keyword. > +ARG is a cons-cell of approximately the form that > +`package-vc-selected-packages' accepts, plus an additional `:rev' > +keyword. If `:rev' is not given, it defaults to `:last-release'. > + > +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant > +with `package-vc-selected-packages' and REV is a (possibly nil, > +indicating the latest commit) revision." > + (cl-flet* ((mk-string (s) > + (if (and s (stringp s)) s (symbol-name s))) > + (mk-sym (s) > + (if (and s (stringp s)) (intern s) s)) > + (normalize (k v) It seems there is inconsistent spacing here. > + (pcase k > + (:rev (cond ((or (eq v :last-release) (not v)) :last-release) > + ((eq v :newest) nil) > + (t (mk-string v)))) > + (:vc-backend (mk-sym v)) > + (_ (mk-string v))))) > + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) > + (`(,name . ,opts) arg)) > + (if (stringp opts) ; (NAME . VERSION-STRING) ? > + (list name opts) > + ;; Error handling > + (cl-loop for (k _) on opts by #'cddr > + if (not (member k valid-kws)) > + do (use-package-error > + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" > + k valid-kws))) > + ;; Actual normalization > + (list name > + (cl-loop for (k v) on opts by #'cddr > + if (not (eq k :rev)) > + nconc (list k (normalize k v))) > + (normalize :rev (plist-get opts :rev))))))) > + > +(defun use-package-normalize/:vc (name _keyword args) > + "Normalize possible arguments to the `:vc' keyword. > +NAME is the name of the `use-package' declaration, _KEYWORD is > +ignored, and ARGS it a list of arguments given to the `:vc' > +keyword, the cdr of which is ignored. > + > +See `use-package-normalize--vc-arg' for most of the actual > +normalization work. Also see the Info > +node `(use-package) Creating an extension'." > + (let ((arg (car args))) > + (pcase arg > + ((or 'nil 't) (list name)) ; guess name > + ((pred symbolp) (list arg)) ; use this name > + ((pred stringp) (list name arg)) ; version string + guess name > + ((pred plistp) ; plist + guess name > + (use-package-normalize--vc-arg (cons name arg))) > + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name > + (pred stringp))) > + (use-package-normalize--vc-arg arg)) > + (_ (use-package-error "Unrecognised argument to :vc.\ > + The keyword wants an argument of nil, t, a name of a package,\ > + or a cons-cell as accepted by `package-vc-selected-packages', where \ > + the accepted plist is augmented by a `:rev' keyword."))))) > + > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > ;; > ;;; The main macro > @@ -1666,7 +1771,9 @@ use-package > (compare with `custom-set-variables'). > :custom-face Call `custom-set-faces' with each face definition. > :ensure Loads the package using package.el if necessary. > -:pin Pin the package to an archive." > +:pin Pin the package to an archive. > +:vc Install the package directly from a version control system > + (using `package-vc.el')." > (declare (indent defun)) > (unless (memq :disabled args) > (macroexp-progn > diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/use-package-ensure.el > index e0ea982594..395a0bbda0 100644 > --- a/lisp/use-package/use-package-ensure.el > +++ b/lisp/use-package/use-package-ensure.el > @@ -182,7 +182,8 @@ use-package-ensure-elpa > > ;;;###autoload > (defun use-package-handler/:ensure (name _keyword ensure rest state) > - (let* ((body (use-package-process-keywords name rest state))) > + (let* ((body (use-package-process-keywords name rest state)) > + (ensure (and (not (plist-member rest :vc)) ensure))) > ;; We want to avoid installing packages when the `use-package' macro is > ;; being macro-expanded by elisp completion (see `lisp--local-variables'), > ;; but still install packages when byte-compiling, to avoid requiring > diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el > index 6374a0d103..c8c20fc51c 100644 > --- a/test/lisp/use-package/use-package-tests.el > +++ b/test/lisp/use-package/use-package-tests.el > @@ -1951,6 +1951,60 @@ bind-key/845 > (should (eq (nth 1 binding) 'ignore)) > (should (eq (nth 2 binding) nil)))) > > +(ert-deftest use-package-test/:vc-1 () > + (match-expansion > + (use-package foo :vc (:url "bar")) > + '(progn (use-package-vc-install '(foo (:url "bar") :last-release) nil) > + (require 'foo nil nil)))) > + > +(ert-deftest use-package-test/:vc-2 () > + (match-expansion > + (use-package foo > + :vc (baz . (:url "baz" :vc-backend "Git" > + :main-file qux.el :rev "rev-string"))) > + '(progn (use-package-vc-install '(baz > + (:url "baz" :vc-backend Git :main-file "qux.el") > + "rev-string") > + nil) > + (require 'foo nil nil)))) > + > +(ert-deftest use-package-test/:vc-3 () > + (match-expansion > + (use-package foo :vc (bar . "baz")) > + '(progn (use-package-vc-install '(bar "baz") nil) > + (require 'foo nil nil)))) > + > +(ert-deftest use-package-test/:vc-4 () > + (match-expansion > + (use-package foo :vc (bar . (:url "baz" :rev :newest))) > + '(progn (use-package-vc-install '(bar (:url "baz") nil) nil) > + (require 'foo nil nil)))) > + > +(ert-deftest use-package-test/:vc-5 () > + (let ((load-path? '(pred (apply-partially > + #'string= > + (expand-file-name "bar" user-emacs-directory))))) > + (match-expansion > + (use-package foo :vc other-name :load-path "bar") > + `(progn (eval-and-compile > + (add-to-list 'load-path ,load-path?)) > + (use-package-vc-install '(other-name) ,load-path?) > + (require 'foo nil nil))))) > + > +(ert-deftest use-package-test-normalize/:vc () > + (should (equal '(foo "version-string") > + (use-package-normalize/:vc 'foo :vc '("version-string")))) > + (should (equal '(bar "version-string") > + (use-package-normalize/:vc 'foo :vc '((bar . "version-string"))))) > + (should (equal '(foo (:url "bar") "baz") > + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev "baz"))))) > + (should (equal '(foo) > + (use-package-normalize/:vc 'foo :vc '(t)))) > + (should (equal '(foo) > + (use-package-normalize/:vc 'foo :vc nil))) > + (should (equal '(bar) > + (use-package-normalize/:vc 'foo :vc '(bar))))) > + > ;; Local Variables: > ;; no-byte-compile: t > ;; no-update-autoloads: t > -- > 2.40.1 > > From fba961176cd6ffb9998413f25956f7f6e044e064 Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Thu, 29 Dec 2022 12:23:56 +0100 > Subject: [PATCH 2/2] ; Document use-package's :vc keyword > > * doc/misc/use-package.texi (Installing packages): > (Install package): > Add documentation for :vc and link to the related chapter in the Emacs > manual. > > * etc/NEWS: Mention :vc keyword > --- > doc/misc/use-package.texi | 50 +++++++++++++++++++++++++++++++++++++-- > etc/NEWS | 13 ++++++++++ > 2 files changed, 61 insertions(+), 2 deletions(-) > > diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi > index 87105c4db0..d75cb67e08 100644 > --- a/doc/misc/use-package.texi > +++ b/doc/misc/use-package.texi > @@ -1554,8 +1554,11 @@ Installing packages > (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The > @code{use-package} macro provides the @code{:ensure} and @code{:pin} > keywords that interface with that package manager to automatically > -install packages. This is particularly useful if you use your init > -file on more than one system. > +install packages. The @code{:vc} keyword may be used to control how > +package sources are downloaded; e.g., from remote hosts > +(@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}). This > +is particularly useful if you use your init file on more than one > +system. > > @menu > * Install package:: > @@ -1607,6 +1610,49 @@ Install package > You can override the above setting for a single package by adding > @w{@code{:ensure nil}} to its declaration. > > +@findex :vc > +The @code{:vc} keyword can be used to control how packages are > +downloaded and/or installed. More specifically, it allows one to fetch > +and update packages directly from a version control system. This is > +especially convenient when wanting to install a package that is not on > +any package archive. > > +The keyword accepts the same arguments as specified in > +@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}, except > +that a name need not explicitly be given: it is inferred from the > +declaration. The accepted property list is augmented by a @code{:rev} > +keyword, which has the same shape as the @code{REV} argument to > +@code{package-vc-install}. Notably -- even when not specified -- > +@code{:rev} defaults to checking out the last release of the package. > +You can use @code{:rev :newest} to check out the latest commit. > + > +For example, > + > +@example > +@group > +(use-package bbdb > + :vc (:url "https://git.savannah.nongnu.org/git/bbdb.git" > + :rev :newest)) > +@end group > +@end example > + > +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: > + > +@example > +@group > +;; Use a local copy of BBDB instead of the one from GNU ELPA. > +(use-package bbdb > + :vc t > + :load-path "/path/to/bbdb/dir/") > +@end group > +@end example > + > +The above dispatches to @code{package-vc-install-from-checkout}. > + > @node Pinning packages > @section Pinning packages using @code{:pin} > @cindex installing package from specific archive > diff --git a/etc/NEWS b/etc/NEWS > index b989f80f3c..20f6751121 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -322,6 +322,19 @@ instead of: > and another_expression): > do_something() > > +** use-package > + > ++++ > +*** New ':vc' keyword. > +This keyword enables the user to control how packages are fetched by > +utilising 'package-vc.el'. By default, it relays its arguments to I would not add the .el at the end. > +'package-vc-install', but -- when combined with the ':load-path' > +keyword -- it can also call upon 'package-vc-install-from-checkout' > +instead. If no revision is given via the ':rev' argument, use-package > +falls back to the last release (via 'package-vc-install's > +':last-release' argument). To check out the last commit, use ':rev > +:newest'. I feel like this is too much information for the NEWS file, the first sentence should be enough. If you want to, I can make all these changes in your patch if you ack them. I'll try and test the code in the coming days to see if it all works, and with John's and Eli's blessing will apply them to master. > > * New Modes and Packages in Emacs 30.1 > > -- > 2.40.1 From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 May 2023 12:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16830311997169 (code B ref 60418); Tue, 02 May 2023 12:40:01 +0000 Received: (at 60418) by debbugs.gnu.org; 2 May 2023 12:39:59 +0000 Received: from localhost ([127.0.0.1]:41903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptpIU-0001rY-Co for submit@debbugs.gnu.org; Tue, 02 May 2023 08:39:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptpIQ-0001rF-ER for 60418@debbugs.gnu.org; Tue, 02 May 2023 08:39:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptpII-0004Li-8Y; Tue, 02 May 2023 08:39:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=H9IVhy+zLidGDxPBFRXsuNE5iklHpNbW9avijWhLXhM=; b=mnbIh85F7gu7 cykIYhGhGZpP6W/EhkjX6bF6EhxBrx8GFKhdGk3zl/vlgTBc7WhW1j+VTSbDfXDH13tuKsJ/AuymT moEsjuKTPK3DaB3/KmykAMvFfbrj3NkARJuI91Ssicf5WXw9XtEIWcrfnVsGVLcbDif58bQtgLRpA zj7Azkb0rIkN7miIM23tl+vbI7ddOTCCFmQghMkKMk/kz1WxJ8T3oR8K8g2R51ccktVR4fwUdK0TU NC6ZOXf9xSNnm8owGm7F8aEwgndoQCuA6F2KTnvUKuZRDsuY6VoR00m27KZCL2HYmZK8LG1yCsYWm 2SclK4ypBXW1b5+I5luAcg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptpI1-0003ac-Us; Tue, 02 May 2023 08:39:45 -0400 Date: Tue, 02 May 2023 15:40:14 +0300 Message-Id: <831qjyoqj5.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87ildbet2d.fsf@hyperspace> (message from Tony Zorman on Mon, 01 May 2023 21:43:22 +0200) References: <87zgb6uk2r.fsf@hyperspace> <87tu0tl1s4.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> 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 (---) > From: Tony Zorman > Cc: Eli Zaretskii , 60418@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com > Date: Mon, 01 May 2023 21:43:22 +0200 > > +@findex :vc > +The @code{:vc} keyword can be used to control how packages are > +downloaded and/or installed. More specifically, it allows one to fetch > +and update packages directly from a version control system. This is > +especially convenient when wanting to install a package that is not on > +any package archive. This paragraph uses just one space between sentences; please use two of them, per our conventions. > +The keyword accepts the same arguments as specified in > +@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}, except Please don't use @pxref this way: it only looks well in HTML output, but in all other outputs it looks awkward, if not incorrect. Instead, please use the more traditional and less "sexy" way: The keyword accepts the same form of specifications as @code{package-vc-install} (@pxref{Fetching Package Sources,,, emacs, GNU Emacs Manual}), except that... > +declaration. The accepted property list is augmented by a @code{:rev} > +keyword, which has the same shape as the @code{REV} argument to > +@code{package-vc-install}. Instead of @code{REV}, please use @var{rev}: @var markup and lower-case "rev". This is the markup suitable for formal arguments to functions in Texinfo sources. > +@code{package-vc-install}. Notably -- even when not specified -- > +@code{:rev} defaults to checking out the last release of the package. > +You can use @code{:rev :newest} to check out the latest commit. > + > +For example, > + > +@example > +@group > +(use-package bbdb > + :vc (:url "https://git.savannah.nongnu.org/git/bbdb.git" > + :rev :newest)) > +@end group > +@end example > + > +would try -- by invoking @code{package-vc-install} -- to install the > +latest commit of the package @code{foo} from the specified remote. ^^^ A typo there. Also, you say above "the latest release", but then "the latest commit". These two are not the same, and in fact I think talking about "release" here is misleading, since you actually mean "commit". For the same reason, I think the text should explain how to indicate a commit that is not the latest one, because that is also not self-evident, especially since the upstream VCS is not necessarily Git. > +*** New ':vc' keyword. "*** New keyword ':vc'." > +This keyword enables the user to control how packages are fetched by > +utilising 'package-vc.el'. By default, it relays its arguments to We use US English spelling: "utilizing". But I would actually suggest to say "using" instead: there's no need to use overly-complicated words when simpler ones will do. > +'package-vc-install', but -- when combined with the ':load-path' > +keyword -- it can also call upon 'package-vc-install-from-checkout' > +instead. If no revision is given via the ':rev' argument, use-package > +falls back to the last release (via 'package-vc-install's > +':last-release' argument). To check out the last commit, use ':rev > +:newest'. Here, again, you mix up "release", "revision", and "commit". It is always better to use consistent terminology, and in this case I think only "commit" is accurate. Thanks. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Ruijie Yu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 May 2023 13:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: 60418@debbugs.gnu.org, Philip Kaludercic , felician.nemeth@gmail.com, Eli Zaretskii , stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168303392212704 (code B ref 60418); Tue, 02 May 2023 13:26:02 +0000 Received: (at 60418) by debbugs.gnu.org; 2 May 2023 13:25:22 +0000 Received: from localhost ([127.0.0.1]:42006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptq0P-0003Iq-Th for submit@debbugs.gnu.org; Tue, 02 May 2023 09:25:22 -0400 Received: from netyu.xyz ([152.44.41.246]:36430 helo=mail.netyu.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptq0M-0003Ie-DD for 60418@debbugs.gnu.org; Tue, 02 May 2023 09:25:20 -0400 Received: from fw.net.yu.netyu.xyz ( [222.248.4.98]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 9f202f0c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 2 May 2023 13:25:17 +0000 (UTC) References: <87zgb6uk2r.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <87a5ynizwt.fsf@posteo.net> User-agent: mu4e 1.9.22; emacs 30.0.50 From: Ruijie Yu Date: Tue, 02 May 2023 21:18:22 +0800 In-reply-to: <87a5ynizwt.fsf@posteo.net> Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: 0.0 (/) Philip Kaludercic writes: > Tony Zorman writes: >> +** use-package >> + >> ++++ >> +*** New ':vc' keyword. >> +This keyword enables the user to control how packages are fetched by >> +utilising 'package-vc.el'. By default, it relays its arguments to If I'm not mistaken, don't we prefer quoting like `this' in Emacs? (Or maybe NEWS has a different style to which I'm not familiar.) If that is correct, then all quotings in the patch would need to be adjusted accordingly. -- Best, RY [Please note that this mail might go to spam due to some misconfiguration in my mail server -- still investigating.] From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 May 2023 14:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Ruijie Yu Cc: Philip Kaludercic , felician.nemeth@gmail.com, Tony Zorman , stefankangas@gmail.com, 60418@debbugs.gnu.org, Eli Zaretskii Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168303596919542 (code B ref 60418); Tue, 02 May 2023 14:00:01 +0000 Received: (at 60418) by debbugs.gnu.org; 2 May 2023 13:59:29 +0000 Received: from localhost ([127.0.0.1]:44753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptqXQ-000558-IS for submit@debbugs.gnu.org; Tue, 02 May 2023 09:59:28 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:62475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptqXO-00054t-IK for 60418@debbugs.gnu.org; Tue, 02 May 2023 09:59:27 -0400 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3f315712406so170628425e9.0 for <60418@debbugs.gnu.org>; Tue, 02 May 2023 06:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683035960; x=1685627960; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eP88J9edwnFtNPlxtYIkEw8kcUH5NjJPb6zvHfTK4SA=; b=MWPV7yGXNMwABYDP7a1OK4q1EEXz9YUv1GeSgFp148AeIpXlNW5YXKvdkIVmCZ8FNf +3Ju93wJ8CA+2D0oTd4/opQDMVX+jV0QUlM3CNjm+h5lFc/fGO/MBqkQImvHohUHDvSX UThH92vSPWzgCwfkn3OCXt9VOQVHBVBTJ7YHRH0K8orWKWFs8FdLdd3CI3WzAjXRxCXm F12LDFgpM0I2Bd1Zxu/hECpKu46JsUIWglpgVPNjUtM24oDZgvue1MMaFBSiG+bFmUZo XTnetVn338TDvOYHPOkFNnxBNwpKk8mPx/lbsjft1YXDKnj0fz4nNTz8GivxF7IuPvNy SLcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683035960; x=1685627960; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eP88J9edwnFtNPlxtYIkEw8kcUH5NjJPb6zvHfTK4SA=; b=Qe5Km3HZg2MgsDilVFrDh1seW1kiSYGMrXuOaGvLnCue8I4xIh/spAJTrrciUAgJ5Q dW1Izh8egExjTINR6unuFQgRAusf88LGgXCpjiAjW7W8tbdeIHIYIJoRNjK+46lRUFsW l8HiqqOriBfxV+nMObwC0LaS+7zlVeOzI8hAnwpS0Czh2IWYDGi2IUugr8aT2R1eKOCM vGJ056iC3tiSD43CGKG1CeAmXgaxzxBsIjWSHyKt7pzWaebqTWDGzCTlwLDLJ1JT5MdJ dHdpgV9c3EYK5gZ7skoDPHHgIXF7aPEdTnnNpKOlNK1jjqvQsNsg6xIHuPfriZfZIUVR FezA== X-Gm-Message-State: AC+VfDy/k1Rf9vKUcxILef6HfPfJD20XyPbXYanO1WJf6WFUhGTg04u3 dbN0hsTnghjyAjiN4mKpIg8= X-Google-Smtp-Source: ACHHUZ6fe/iPBNBKl+ywB/JFRR2x4mv5sIMfN+Ft3bnDna3wF2szRFcT4/fiXQS+fIMyF6annBiorw== X-Received: by 2002:a05:600c:190e:b0:3f1:96a8:3560 with SMTP id j14-20020a05600c190e00b003f196a83560mr15950946wmq.10.1683035960481; Tue, 02 May 2023 06:59:20 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id r6-20020a05600c458600b003f195d540d9sm31597843wmo.14.2023.05.02.06.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:59:19 -0700 (PDT) From: Robert Pluim In-Reply-To: (Ruijie Yu via's message of "Tue, 02 May 2023 21:18:22 +0800") References: <87zgb6uk2r.fsf@hyperspace> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <87a5ynizwt.fsf@posteo.net> Date: Tue, 02 May 2023 15:59:19 +0200 Message-ID: <878re6zvew.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, 02 May 2023 21:18:22 +0800, Ruijie Yu via "Bug reports for GN= U Emacs, the Swiss army knife of text editors" said: Ruijie> Philip Kaludercic writes: >> Tony Zorman writes: >>> +** use-package >>> + >>> ++++ >>> +*** New ':vc' keyword. >>> +This keyword enables the user to control how packages are fetched = by >>> +utilising 'package-vc.el'. By default, it relays its arguments to Ruijie> If I'm not mistaken, don't we prefer quoting like `this' in Ema= cs? (Or Ruijie> maybe NEWS has a different style to which I'm not familiar.) I= f that is Ruijie> correct, then all quotings in the patch would need to be adjust= ed Ruijie> accordingly. In docstrings we use `this', in NEWS we use 'that' (and in commit messages, although I think there=CA=BCs less consistency there). Robert --=20 From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 May 2023 14:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168303735522007 (code B ref 60418); Tue, 02 May 2023 14:23:01 +0000 Received: (at 60418) by debbugs.gnu.org; 2 May 2023 14:22:35 +0000 Received: from localhost ([127.0.0.1]:44780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptqtm-0005it-Gv for submit@debbugs.gnu.org; Tue, 02 May 2023 10:22:34 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:54400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptqti-0005ia-EC for 60418@debbugs.gnu.org; Tue, 02 May 2023 10:22:32 -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 ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Q9j2k5bbXz9t1h; Tue, 2 May 2023 16:22:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1683037342; 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=V2ptyZGcjLLRVfneU4HtoxE622xe2JaSmETTF/rAPyM=; b=FQZqGOqkQxn8rZTGHvimuisdeFEmDSFnYf9fwAXxT84C/R2IunNho49oRygEdZ8SZ864hq 2Y2eOzZQzXn67r8iIHADwF3z7FYSi6UHC19X2v8ImxNrnavqkYVxnqSwIgn3PCvUgN32rZ AnKHIQoO+hHZhm8OlwxsvJAqSCmWIAO2sVeuVnyl7l+LINEqtsYHKIhL9n9DjK4A3pPCVg 3bm83GW7nJH0Erhvr+MsRL8k9+Ba8b2Hg+eCjzZzjlcLSrty1OGUh0FKUASi0V/V1Nxmy4 sfTunJ/mCc1JRPDKOPGNv26E4eCC6yDTzQ3eeWwYS/7fbaAcVjhT870I9c57aA== From: Tony Zorman In-Reply-To: <831qjyoqj5.fsf@gnu.org> References: <87zgb6uk2r.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> Date: Tue, 02 May 2023 16:22:17 +0200 Message-ID: <87h6suolt2.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-META: 6ex6fdyxeiyrckggw3h5ja4i3rqh5sep X-MBO-RS-ID: 9006e0e2af500da1169 X-Spam-Score: -0.7 (/) 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.7 (-) On Tue, May 02 2023 15:40, Eli Zaretskii wrote: >> +@code{package-vc-install}. Notably -- even when not specified -- >> +@code{:rev} defaults to checking out the last release of the package. >> +You can use @code{:rev :newest} to check out the latest commit. >> + >> +For example, >> + >> +@example >> +@group >> +(use-package bbdb >> + :vc (:url "https://git.savannah.nongnu.org/git/bbdb.git" >> + :rev :newest)) >> +@end group >> +@end example >> + >> +would try -- by invoking @code{package-vc-install} -- to install the >> +latest commit of the package @code{foo} from the specified remote. > ^^^ > A typo there. > > Also, you say above "the latest release", but then "the latest > commit". These two are not the same, and in fact I think talking > about "release" here is misleading, since you actually mean "commit". > For the same reason, I think the text should explain how to indicate a > commit that is not the latest one, because that is also not > self-evident, especially since the upstream VCS is not necessarily > Git. I think the terminology of commit and release I use here are consistent, though maybe the wording is perhaps not entirely clear. If :rev is not explicitly given, then :vc falls back to calling package-vc-install (in the case of a non-local upstream) with the :last-release keyword in place of its REV argument (which is called a revision in the docs). Since package-vc.el freely calls :last-release a release of a package, I figured this terminology is appropriate here. It is only when :rev :newest is given that I talk about commits, which should also be accurate. Or perhaps you mean that I mistakenly talk about the latest release in some other place that I've overlooked just now? -- Tony Zorman | https://tony-zorman.com/ From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 May 2023 14:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168303821623487 (code B ref 60418); Tue, 02 May 2023 14:37:01 +0000 Received: (at 60418) by debbugs.gnu.org; 2 May 2023 14:36:56 +0000 Received: from localhost ([127.0.0.1]:44789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptr7f-00066k-K3 for submit@debbugs.gnu.org; Tue, 02 May 2023 10:36:55 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:52674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptr7Z-00066R-Qa for 60418@debbugs.gnu.org; Tue, 02 May 2023 10:36:54 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Q9jMF5TDLz9sbL; Tue, 2 May 2023 16:36:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1683038201; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kEGP3UB5TwtpOuwsNYiIQi04zJVeMNiSFnWWkUN5iIE=; b=NMOWxn2gDNQzJMISqrQ2AZRF1vG0ZUFt6q0hfNI4I32q1kJXKOjCf9MiSJ1crnkl2U7Iy8 uvsnvseWrqrikCyVhCbWfMNmp+xJctdwWfJqUGKA5Yl4iKnsOtUae8H347RJ6NTSyf9Ssi TmozmIKDYeAchRf+/G3J6gkeYOPVRKDzvWM/n5Ff0wJNIHtwQzowubUQRU33TBUfLwi7WN WOR2bsgjORHrtRBxXH7COS8GtZ0Yo1jm7Kk4W7sVpBqHYUovD49ePquCd5wFVkIVU0PWfI e7gauNSyD4h191dCoT3vHM9ICKWZzGX2ih53At2CgLN6tnqXkxIKCtfNtWm0CA== From: Tony Zorman In-Reply-To: <87a5ynizwt.fsf@posteo.net> References: <87zgb6uk2r.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <87a5ynizwt.fsf@posteo.net> Date: Tue, 02 May 2023 16:36:37 +0200 Message-ID: <87ednyol56.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-META: bs8356rzr4gbizneguxa8m5rgkk4sa8o X-MBO-RS-ID: 775a9db862bfecdcd4f X-Spam-Score: -0.7 (/) 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.7 (-) On Mon, May 01 2023 20:01, Philip Kaludercic wrote: > Tony Zorman writes: >> +(defun use-package-normalize--vc-arg (arg) >> + "Normalize possible arguments to the `:vc' keyword. >> +ARG is a cons-cell of approximately the form that >> +`package-vc-selected-packages' accepts, plus an additional `:rev' >> +keyword. If `:rev' is not given, it defaults to `:last-release'. >> + >> +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant >> +with `package-vc-selected-packages' and REV is a (possibly nil, >> +indicating the latest commit) revision." >> + (cl-flet* ((mk-string (s) >> + (if (and s (stringp s)) s (symbol-name s))) >> + (mk-sym (s) >> + (if (and s (stringp s)) (intern s) s)) >> + (normalize (k v) > > It seems there is inconsistent spacing here. Whoops, some tabs must have snuck into the code.=20 >> +** use-package >> + >> ++++ >> +*** New ':vc' keyword. >> +This keyword enables the user to control how packages are fetched by >> +utilising 'package-vc.el'. By default, it relays its arguments to > > I would not add the .el at the end. Is there a standard way to refer to packages? I feel like `package-vc' would be too easy to mistake for a function/variable, but maybe that is just paranoia. >> +'package-vc-install', but -- when combined with the ':load-path' >> +keyword -- it can also call upon 'package-vc-install-from-checkout' >> +instead. If no revision is given via the ':rev' argument, use-package >> +falls back to the last release (via 'package-vc-install's >> +':last-release' argument). To check out the last commit, use ':rev >> +:newest'. > > I feel like this is too much information for the NEWS file, the first > sentence should be enough. I think it's not totally unprecedented in terms of word count, but sure, if you think it's too long I wouldn't be opposed to shortening it.=20 > If you want to, I can make all these changes in your patch if you ack > them. I'll try and test the code in the coming days to see if it all > works, and with John's and Eli's blessing will apply them to master. Given my schedule for the next few weeks, this would be absolutely fantastic=E2=80=94thank you! --=20 Tony Zorman | https://tony-zorman.com/ From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 May 2023 15:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Ruijie Yu Cc: 60418@debbugs.gnu.org, soliditsallgood@mailbox.org, felician.nemeth@gmail.com, philipk@posteo.net, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168304015127723 (code B ref 60418); Tue, 02 May 2023 15:10:02 +0000 Received: (at 60418) by debbugs.gnu.org; 2 May 2023 15:09:11 +0000 Received: from localhost ([127.0.0.1]:44814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptrcs-0007D5-UY for submit@debbugs.gnu.org; Tue, 02 May 2023 11:09:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptrcq-0007Cn-9s for 60418@debbugs.gnu.org; Tue, 02 May 2023 11:09:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptrck-0003SJ-FP; Tue, 02 May 2023 11:09:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=kh06j0FTFpiZGstJivwnXdnOA6f2X108e1c1GQ1gBEo=; b=if9PkbReeR5j uvtvG7gUDDOe8kz/yeo0i/Zn4HEstvl/SMZBi4mQrfCkXmum6OCi8XTkIpKBIze18+uSRX8RCxx7n P1pKt1065g0u+05aNuR6q48CC/Qmo5bKD289CDbQsXOnWR4Mv2lY9ccuIblk/A27pnYsZ7WnVjL+I unB8Ufaz8j/f1efXs+A2aAHBluDMyeGY2dNtbTWJ7p+suobLfBZUfOlPFLyH5i2tuFoJZcm/28+u+ w2KIJWrRfGPMtb8kgbNUvqQ37PbFtAJVvdV74R2x9ASm9w1nATAM6OiSFyrqpc4FrCwHRiuOF+82I VOKSev51JKCPwF/2kK61tg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptrcT-0000Qv-6x; Tue, 02 May 2023 11:09:02 -0400 Date: Tue, 02 May 2023 18:09:31 +0300 Message-Id: <83v8han51w.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Ruijie Yu on Tue, 02 May 2023 21:18:22 +0800) References: <87zgb6uk2r.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <87a5ynizwt.fsf@posteo.net> 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 (---) > From: Ruijie Yu > Cc: Philip Kaludercic , Eli Zaretskii , > felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com > Date: Tue, 02 May 2023 21:18:22 +0800 > > > >> +** use-package > >> + > >> ++++ > >> +*** New ':vc' keyword. > >> +This keyword enables the user to control how packages are fetched by > >> +utilising 'package-vc.el'. By default, it relays its arguments to > > If I'm not mistaken, don't we prefer quoting like `this' in Emacs? Not in NEWS, no. In NEWS, we quote 'like this'. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 May 2023 15:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168304056228584 (code B ref 60418); Tue, 02 May 2023 15:17:01 +0000 Received: (at 60418) by debbugs.gnu.org; 2 May 2023 15:16:02 +0000 Received: from localhost ([127.0.0.1]:44836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptrjV-0007Qk-R4 for submit@debbugs.gnu.org; Tue, 02 May 2023 11:16:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptrjT-0007Q9-Do for 60418@debbugs.gnu.org; Tue, 02 May 2023 11:16:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptrjM-0005Yx-6l; Tue, 02 May 2023 11:15:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=S728GrxwQPiPzrwp7AYbqBsyzdkmie1/pJjOV7tAjOw=; b=dYRHMDPhPgq0 hcdBSPdyo/kZ0m2tQZ20bQ8p50M+LnmkFEsVG7pMis340BV2j80dqMC+TdJVVfKKb+U5MTCwW+u6z fHPJOaRWGALRgkym5OVznhQ8I4JCBWbo4O81g/aTWKFCsdfGZ4944EuWj9oMRo+lZdqPPbZFo9pjC AF/ql/Hu+gEaxFFF/EmFqi8pOQDZNHlv+wsLULLfw4o9G5cLN29Z9hAEv8ehHhCmlodrKXzJe4fGW 3CJull9rHSkqxnTyb9UAvXq6ny1JVTLyeabFYgw0Ir6rBmli8TrbXvYtRJ8e1hWJNBOmxnuCeFQSO Z3zFVBN1R5Zo66h9RM9iwA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptrjL-0001Me-LE; Tue, 02 May 2023 11:15:51 -0400 Date: Tue, 02 May 2023 18:16:35 +0300 Message-Id: <83ttwun4q4.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87h6suolt2.fsf@hyperspace> (message from Tony Zorman on Tue, 02 May 2023 16:22:17 +0200) References: <87zgb6uk2r.fsf@hyperspace> <87a5zt2emd.fsf@betli.tmit.bme.hu> <87fs9l9bim.fsf@posteo.net> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> 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 (---) > From: Tony Zorman > Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, > stefankangas@gmail.com > Date: Tue, 02 May 2023 16:22:17 +0200 > > On Tue, May 02 2023 15:40, Eli Zaretskii wrote: > >> +@code{package-vc-install}. Notably -- even when not specified -- > >> +@code{:rev} defaults to checking out the last release of the package. > >> +You can use @code{:rev :newest} to check out the latest commit. > >> + > >> +For example, > >> + > >> +@example > >> +@group > >> +(use-package bbdb > >> + :vc (:url "https://git.savannah.nongnu.org/git/bbdb.git" > >> + :rev :newest)) > >> +@end group > >> +@end example > >> + > >> +would try -- by invoking @code{package-vc-install} -- to install the > >> +latest commit of the package @code{foo} from the specified remote. > > ^^^ > > A typo there. > > > > Also, you say above "the latest release", but then "the latest > > commit". These two are not the same, and in fact I think talking > > about "release" here is misleading, since you actually mean "commit". > > For the same reason, I think the text should explain how to indicate a > > commit that is not the latest one, because that is also not > > self-evident, especially since the upstream VCS is not necessarily > > Git. > > I think the terminology of commit and release I use here are consistent, > though maybe the wording is perhaps not entirely clear. Not in my eyes, it isn't. E.g., look at any GitHub repository: there are "commits" there, and there are "releases", and they are not the same. > If :rev is not explicitly given, then :vc falls back to calling > package-vc-install (in the case of a non-local upstream) with the > :last-release keyword in place of its REV argument (which is called a > revision in the docs). Since package-vc.el freely calls :last-release a > release of a package, I figured this terminology is appropriate here. It > is only when :rev :newest is given that I talk about commits, which > should also be accurate. Or perhaps you mean that I mistakenly talk > about the latest release in some other place that I've overlooked just > now? 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? 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. Thanks. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 May 2023 08:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16831880461880 (code B ref 60418); Thu, 04 May 2023 08:15:02 +0000 Received: (at 60418) by debbugs.gnu.org; 4 May 2023 08:14:06 +0000 Received: from localhost ([127.0.0.1]:48448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puU6H-0000UF-VX for submit@debbugs.gnu.org; Thu, 04 May 2023 04:14:06 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:34284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puU6D-0000Tb-A9 for 60418@debbugs.gnu.org; Thu, 04 May 2023 04:14:04 -0400 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 ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4QBmmd0C1mz9snc; Thu, 4 May 2023 10:13:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1683188033; 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=HknSJoGX8ugYYTzP63+Swc3MH4UijQCD9gZVH8fjdTs=; b=jSG+/HT9XZjxzWzHnkjSNgzSSvCKyo/1RMUBc/A42rt2qTfD/Vq072CjKQhd46LcuCcAue tHpviKyiaQxqfUU13ageopykpxxN7VqQBwDy4g8o6pmiMfCsMBvhVBWhZYEFcM3FoKZCQe UYUIkRN43O8PejQj5vT9vQfpSFc0w6+7qUK/SBvFJ/ByMa8yn4uHg0D1HU/KoMksN80dTB Ec4EMhZDkiNcZANMeIWLHB/ZbELkYM2V1TE457RasAJbSh6fl5+sI6ktsfamO78OVGTcuU MneilVjDT4C/TZTf2WzKNlxLFpB5H6mrivOly2ehc4kHb8jaWGbic+DiwVW+/Q== From: Tony Zorman In-Reply-To: <83ttwun4q4.fsf@gnu.org> References: <87zgb6uk2r.fsf@hyperspace> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> Date: Thu, 04 May 2023 10:13:49 +0200 Message-ID: <87o7n0fr9e.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-META: 71by8bmzq54n1jhj89fz5ugbu88h7zfe X-MBO-RS-ID: ca7226b2fabd1b32ed6 X-Spam-Score: -0.7 (/) 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.7 (-) I suppose Philip would be more qualified than me to answer this, but I'll try. On Tue, May 02 2023 18:16, Eli Zaretskii wrote: >> From: Tony Zorman >> Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, >> stefankangas@gmail.com >> Date: Tue, 02 May 2023 16:22:17 +0200 >> >> On Tue, May 02 2023 15:40, Eli Zaretskii wrote: >> >> +@code{package-vc-install}. Notably -- even when not specified -- >> >> +@code{:rev} defaults to checking out the last release of the package. >> >> +You can use @code{:rev :newest} to check out the latest commit. >> >> + >> >> +For example, >> >> + >> >> +@example >> >> +@group >> >> +(use-package bbdb >> >> + :vc (:url "https://git.savannah.nongnu.org/git/bbdb.git" >> >> + :rev :newest)) >> >> +@end group >> >> +@end example >> >> + >> >> +would try -- by invoking @code{package-vc-install} -- to install the >> >> +latest commit of the package @code{foo} from the specified remote. >> > ^^^ >> > A typo there. >> > >> > Also, you say above "the latest release", but then "the latest >> > commit". These two are not the same, and in fact I think talking >> > about "release" here is misleading, since you actually mean "commit". >> > For the same reason, I think the text should explain how to indicate a >> > commit that is not the latest one, because that is also not >> > self-evident, especially since the upstream VCS is not necessarily >> > Git. >> >> I think the terminology of commit and release I use here are consistent, >> though maybe the wording is perhaps not entirely clear. > > Not in my eyes, it isn't. E.g., look at any GitHub repository: there > are "commits" there, and there are "releases", and they are not the > same. 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. >> If :rev is not explicitly given, then :vc falls back to calling >> package-vc-install (in the case of a non-local upstream) with the >> :last-release keyword in place of its REV argument (which is called a >> revision in the docs). Since package-vc.el freely calls :last-release a >> release of a package, I figured this terminology is appropriate here. It >> is only when :rev :newest is given that I talk about commits, which >> should also be accurate. Or perhaps you mean that I mistakenly talk >> about the latest release in some other place that I've overlooked just >> now? > > 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). > 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. -- Tony Zorman | https://tony-zorman.com/ From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 May 2023 10:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: philipk@posteo.net, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168319673618231 (code B ref 60418); Thu, 04 May 2023 10:39:02 +0000 Received: (at 60418) by debbugs.gnu.org; 4 May 2023 10:38:56 +0000 Received: from localhost ([127.0.0.1]:48635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puWMS-0004jz-4S for submit@debbugs.gnu.org; Thu, 04 May 2023 06:38:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puWML-0004jf-DT for 60418@debbugs.gnu.org; Thu, 04 May 2023 06:38:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puWMC-0006oa-Ea; Thu, 04 May 2023 06:38:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=TtVMwiB90/cNRHZeg1qH6vlUiNDS64pFNm/MIqU27TI=; b=hQDG2qDDyBdL RYtbloslRN/KB+hk0kWR8ED9WlvzAr6ZKGk3qGKoXWLW5bX0hycc2zdjDpPaK+zbkR/aRh1O2OuSy 9IAY6FoBKnktRvUp6i3ZVDOOP8wuFyA9yjIu04Q1/ivdDX7HXtO9EMmT/HW5n/DVEwp9QG8r2nYng i03CAjNzCTwSAqK4Yg89OoP61JfZkwwk9oXIures0EDFUpvIYxPDsmQoJ+8EfmsXoiyHV6QpZgGLe T1as4IV4C5y2x6VXfJNcasNXlttkfaQzdEEEOxn5AlJVwjQsWwq3lGEj/YNlMaSpfzX4Woe8J0D3s yovKgPj1JbgvmklpNIjnzw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puWMB-000280-Uu; Thu, 04 May 2023 06:38:40 -0400 Date: Thu, 04 May 2023 13:39:29 +0300 Message-Id: <838re4l6se.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87o7n0fr9e.fsf@hyperspace> (message from Tony Zorman on Thu, 04 May 2023 10:13:49 +0200) References: <87zgb6uk2r.fsf@hyperspace> <87y1n3zsro.fsf@posteo.net> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> 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 (---) > From: Tony Zorman > Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, > stefankangas@gmail.com > Date: Thu, 04 May 2023 10:13:49 +0200 > > > Not in my eyes, it isn't. E.g., look at any GitHub repository: there > > are "commits" there, and there are "releases", and they are not the > > same. > > 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. OK, then this should be documented. Specifically, it is important to explain that the default is the latest _commit_ (a.k.a. HEAD) of the default branch, whereas specific releases are those that bump the Version: tag in the main ELisp file. > > 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). Any value other than a commit hash? E.g., are tags supported? And how will the user know which commit hash or tag to specify given the value of a Version: tag in the main file? We should document that as well. Thanks. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 May 2023 05:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16832631099192 (code B ref 60418); Fri, 05 May 2023 05:06:02 +0000 Received: (at 60418) by debbugs.gnu.org; 5 May 2023 05:05:09 +0000 Received: from localhost ([127.0.0.1]:52863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puncy-0002OB-Tn for submit@debbugs.gnu.org; Fri, 05 May 2023 01:05:09 -0400 Received: from mout02.posteo.de ([185.67.36.66]:53575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puncw-0002NX-Ph for 60418@debbugs.gnu.org; Fri, 05 May 2023 01:05:08 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E4276240156 for <60418@debbugs.gnu.org>; Fri, 5 May 2023 07:05:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683263100; bh=+wP/k6Aj9biWLVt/ogjovxWGdxTiZSSXNzJRJQVu4yY=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Yl0EG58/mEjyasAbm17OwXACuPTDzC3BlO5I7zA2L1ERH67SfGBEEj63qy6ED5WbO 89VbmZJzejf+8/AWNodZkGr1cmjnH0xxd8OGht4Db1rxl6Iq2AjjJoSvKQSOAVlwcK RDCb/e7/NZmdXBDgYDRjOwMNGgsLqTHxTl7NzbMVPz1hwu66dBA/zYvzDpn7VvuDAb Df/SIsfgnKlI+RvMxuBoEyKDMVLfEbwQDt7WZwqlgSRlHNCSOLpHZoXXtkvDRsJ0Mk OQxWGQx1ueFFgMA9huYiX+GMVSZbLnjG320T77q1LxsBCwRDSnWJsLy0jilgcE1sCh NwScMpZR7gPTw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QCJXD0p6Bz6tn4; Fri, 5 May 2023 07:05:00 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87o7n0fr9e.fsf@hyperspace> (Tony Zorman's message of "Thu, 04 May 2023 10:13:49 +0200") References: <87zgb6uk2r.fsf@hyperspace> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.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 Date: Fri, 05 May 2023 05:04:59 +0000 Message-ID: <878re3cqro.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: > I suppose Philip would be more qualified than me to answer this, but > I'll try. Sorry, I forgot the respond to this exchange. > On Tue, May 02 2023 18:16, Eli Zaretskii wrote: >>> From: Tony Zorman >>> Cc: philipk@posteo.net, 60418@debbugs.gnu.org, felician.nemeth@gmail.com, >>> stefankangas@gmail.com >>> Date: Tue, 02 May 2023 16:22:17 +0200 >>> >>> On Tue, May 02 2023 15:40, Eli Zaretskii wrote: >>> >> +@code{package-vc-install}. Notably -- even when not specified -- >>> >> +@code{:rev} defaults to checking out the last release of the package. >>> >> +You can use @code{:rev :newest} to check out the latest commit. >>> >> + >>> >> +For example, >>> >> + >>> >> +@example >>> >> +@group >>> >> +(use-package bbdb >>> >> + :vc (:url "https://git.savannah.nongnu.org/git/bbdb.git" >>> >> + :rev :newest)) >>> >> +@end group >>> >> +@end example >>> >> + >>> >> +would try -- by invoking @code{package-vc-install} -- to install the >>> >> +latest commit of the package @code{foo} from the specified remote. >>> > ^^^ >>> > A typo there. >>> > >>> > Also, you say above "the latest release", but then "the latest >>> > commit". These two are not the same, and in fact I think talking >>> > about "release" here is misleading, since you actually mean "commit". >>> > For the same reason, I think the text should explain how to indicate a >>> > commit that is not the latest one, because that is also not >>> > self-evident, especially since the upstream VCS is not necessarily >>> > Git. >>> >>> I think the terminology of commit and release I use here are consistent, >>> though maybe the wording is perhaps not entirely clear. >> >> Not in my eyes, it isn't. E.g., look at any GitHub repository: there >> are "commits" there, and there are "releases", and they are not the >> same. > > 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"? That would avoid confusing the reader into believing that we are fetching the code via some "official" release-channel or anything like that, while still indicating that this is not just any commit. >>> If :rev is not explicitly given, then :vc falls back to calling >>> package-vc-install (in the case of a non-local upstream) with the >>> :last-release keyword in place of its REV argument (which is called a >>> revision in the docs). Since package-vc.el freely calls :last-release a >>> release of a package, I figured this terminology is appropriate here. It >>> is only when :rev :newest is given that I talk about commits, which >>> should also be accurate. Or perhaps you mean that I mistakenly talk >>> about the latest release in some other place that I've overlooked just >>> now? >> >> 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? From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 May 2023 05:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168326494813192 (code B ref 60418); Fri, 05 May 2023 05:36:02 +0000 Received: (at 60418) by debbugs.gnu.org; 5 May 2023 05:35:48 +0000 Received: from localhost ([127.0.0.1]:52893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puo6d-0003Qi-R1 for submit@debbugs.gnu.org; Fri, 05 May 2023 01:35:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puo6b-0003QT-1E for 60418@debbugs.gnu.org; Fri, 05 May 2023 01:35:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puo6U-0001Kc-H4; Fri, 05 May 2023 01:35:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/809i1q1ByCZXu1NETEnhlA3K6pOAj5iT2qD9jJTVKo=; b=dA6yHmCWclnZ +/tJi/w9/FJZX9frvi/sYUTP+m6XL8hWNBuCbMgRDo38gbaxbXvpeVPJw/N5AkZ1h9G/RuszmOnUv wz0vn04rLRhHKRP0LNh3qb2HqIZDbURIU4VYe6YF4knSXCiPgiWkU+atrlRvARZXxG2iiyC+e+yoF MPFrP0Vn1kVBiOu5QwcLyPrnow5ZykGc5gf3NupXNB09QkcrrXKM7vBXIhTNV0UEAO6gKtXXFO/0M arZtl59yCXz59R2/mOnf6PgRSY/7jcwFwWClDz7T3PERZwYapJ+EnlBs3+G2Z9z1kqUv/sdwnjrin M/LtFBNL1yxenYWa1zlmkQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puo6U-0007cZ-4U; Fri, 05 May 2023 01:35:38 -0400 Date: Fri, 05 May 2023 08:36:31 +0300 Message-Id: <83ild7jq5c.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <878re3cqro.fsf@posteo.net> (message from Philip Kaludercic on Fri, 05 May 2023 05:04:59 +0000) References: <87zgb6uk2r.fsf@hyperspace> <871qku220f.fsf@betli.tmit.bme.hu> <874jpq920b.fsf@posteo.net> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> 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 (---) > From: Philip Kaludercic > Cc: Eli Zaretskii , 60418@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com > Date: Fri, 05 May 2023 05:04:59 +0000 > > Tony Zorman 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? > >> 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? From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 May 2023 05:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168326577614942 (code B ref 60418); Fri, 05 May 2023 05:50:01 +0000 Received: (at 60418) by debbugs.gnu.org; 5 May 2023 05:49:36 +0000 Received: from localhost ([127.0.0.1]:52915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puoJz-0003sv-Mn for submit@debbugs.gnu.org; Fri, 05 May 2023 01:49:36 -0400 Received: from mout02.posteo.de ([185.67.36.66]:47009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puoJx-0003sg-Rg for 60418@debbugs.gnu.org; Fri, 05 May 2023 01:49:34 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D631A240158 for <60418@debbugs.gnu.org>; Fri, 5 May 2023 07:49:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683265767; bh=rD88hd61+1oWxkezdTSLFahZdEobDggq1Bc0oa1Pt5Q=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=ZEt/Jz+TPh9nO1YcgcdehSxHY56ZGT3tl9nDCCjtbwa3bM8qt0/j9RJfRtrTwo4LZ PoIqmPP6KHn3tu/QAMBBiGHwFX/dHHgYBoyeu2GCC0nLC5H2vgB8hLtgkGbzfRuSZa tcGiB6a9WIhgnCewQhqxqN4JbkbdJnwt+V4/2G/syDr9S6Lavads26ANlw2Q52BPAU YJAQfL3r2+OcA7QkibviiY95tj5K+hweMYn2+IDXYwbhiLNbKeQc0jAIGuOL1qe9Kp F1uAPyyZl5mb/NRzPGJ1N4Uw2JPV7nsCn4f2Box9Jpn8YCVEtvSLsUhDq/bjg42od7 CAI/+1EiBcGzA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QCKWW1HBWz6txw; Fri, 5 May 2023 07:49:27 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <83ild7jq5c.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 May 2023 08:36:31 +0300") References: <87zgb6uk2r.fsf@hyperspace> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> 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 Date: Fri, 05 May 2023 05:49:26 +0000 Message-ID: <87v8h7ba55.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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 (---) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Eli Zaretskii , 60418@debbugs.gnu.org, >> felician.nemeth@gmail.com, stefankangas@gmail.com >> Date: Fri, 05 May 2023 05:04:59 +0000 >> >> Tony Zorman 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: --=-=-= Content-Type: text/plain Content-Disposition: inline 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, --=-=-= Content-Type: text/plain I can apply this or any variation thereof to emacs-29. --=-=-=-- From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 May 2023 06:54:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16832695831247 (code B ref 60418); Fri, 05 May 2023 06:54:04 +0000 Received: (at 60418) by debbugs.gnu.org; 5 May 2023 06:53:03 +0000 Received: from localhost ([127.0.0.1]:53025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pupJO-0000K3-Ng for submit@debbugs.gnu.org; Fri, 05 May 2023 02:53:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pupJM-0000JL-Ap for 60418@debbugs.gnu.org; Fri, 05 May 2023 02:53:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pupJF-0003gv-VI; Fri, 05 May 2023 02:52:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=OlFMdX3us3dqH0hU4D4sQQglMiQIUqyrZL0wXQmb2NE=; b=m71XxfMvK7p6yLDzKDrF pjhBgvCx7CiwzmMQhHwIg0HPt/SgS+CS/IuyAC0l84OwKLNFtHlMrIUuc/x65+hKLkCmLv9GGNriW CgTymxYEWbSLuu66NJPx/JCUp2s20qjHOB0rU2Jst76wbgMUEffDHxrxxUj4pkhWazmfxt0wikzNK 1VvOLqDtu+eaJpsaWEnjvqg3exfsmGD66nz+6M44aYWW1NoiL2hdnFVTjswrKTCyE6GfATdpSZAvv kM34R8VwJWeZnu4VCfv2mzg2f8mq871wXlZOUuj3qAz6wmNNiRkULjlxZwR9u2N6F+ZbRq8Vf4BgI CypKrftcfU827Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pupJF-0001Uj-DB; Fri, 05 May 2023 02:52:53 -0400 Date: Fri, 05 May 2023 09:53:45 +0300 Message-Id: <83zg6ji806.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87v8h7ba55.fsf@posteo.net> (message from Philip Kaludercic on Fri, 05 May 2023 05:49:26 +0000) References: <87zgb6uk2r.fsf@hyperspace> <87cz4ezpwi.fsf@betli.tmit.bme.hu> <87h6tlinft.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 (---) > From: Philip Kaludercic > Cc: soliditsallgood@mailbox.org, 60418@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com > Date: Fri, 05 May 2023 05:49:26 +0000 > > >> 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. I thought package-vc-install is used (or at least can be used) to fetch the latest HEAD from the upstream repository? I even thought this was its main raison d'être? If that's not true, does it mean we have no means for package users to track the latest development code of a package? > >> 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: > > 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'. First, too much of passive voice. More importantly, this still doesn't tell: . what is "the last revision", the one installed if REV is omitted? . what are possible values of REV, in addition to :last-release, and how are those values interpreted, in VCS terms? > I can apply this or any variation thereof to emacs-29. emacs-29 is fine for documentation changes. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 May 2023 17:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168330695126948 (code B ref 60418); Fri, 05 May 2023 17:16:01 +0000 Received: (at 60418) by debbugs.gnu.org; 5 May 2023 17:15:51 +0000 Received: from localhost ([127.0.0.1]:57350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puz27-00070Z-4N for submit@debbugs.gnu.org; Fri, 05 May 2023 13:15:51 -0400 Received: from mout01.posteo.de ([185.67.36.65]:59511) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puz25-00070K-Cy for 60418@debbugs.gnu.org; Fri, 05 May 2023 13:15:50 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4181B24058A for <60418@debbugs.gnu.org>; Fri, 5 May 2023 19:15:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683306943; bh=7W4qV3TLRxZiBWl/nX5PD0TIVzaVlhQHiOTC2VjUnBI=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=nk5HbHSC/grE4ZNZ3eJ8QG+CaEf7af5xwCHB5/AfdO0RlMX18r1/eobBDH4aqrruf HQhK/1B9y/F5hjW+yKXviUtsRk0cpe39iX+bzCQKaqBIKpeFayXbpV9/ypp5NwNnqY 4W6dXQlUQmjf831ILROwpXhVs7OuNaFuKBVg7locdTRAh0HpUQVGt8+apVnlyA4PRm JMR2fB1Le0EqVvH9M5hGOGNpxynPwld+Vma8ypugFAt4OKAlnNSy5LpCrPftYt4oz7 kXy3Iqj6h+V3cGW+lasSA9pJo5OvVEsuqCV+rcEohQsVDqYWJv37N/cBof30/7Nkzu 8hPiJmkpRcSaw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QCclL3n7nz9rxB; Fri, 5 May 2023 19:15:42 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <83zg6ji806.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 May 2023 09:53:45 +0300") References: <87zgb6uk2r.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> 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 Date: Fri, 05 May 2023 17:15:42 +0000 Message-ID: <87wn1mlmwx.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: soliditsallgood@mailbox.org, 60418@debbugs.gnu.org, >> felician.nemeth@gmail.com, stefankangas@gmail.com >> Date: Fri, 05 May 2023 05:49:26 +0000 >>=20 >> >> 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? >>=20 >> 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. > > I thought package-vc-install is used (or at least can be used) to > fetch the latest HEAD from the upstream repository? I even thought > this was its main raison d'=C3=AAtre? > > If that's not true, does it mean we have no means for package users to > track the latest development code of a package? This is true, for package-vc-install, but the idea was not do this for the :vc keyword to use-package. My understanding is that the main interest here is to install packages that are not available via package archives. And as use-package is a popular means of bootstrapping a configuration, it seems the right approach to use the commit of the latest revision, instead of just any commit to avoid instability. >> >> Are there any other places where we can fix this confusion? >> > >> > I guess the documentation of package-vc-install shares these issues? >>=20 >> How does this sound like to you: >>=20 >> 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. >>=20=20 >> -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'. > > First, too much of passive voice. > More importantly, this still doesn't tell: > > . what is "the last revision", the one installed if REV is omitted? > . what are possible values of REV, in addition to :last-release, and > how are those values interpreted, in VCS terms? I have tried to address these issues here: By default, this function installs the last revision of the package available from its repository. If REV is a string, it describes the revision to install, as interpreted by the VC backend. The special value `:last-release' (interactively, the prefix argument), will use the commit of the latest release, if it exists. The latest revision is determined by the latest revision to modify the \"Version\" header of the main file. But I couldn't come up with an elegant way to avoid the passive voice in the last sentence. >> I can apply this or any variation thereof to emacs-29. > > emacs-29 is fine for documentation changes. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 May 2023 18:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168331225913716 (code B ref 60418); Fri, 05 May 2023 18:45:02 +0000 Received: (at 60418) by debbugs.gnu.org; 5 May 2023 18:44:19 +0000 Received: from localhost ([127.0.0.1]:57546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Pj-0003ZA-Bl for submit@debbugs.gnu.org; Fri, 05 May 2023 14:44:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Pf-0003Yv-OU for 60418@debbugs.gnu.org; Fri, 05 May 2023 14:44:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv0PY-00009V-PO; Fri, 05 May 2023 14:44:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=1OTSiNVWhddbEXWyHQ3aJBn7TYLNNOne0d/J/IvG2ls=; b=LSu2j0ouLd4R3NDnTker t03BiSzGpN78kF1KTFDF7Fh/3leP9j2uL40xgxqFWGt75ZhmcK7gjx9rhXruWFoMTx+9n5I4rKrFA 0462XptZRvV5w+qurPxyC+RjBCgqz7shHGVMzZ+kRUWtEkqB7O8ya68onayJ3q2XaoJOUF2GHWb0q afu4IZzhkBETiNleh3NF/qgoHDpJfpInQPMT6I4Cn2raLTZWfZdVmhoISGmXX8sXSa3QFmX2I7z8c b/2G35Nllsc6rFFhxJxABe+Agoh4o4+meKiUQMcA+2ZQ0eSBxpbFjeLcgdmHV3Mm/u7DzdA2W53iU ntsubbxvvy9Okg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv0PY-0005d2-9V; Fri, 05 May 2023 14:44:08 -0400 Date: Fri, 05 May 2023 21:45:01 +0300 Message-Id: <83v8h6hb2q.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87wn1mlmwx.fsf@posteo.net> (message from Philip Kaludercic on Fri, 05 May 2023 17:15:42 +0000) References: <87zgb6uk2r.fsf@hyperspace> <87r0spa712.fsf@posteo.net> <87edopiif5.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> <87wn1mlmwx.fsf@posteo.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 (---) > From: Philip Kaludercic > Cc: soliditsallgood@mailbox.org, 60418@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com > Date: Fri, 05 May 2023 17:15:42 +0000 > > Eli Zaretskii writes: > > >> 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. > > > > I thought package-vc-install is used (or at least can be used) to > > fetch the latest HEAD from the upstream repository? I even thought > > this was its main raison d'être? > > > > If that's not true, does it mean we have no means for package users to > > track the latest development code of a package? > > This is true, for package-vc-install, but the idea was not do this for > the :vc keyword to use-package. But I wrote the above as a comment to a patch to package-vc.el, not to use-package. So why use-package is relevant here? > My understanding is that the main > interest here is to install packages that are not available via package > archives. And as use-package is a popular means of bootstrapping a > configuration, it seems the right approach to use the commit of the > latest revision, instead of just any commit to avoid instability. My understanding is that the :rev keyword allows to use any value that is acceptable to package-vc-install. I understand that in most cases users will want to install the latest, but once we decided to support :rev, we must allow any valid value there. Right? > By default, this function installs the last revision of the > package available from its repository. If REV is a string, it > describes the revision to install, as interpreted by the VC > backend. The special value `:last-release' (interactively, the > prefix argument), will use the commit of the latest release, if > it exists. The latest revision is determined by the latest ^^^^^^^^^^^^^^^ "last release", not "latest revision": you are explaining what the previous sentence said. > revision to modify the \"Version\" header of the main file. > > But I couldn't come up with an elegant way to avoid the passive voice in > the last sentence. Here's one way: The last release is the latest revision which changed the \"Version:\" header of the package's main Lisp file. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 May 2023 18:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168339901415962 (code B ref 60418); Sat, 06 May 2023 18:51:01 +0000 Received: (at 60418) by debbugs.gnu.org; 6 May 2023 18:50:14 +0000 Received: from localhost ([127.0.0.1]:35762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvMz0-00049O-5V for submit@debbugs.gnu.org; Sat, 06 May 2023 14:50:14 -0400 Received: from mout02.posteo.de ([185.67.36.66]:59513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvMyv-000492-Ic for 60418@debbugs.gnu.org; Sat, 06 May 2023 14:50:13 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D3FFD240106 for <60418@debbugs.gnu.org>; Sat, 6 May 2023 20:50:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683399003; bh=CLSvuamhcyVwNxBdc5SY63etOnBbGIsSPrtD2hnBfh0=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Q8oYMzhGGe2+syO9z3Lheam/9AsMdMfniZItjLyQXVLqCAJgnaOBZ9EecfXSvEEjE xeKPRfWBEEEu6Dt5qJkYvfm05jeb80KLJKHpAhJZtQXfiE4AtUeltljczd9Q3vDvS3 H1TgIndODt2yaq+kyu9osY0dhEK3dK/xud9FmvTqVWNVEOuWwNf/8FqrDj9SPW7kVX fXsNaPtzaX1z7y3mAFy8fVqr+KDDeC3UnZzuhduhT92NffTibaXYlkpe19CmBtbjET txfiLr+IZE5m4MSnRmwfUl8/bHdIw5pcQfVTYPxgQwdtr+V7FuzevzVozbd9cL3mJi ZLie2sYHA0niw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QDGnl1yNLz6tm4; Sat, 6 May 2023 20:50:03 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <83v8h6hb2q.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 May 2023 21:45:01 +0300") References: <87zgb6uk2r.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> <87wn1mlmwx.fsf@posteo.net> <83v8h6hb2q.fsf@gnu.org> 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 Date: Sat, 06 May 2023 18:50:02 +0000 Message-ID: <87wn1lguqt.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: soliditsallgood@mailbox.org, 60418@debbugs.gnu.org, >> felician.nemeth@gmail.com, stefankangas@gmail.com >> Date: Fri, 05 May 2023 17:15:42 +0000 >>=20 >> Eli Zaretskii writes: >>=20 >> >> No, the commit of the latest release is interpreted the same way as >> >> elpa-admin.el does, namely the last revision that modified the "Versi= on" >> >> 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. >> > >> > I thought package-vc-install is used (or at least can be used) to >> > fetch the latest HEAD from the upstream repository? I even thought >> > this was its main raison d'=C3=AAtre? >> > >> > If that's not true, does it mean we have no means for package users to >> > track the latest development code of a package? >>=20 >> This is true, for package-vc-install, but the idea was not do this for >> the :vc keyword to use-package. > > But I wrote the above as a comment to a patch to package-vc.el, not to > use-package. So why use-package is relevant here? Because this patch is related to use-package, and a keyword that would allow for use-package to invoke package-vc-install? >> My understanding is that the main >> interest here is to install packages that are not available via package >> archives. And as use-package is a popular means of bootstrapping a >> configuration, it seems the right approach to use the commit of the >> latest revision, instead of just any commit to avoid instability. > > My understanding is that the :rev keyword allows to use any value that > is acceptable to package-vc-install.=20=20 Right, and what is acceptable to package-vc-install is what is transitively acceptable to `vc-clone'/`vc-retrieve-tag'. > I understand that in most cases > users will want to install the latest,=20 I don't know if that is the case. I might be wrong that the revision of the latest release is a good default? Tony, do you think we should add a user-option to regulate this behaviour. > but once we decided to support > :rev, we must allow any valid value there. Right? Yes. >> By default, this function installs the last revision of the >> package available from its repository. If REV is a string, it >> describes the revision to install, as interpreted by the VC >> backend. The special value `:last-release' (interactively, the >> prefix argument), will use the commit of the latest release, if >> it exists. The latest revision is determined by the latest > ^^^^^^^^^^^^^^^ > "last release", not "latest revision": you are explaining what the > previous sentence said. Whoops, of course. >> revision to modify the \"Version\" header of the main file. >>=20 >> But I couldn't come up with an elegant way to avoid the passive voice in >> the last sentence. > > Here's one way: > > The last release is the latest revision which changed the > \"Version:\" header of the package's main Lisp file. Yes, sounds good. Will apply this change. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 May 2023 19:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168340038218645 (code B ref 60418); Sat, 06 May 2023 19:14:02 +0000 Received: (at 60418) by debbugs.gnu.org; 6 May 2023 19:13:02 +0000 Received: from localhost ([127.0.0.1]:35780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvNL3-0004qY-Gb for submit@debbugs.gnu.org; Sat, 06 May 2023 15:13:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvNKy-0004qG-LP for 60418@debbugs.gnu.org; Sat, 06 May 2023 15:13:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvNKs-0008Fv-Do; Sat, 06 May 2023 15:12:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qL4DP9ZhvZf0SpIC6sjMyJ1Xjgi/qux1+Y24KmWqqQ0=; b=XCX4X0+YqSlV +/AWamVmTFR9hTFhMpblaAMuHCnaIzvGZ7bsa1nDg2cgAXU3pbKoSeZJK22E+lbZhkMKPIBLv3jU8 B8g76IjdMeoi8Ob1m4698snF/Yb/exm8664cTL+6HBBf1fYjgwvSS85JokqYTC+1Re3sYFwP27V00 SzPhmuA+EirdMDQ+Zg1OUdosMS3Ew03yGWCY9YoLt4/RnbOHMtTW0MFlLIZ34q4rwEmeM2BD+URXz v9Fnu/pNiLD4u0mKxGPLHPgnsTHvAfDove1vufBupuVvmdXNBPF6KD5rQLCoLcU+pGrEauM9yNK9d OvJdwueMJF+/uJRQd2/SWQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvNKo-0006aP-Ln; Sat, 06 May 2023 15:12:49 -0400 Date: Sat, 06 May 2023 22:13:42 +0300 Message-Id: <837ctlff2x.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87wn1lguqt.fsf@posteo.net> (message from Philip Kaludercic on Sat, 06 May 2023 18:50:02 +0000) References: <87zgb6uk2r.fsf@hyperspace> <87wn2bzvcp.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> <87wn1mlmwx.fsf@posteo.net> <83v8h6hb2q.fsf@gnu.org> <87wn1lguqt.fsf@posteo.net> 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 (---) > From: Philip Kaludercic > Cc: soliditsallgood@mailbox.org, 60418@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com > Date: Sat, 06 May 2023 18:50:02 +0000 > > Eli Zaretskii writes: > > >> This is true, for package-vc-install, but the idea was not do this for > >> the :vc keyword to use-package. > > > > But I wrote the above as a comment to a patch to package-vc.el, not to > > use-package. So why use-package is relevant here? > > Because this patch is related to use-package, and a keyword that would > allow for use-package to invoke package-vc-install? Yes, but the doc string in package-vc-install should describe everything that package-vc supports, not just the subset we think will be useful in use-package via :rev. Anyway, I think we are in agreement, as your last doc string is comprehensive enough to make me happy. From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 May 2023 19:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic , Eli Zaretskii Cc: 60418@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168340198721318 (code B ref 60418); Sat, 06 May 2023 19:40:02 +0000 Received: (at 60418) by debbugs.gnu.org; 6 May 2023 19:39:47 +0000 Received: from localhost ([127.0.0.1]:35814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvNkw-0005Xm-Rb for submit@debbugs.gnu.org; Sat, 06 May 2023 15:39:47 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:45826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvNkt-0005XR-8O for 60418@debbugs.gnu.org; Sat, 06 May 2023 15:39:45 -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 ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4QDHtv4dVdz9sT5; Sat, 6 May 2023 21:39:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1683401975; 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=sphPPrp3GObdYxczxgA2d4wb9n/g7atUOOPQQ8QE/I4=; b=ps2nW7CezCy63wWe48NE+FPftyW7G9O4oX/JqOnMEevXe97LlgNgQ8tylUnoVKXZCzt9uW W1UjyDym7QQrUfkOuULLlGSS/cF/MdLRrtlhEegvUbgWSwPE13O1JwVZnrMKx/1OYGBa2X 4HUcA0O1nMTWdbaKPsDqpsopCft5nmHrkwM0uXYdeuoNGcB0AgafvE1vwq5ZsmxDMDQSpY F4gldcyZb5WORYQOXIZugcXnkqayYRdCpoSpUz1Jt/kk3lXleqCqNidRu0Fu3BWUmsUi5a rnWyA2d5pC6LmgSCkgtCjfg3cv26hCuuagF1256MxZMhdc+Tf8UIJAP50IpwKw== From: Tony Zorman In-Reply-To: <87wn1lguqt.fsf@posteo.net> References: <87zgb6uk2r.fsf@hyperspace> <835y9vbyfr.fsf@gnu.org> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> <87wn1mlmwx.fsf@posteo.net> <83v8h6hb2q.fsf@gnu.org> <87wn1lguqt.fsf@posteo.net> Date: Sat, 06 May 2023 21:39:29 +0200 Message-ID: <878re1i70u.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-META: 8ftzn5zkp41qwgq8nogrmdjyic4xp5yn X-MBO-RS-ID: abeae265d57bda414e5 X-Spam-Score: -0.7 (/) 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.7 (-) On Sat, May 06 2023 18:50, Philip Kaludercic wrote: > Eli Zaretskii writes: >> I understand that in most cases >> users will want to install the latest, > > I don't know if that is the case. I might be wrong that the revision of > the latest release is a good default? Tony, do you think we should add > a user-option to regulate this behaviour. It's certainly my default to install the latest commit of a package instead of the latest release. I don't know how general this desire is among other people, but an option for controlling the specific behaviour sounds great in either case. -- Tony Zorman | https://tony-zorman.com/ From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 May 2023 07:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: soliditsallgood@mailbox.org, felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.16834448624400 (code B ref 60418); Sun, 07 May 2023 07:35:02 +0000 Received: (at 60418) by debbugs.gnu.org; 7 May 2023 07:34:22 +0000 Received: from localhost ([127.0.0.1]:36246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvYuU-00018t-1D for submit@debbugs.gnu.org; Sun, 07 May 2023 03:34:22 -0400 Received: from mout02.posteo.de ([185.67.36.66]:60491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvYuO-00018c-2x for 60418@debbugs.gnu.org; Sun, 07 May 2023 03:34:19 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 021BD240168 for <60418@debbugs.gnu.org>; Sun, 7 May 2023 09:34:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683444850; bh=F8ey6UrUjxX0kxEUEoiP3XKHu1LTgJaU7CciSOQmrcc=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=KkYvuCBi+k4tHLVDxxdaXW4RXBoOtl/nDbOC96JVRH4MdmlwxcfhmRMpYG9SWKRWB V7Kf7ma75bRvWa0x8u185irgiBCksnXCLrt2dCh75f8es+hlmo1ySQUctg1TN8l3EK JRWdk8NEz3sIKx0nuCzw67GAor3fFipgtun/4LfKVU3weW2mbevMJues9rZADoXu+0 MqM7eY5o2KyASPFjWsJZdMPXAsM+/DRc1YW8OI1WVuqO/TH7nSQXh+mi/5vns2kWlw GMUtuNawxOPyNowQ01QZyMJO3LzrQKvwKlfEydPGq8UVW1aSuZhbrIYYiKZ9zlXDn7 foAGgPO9PZ5vQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QDblP11nrz6tw8; Sun, 7 May 2023 09:34:09 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <837ctlff2x.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 May 2023 22:13:42 +0300") References: <87zgb6uk2r.fsf@hyperspace> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> <87wn1mlmwx.fsf@posteo.net> <83v8h6hb2q.fsf@gnu.org> <87wn1lguqt.fsf@posteo.net> <837ctlff2x.fsf@gnu.org> 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 Date: Sun, 07 May 2023 07:34:07 +0000 Message-ID: <87bkiwh9xs.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 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: soliditsallgood@mailbox.org, 60418@debbugs.gnu.org, >> felician.nemeth@gmail.com, stefankangas@gmail.com >> Date: Sat, 06 May 2023 18:50:02 +0000 >> >> Eli Zaretskii writes: >> >> >> This is true, for package-vc-install, but the idea was not do this for >> >> the :vc keyword to use-package. >> > >> > But I wrote the above as a comment to a patch to package-vc.el, not to >> > use-package. So why use-package is relevant here? >> >> Because this patch is related to use-package, and a keyword that would >> allow for use-package to invoke package-vc-install? > > Yes, but the doc string in package-vc-install should describe > everything that package-vc supports, not just the subset we think will > be useful in use-package via :rev. In that case there was some other unrelated confusion. > Anyway, I think we are in agreement, as your last doc string is > comprehensive enough to make me happy. OK, great! Thank you for your input. -- Philip Kaludercic From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 May 2023 08:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tony Zorman Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168344954113190 (code B ref 60418); Sun, 07 May 2023 08:53:01 +0000 Received: (at 60418) by debbugs.gnu.org; 7 May 2023 08:52:21 +0000 Received: from localhost ([127.0.0.1]:36397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pva7w-0003Qf-KD for submit@debbugs.gnu.org; Sun, 07 May 2023 04:52:20 -0400 Received: from mout01.posteo.de ([185.67.36.65]:52077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pva7t-0003QS-Rb for 60418@debbugs.gnu.org; Sun, 07 May 2023 04:52:19 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CE9E52400D6 for <60418@debbugs.gnu.org>; Sun, 7 May 2023 10:52:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683449531; bh=Cuo7HXlc42+FfE4kv08r64ImcXTDz/ncDyy55PUgt4Y=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=jHO1kjw/MmzdY5flF6OPjb7MPhoO+NCk4394oVnDoIsdo1DwpWUej/AuU47WekaHt Olu3R8nH3Eg1Euc591A3ONMJ6V4uvlhDrZq7eQUFMPD7X9ElvEELTquCygOnYjomqz cTfl+0U+U6MXg0RbaPMGkx/9+F+J/yku9PHGwv9jlEvsB/uO96T3f+/6K5lOGPlhOr qqFw7uuBGrfrtEELudCIVNbMDgdmvpyRPK7I7cO3KSRc6P8ImtxbcjUh0GR7yBPq8j NH1fwihsG4XIk9+gwmdzgvD6bCI4PZb0BwfTwyGAKMCYOT7Nm4LViXjVzPZok8ZGhx LxVUL2o1CcB7g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QDdTR3LD1z6tsj; Sun, 7 May 2023 10:52:11 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <878re1i70u.fsf@hyperspace> (Tony Zorman's message of "Sat, 06 May 2023 21:39:29 +0200") References: <87zgb6uk2r.fsf@hyperspace> <87mt36uwl8.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> <87wn1mlmwx.fsf@posteo.net> <83v8h6hb2q.fsf@gnu.org> <87wn1lguqt.fsf@posteo.net> <878re1i70u.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 Date: Sun, 07 May 2023 08:52:11 +0000 Message-ID: <87cz3cfrr8.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 Sat, May 06 2023 18:50, Philip Kaludercic wrote: >> Eli Zaretskii writes: >>> I understand that in most cases >>> users will want to install the latest, >> >> I don't know if that is the case. I might be wrong that the revision of >> the latest release is a good default? Tony, do you think we should add >> a user-option to regulate this behaviour. > > It's certainly my default to install the latest commit of a package > instead of the latest release. I don't know how general this desire is > among other people, but an option for controlling the specific behaviour > sounds great in either case. OK, so it might make sense to address this at a later point with a another patch. For now, what issues remain to be resolved before these patches can be applied? -- Philip Kaludercic From unknown Sat Jun 14 04:56:37 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#60418: closed (Re: bug#60418: [PATCH] Add :vc keyword to use-package) Message-ID: References: <87zg649iqf.fsf@posteo.net> <87zgb6uk2r.fsf@hyperspace> X-Gnu-PR-Message: they-closed 60418 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 60418@debbugs.gnu.org Date: Tue, 16 May 2023 19:31:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1684265462-22898-1" This is a multi-part message in MIME format... ------------=_1684265462-22898-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #60418: [PATCH] Add :vc keyword to use-package=20 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 60418@debbugs.gnu.org. --=20 60418: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60418 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1684265462-22898-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 60418-done) by debbugs.gnu.org; 16 May 2023 19:30:58 +0000 Received: from localhost ([127.0.0.1]:48113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz0Nu-0005x4-3c for submit@debbugs.gnu.org; Tue, 16 May 2023 15:30:58 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz0Nr-0005wr-AT for 60418-done@debbugs.gnu.org; Tue, 16 May 2023 15:30:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C998A240123 for <60418-done@debbugs.gnu.org>; Tue, 16 May 2023 21:30:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1684265449; bh=5LJXLKFCiBMXRk3oOp2/yj6WzPvpd8znxkXpAKD3HCc=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=bfnxzzNuXanzbukVTUzKZpF8dyfHg7pGPCuM6u9EOSuxXJwcOoWbaizTUin5y5SWd hfV2CLMsAXqqeMCJfFsC+QPsZAIQrwLb08b7k3LG1/FMbHnVbfgG3744O9RenYFYqZ j/5KVZD7hLUoE52T8DK3Hj5aQIWhtWociZQ69OltsMdusFSlQDFQLZyBj/DoPLxFT8 ez/7U/BukPEigVnW/1M7BSNkRFcVyLRCrz6WcDAUCCQD4rrFAp8tGjQSgaxtghrwpB 1fStMd1TrHwCZniKPP30iBiXGwXiQlVOWMmLhkZI+MKnRTKgKLirqY6K+Y3rjGiC4h FL7rRNqF/5Ljw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QLRD86wYBz9rxH; Tue, 16 May 2023 21:30:48 +0200 (CEST) From: Philip Kaludercic To: Tony Zorman Subject: Re: bug#60418: [PATCH] Add :vc keyword to use-package In-Reply-To: <87cz3cfrr8.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 07 May 2023 10:52:11 +0200") References: <87zgb6uk2r.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> <87wn1mlmwx.fsf@posteo.net> <83v8h6hb2q.fsf@gnu.org> <87wn1lguqt.fsf@posteo.net> <878re1i70u.fsf@hyperspace> <87cz3cfrr8.fsf@posteo.net> 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 Date: Tue, 16 May 2023 19:30:48 +0000 Message-ID: <87zg649iqf.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60418-done Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418-done@debbugs.gnu.org, stefankangas@gmail.com 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 (---) Philip Kaludercic writes: > Tony Zorman writes: > >> On Sat, May 06 2023 18:50, Philip Kaludercic wrote: >>> Eli Zaretskii writes: >>>> I understand that in most cases >>>> users will want to install the latest, >>> >>> I don't know if that is the case. I might be wrong that the revision of >>> the latest release is a good default? Tony, do you think we should add >>> a user-option to regulate this behaviour. >> >> It's certainly my default to install the latest commit of a package >> instead of the latest release. I don't know how general this desire is >> among other people, but an option for controlling the specific behaviour >> sounds great in either case. > > OK, so it might make sense to address this at a later point with a > another patch. > > For now, what issues remain to be resolved before these patches can be > applied? Reviewing the thread, I think everything was ready (aside from a few things that I promised to take care of), so I've pushed the change to master. Thank you for your contribution! ------------=_1684265462-22898-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Dec 2022 07:03:38 +0000 Received: from localhost ([127.0.0.1]:33435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pB9QX-0006BH-6M for submit@debbugs.gnu.org; Fri, 30 Dec 2022 02:03:38 -0500 Received: from lists.gnu.org ([209.51.188.17]:57300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAxse-00089q-6V for submit@debbugs.gnu.org; Thu, 29 Dec 2022 13:43:53 -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 1pAxse-0008Bw-0r for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:43:52 -0500 Received: from mout-p-201.mailbox.org ([80.241.56.171]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pAxsa-0006qQ-FP for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 13:43:51 -0500 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 ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4NjcjT5KXkz9sJ4; Thu, 29 Dec 2022 19:43:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1672339421; 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=YiIXfIu43xCINmYsoIp3GeymYYwMrfCDkJYdYJ282gQ=; b=BIQNuzXKDFYUcdxzu42LitcwsggzN6sLanwendeHI6eU+zTcdiavgK7BU9dbh2kvVEDmFG 6rcD+4IItLGRANg6KTwkM1v+I1ZQB//kXYQ08leBEhbAHoaJdTNk8bW3fVZ/puXGxT245q XHFY9rGAX9gVYB6ZMaGwjr5qZEdwKRUF8cHnd+7gvuRkrB919DWY7Po12tp6eInGTAir+u H2xod5tSLvwXIUcxvkj9v7GvtT6T8sjZQaEc8n4v9z/lx/x7tEfVMMOFH+VhNUl240toJy UR71mUquAX1AmKX8xneObKoe57MDz5LobmpHxuUhyNUYJ2nys9YW3w8alyqUPw== From: Tony Zorman To: bug-gnu-emacs@gnu.org, Philip Kaludercic Subject: [PATCH] Add :vc keyword to use-package Date: Thu, 29 Dec 2022 19:43:40 +0100 Message-ID: <87zgb6uk2r.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: r97s8buk7qz4338ryg1p3ohda9r7f8pb X-MBO-RS-ID: ac99c518f7cc0d98c0a Received-SPF: pass client-ip=80.241.56.171; envelope-from=soliditsallgood@mailbox.org; helo=mout-p-201.mailbox.org X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 30 Dec 2022 02:03:35 -0500 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: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, this is a complete (and clean) rewrite of my package [vc-use-package], in order to properly integrate it with the Emacs core. Basically, it adds a new :vc keyword so one can leverage the 'package-vc-install*' function(s) from within a use-package declaration. For example, specifying (use-package foo :vc (:url "bar"))=20 would expand to (more or less, concentrating on the relevant part) (unless (package-installed-p 'foo) (package-vc-install '(foo :url "bar") nil)) This makes installing packages from remote sources a breeze. There is also support, via 'package-vc-install-from-checkout', for installing local packages by additionally specifying a load path: (use-package foo :vc bar ; optional name, use t or nil for foo :load-path "/path") =E2=87=94 (progn (eval-and-compile (add-to-list 'load-path <>)) (unless (package-installed-p 'bar) (package-vc-install-from-checkout <> "bar")) =E2=80=A6) I don't know what the policy here is regarding sending multiple patches in the same email, but since the second one is just adding documentation, I didn't deem it "worth" a second mail. Sorry (and do let me know!) if this is disruptive to anyone. Best, Tony [vc-use-package]: https://github.com/slotThe/vc-use-package --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Add-vc-keyword-to-use-package.patch >From 2aa5eed4186dab086684e8d0623b7f10cab07100 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 11:05:04 +0100 Subject: [PATCH 1/2] Add :vc keyword to use-package * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. (use-package-handler/:load-path): Insert 'load-path' into 'state'. (use-package-handler/:vc): Handler for the :vc keyword. (use-package-normalize--vc-arg): Normalization for more complex arguments to 'use-package-normalize/:vc', in order to make them compatible with the specification of 'package-vc-selected-packages'. (use-package-normalize/:vc): Normalizer for the :vc keyword. (use-package): Document :vc. * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): Do not ensure a package when :vc is used in the declaration. * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): (use-package-test/:vc-2): (use-package-test/:vc-3): (use-package-test/:vc-4): (use-package-test-normalize/:vc): Add tests for :vc. --- lisp/use-package/use-package-core.el | 73 +++++++++++++++++++++- lisp/use-package/use-package-ensure.el | 3 +- test/lisp/use-package/use-package-tests.el | 46 ++++++++++++++ 3 files changed, 119 insertions(+), 3 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 1dee08e55b..71a03c419a 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -76,6 +76,7 @@ use-package-keywords :functions :preface :if :when :unless + :vc :no-require :catch :after @@ -1151,7 +1152,8 @@ use-package-normalize/:load-path #'use-package-normalize-paths)) (defun use-package-handler/:load-path (name _keyword arg rest state) - (let ((body (use-package-process-keywords name rest state))) + (let ((body (use-package-process-keywords name rest + (plist-put state :load-path arg)))) (use-package-concat (mapcar #'(lambda (path) `(eval-and-compile (add-to-list 'load-path ,path))) @@ -1577,6 +1579,72 @@ use-package-handler/:config (when use-package-compute-statistics `((use-package-statistics-gather :config ',name t)))))) +;;;; :vc + +(defun use-package-handler/:vc (name _keyword arg rest state) + "Generate code for the :vc keyword." + (pcase-let ((body (use-package-process-keywords name rest state)) + (local-path (car (plist-get state :load-path))) + (`(,name ,opts ,rev) arg)) + (use-package-concat + `((unless (package-installed-p ',name) + ,(if local-path + `(package-vc-install-from-checkout ,local-path ,(symbol-name name)) + `(package-vc-install ',(cons name opts) ,rev)))) + body))) + +(defun use-package-normalize--vc-arg (arg) + "Normalize possible arguments to the :vc keyword. +ARG is a cons-cell of approximately the form that +`package-vc-selected-packages' accepts, plus an additional `:rev' +keyword. + +Returns a list (NAME SPEC REV), where (NAME . SPEC) is compliant +with `package-vc-selected-packages' and REV is a (possibly nil) +revision." + (cl-flet* ((mk-string (s) + (if (stringp s) s (symbol-name s))) + (mk-sym (s) + (if (stringp s) (intern s) s)) + (normalize (k v) + (when v + (pcase k + (:vc-backend (mk-sym v)) + (:rev (if (eq v :last-release) v (mk-string v))) + (_ (mk-string v)))))) + (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-backend :rev)) + (`(,name . ,opts) arg)) + (if (stringp opts) ; (NAME . VERSION-STRING) ? + (list name opts) + ;; Error handling + (cl-loop for (k _) on opts by #'cddr + if (not (member k valid-kws)) + do (use-package-error + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" + k valid-kws))) + ;; Actual normalization + (list name + (cl-loop for (k v) on opts by #'cddr + if (not (eq k :rev)) + nconc (list k (normalize k v))) + (normalize :rev (plist-get opts :rev))))))) + +(defun use-package-normalize/:vc (name _keyword args) + (let ((arg (car args))) + (pcase arg + ((or 'nil 't) (list name)) ; guess name + ((pred symbolp) (list arg)) ; use this name + ((pred stringp) (list name arg)) ; version string + guess name + ((pred plistp) ; plist + guess name + (use-package-normalize--vc-arg (cons name arg))) + (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name + (pred stringp))) + (use-package-normalize--vc-arg arg)) + (_ (use-package-error "Unrecognised argument to :vc.\ + The keyword wants an argument of nil, t, a name of a package,\ + or a cons-cell as accepted by `package-vc-selected-packages', where \ + the accepted plist is augmented by a `:rev' keyword."))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; The main macro @@ -1666,7 +1734,8 @@ use-package (compare with `custom-set-variables'). :custom-face Call `custom-set-faces' with each face definition. :ensure Loads the package using package.el if necessary. -:pin Pin the package to an archive." +:pin Pin the package to an archive. +:vc Integration with `package-vc.el'." (declare (indent defun)) (unless (memq :disabled args) (macroexp-progn diff --git a/lisp/use-package/use-package-ensure.el b/lisp/use-package/use-package-ensure.el index dae0312dba..27d4f5ad4f 100644 --- a/lisp/use-package/use-package-ensure.el +++ b/lisp/use-package/use-package-ensure.el @@ -182,7 +182,8 @@ use-package-ensure-elpa ;;;###autoload (defun use-package-handler/:ensure (name _keyword ensure rest state) - (let* ((body (use-package-process-keywords name rest state))) + (let* ((body (use-package-process-keywords name rest state)) + (ensure (unless (plist-member rest :vc) ensure))) ;; We want to avoid installing packages when the `use-package' macro is ;; being macro-expanded by elisp completion (see `lisp--local-variables'), ;; but still install packages when byte-compiling, to avoid requiring diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index e4586b04f2..4110f3a567 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -1951,6 +1951,52 @@ bind-key/845 (should (eq (nth 1 binding) 'ignore)) (should (eq (nth 2 binding) nil)))) +(ert-deftest use-package-test/:vc-1 () + (match-expansion + (use-package foo :vc (:url "bar")) + `(unless (package-installed-p 'foo) + (package-vc-install '(foo :url "bar") nil)))) + +(ert-deftest use-package-test/:vc-2 () + (match-expansion + (use-package foo + :vc (baz . (:url "baz" :vc-backend "Git" + :main-file qux.el :rev "rev-string"))) + `(unless (package-installed-p 'baz) + (package-vc-install '(baz :url "baz" :vc-backend Git :main-file "qux.el") + "rev-string")))) + +(ert-deftest use-package-test/:vc-3 () + (match-expansion + (use-package foo :vc (bar . "baz")) + `(unless (package-installed-p 'bar) + (package-vc-install '(bar . "baz") nil)))) + +(ert-deftest use-package-test/:vc-4 () + (let ((load-path? '(pred (apply-partially + #'string= + (expand-file-name "bar" user-emacs-directory))))) + (match-expansion + (use-package foo :vc other-name :load-path "bar") + `(progn (eval-and-compile + (add-to-list 'load-path ,load-path?)) + (unless (package-installed-p 'other-name) + (package-vc-install-from-checkout ,load-path? "other-name")))))) + +(ert-deftest use-package-test-normalize/:vc () + (should (equal '(foo "version-string") + (use-package-normalize/:vc 'foo :vc '("version-string")))) + (should (equal '(bar "version-string") + (use-package-normalize/:vc 'foo :vc '((bar . "version-string"))))) + (should (equal '(foo (:url "bar") "baz") + (use-package-normalize/:vc 'foo :vc '((:url "bar" :rev "baz"))))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc '(t)))) + (should (equal '(foo) + (use-package-normalize/:vc 'foo :vc nil))) + (should (equal '(bar) + (use-package-normalize/:vc 'foo :vc '(bar))))) + ;; Local Variables: ;; no-byte-compile: t ;; no-update-autoloads: t -- 2.39.0 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0002-Document-use-package-s-vc-keyword.patch Content-Transfer-Encoding: quoted-printable >From 9e54b103366aaef8e303bf65787ad841c56483d1 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 29 Dec 2022 12:23:56 +0100 Subject: [PATCH 2/2] ; Document use-package's :vc keyword * doc/misc/use-package.texi (Installing packages): (Install package): Add documentation for :vc and link to the related chapter in the Emacs manual. * etc/NEWS: Mention :vc keyword --- doc/misc/use-package.texi | 40 +++++++++++++++++++++++++++++++++++++-- etc/NEWS | 10 ++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index c587d23d74..a4abbb77f9 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi @@ -1564,8 +1564,10 @@ Installing packages (@pxref{Package Installation,,, emacs, GNU Emacs Manual}). The @code{use-package} macro provides the @code{:ensure} and @code{:pin} keywords that interface with that package manager to automatically -install packages. This is particularly useful if you use your init -file on more than one system. +install packages. Further, the @code{:vc} keyword may be used to +control how package sources are fetched (@pxref{Fetching Package +Sources,,, emacs, GNU Emacs Manual}). This is particularly useful if +you use your init file on more than one system. =20 @menu * Install package:: @@ -1617,6 +1619,40 @@ Install package You can override the above setting for a single package by adding @w{@code{:ensure nil}} to its declaration. =20 +@findex :vc +The @code{:vc} keyword can be used to control how packages are +fetched. It accepts the same arguments as +@code{package-vc-selected-packages}, except that a name need not +explicitly given: it is inferred from the declaration. Further, the +accepted property list is augmented by a @code{:rev} keyword, which +has the same shape as the @code{REV} argument to +@code{package-vc-install}. + +For example, + +@lisp +@group +(use-package foo + :vc (:url "https://bar.com/foo")) +@end group +@end lisp + +would try=E2=80=94by invoking @code{package-vc-install}=E2=80=94to install= 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: + +@lisp +@group +(use-package foo + :vc t + :load-path "/path/to/foo/) +@end group +@end lisp + +The above dispatches to @code{package-vc-install-from-checkout}. + @node Pinning packages @section Pinning packages using @code{:pin} @cindex installing package from specific archive diff --git a/etc/NEWS b/etc/NEWS index 83aa81eb4b..d8e8ed0dd2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -108,6 +108,16 @@ This command either fills a single paragraph in a defu= n, such as a doc-string, or a comment, or (re)indents the surrounding defun if point is not in a comment or a string. It is by default bound to 'M-q' in 'prog-mode' and all its descendants. + +** use-package + +*** New ':vc' keyword +This keyword enables the user to control how packages are fetched by +utilising 'package-vc.el'. By default, it relays its arguments to +'package-vc-install', but=E2=80=94when combined with the ':load-path' +keyword=E2=80=94it can also call upon 'package-vc-install-from-checkout' +instead. + * New Modes and Packages in Emacs 30.1 =20 --=20 2.39.0 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- ------------=_1684265462-22898-1-- From unknown Sat Jun 14 04:56:37 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: Ruijie Yu Subject: bug#61937: closed (Re: bug#60418: [PATCH] Add :vc keyword to use-package) Message-ID: References: <87zg649iqf.fsf@posteo.net> X-Gnu-PR-Message: they-closed 61937 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 61937@debbugs.gnu.org Date: Tue, 16 May 2023 19:31:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1684265462-22898-3" This is a multi-part message in MIME format... ------------=_1684265462-22898-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #60418: 29.0.60; [FR] use-package :ensure to allow vc sources 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 61937@debbugs.gnu.org. --=20 60418: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60418 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1684265462-22898-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 60418-done) by debbugs.gnu.org; 16 May 2023 19:30:58 +0000 Received: from localhost ([127.0.0.1]:48113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz0Nu-0005x4-3c for submit@debbugs.gnu.org; Tue, 16 May 2023 15:30:58 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz0Nr-0005wr-AT for 60418-done@debbugs.gnu.org; Tue, 16 May 2023 15:30:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C998A240123 for <60418-done@debbugs.gnu.org>; Tue, 16 May 2023 21:30:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1684265449; bh=5LJXLKFCiBMXRk3oOp2/yj6WzPvpd8znxkXpAKD3HCc=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=bfnxzzNuXanzbukVTUzKZpF8dyfHg7pGPCuM6u9EOSuxXJwcOoWbaizTUin5y5SWd hfV2CLMsAXqqeMCJfFsC+QPsZAIQrwLb08b7k3LG1/FMbHnVbfgG3744O9RenYFYqZ j/5KVZD7hLUoE52T8DK3Hj5aQIWhtWociZQ69OltsMdusFSlQDFQLZyBj/DoPLxFT8 ez/7U/BukPEigVnW/1M7BSNkRFcVyLRCrz6WcDAUCCQD4rrFAp8tGjQSgaxtghrwpB 1fStMd1TrHwCZniKPP30iBiXGwXiQlVOWMmLhkZI+MKnRTKgKLirqY6K+Y3rjGiC4h FL7rRNqF/5Ljw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QLRD86wYBz9rxH; Tue, 16 May 2023 21:30:48 +0200 (CEST) From: Philip Kaludercic To: Tony Zorman Subject: Re: bug#60418: [PATCH] Add :vc keyword to use-package In-Reply-To: <87cz3cfrr8.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 07 May 2023 10:52:11 +0200") References: <87zgb6uk2r.fsf@hyperspace> <83ttxd8k1z.fsf@gnu.org> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> <87wn1mlmwx.fsf@posteo.net> <83v8h6hb2q.fsf@gnu.org> <87wn1lguqt.fsf@posteo.net> <878re1i70u.fsf@hyperspace> <87cz3cfrr8.fsf@posteo.net> 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 Date: Tue, 16 May 2023 19:30:48 +0000 Message-ID: <87zg649iqf.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60418-done Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418-done@debbugs.gnu.org, stefankangas@gmail.com 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 (---) Philip Kaludercic writes: > Tony Zorman writes: > >> On Sat, May 06 2023 18:50, Philip Kaludercic wrote: >>> Eli Zaretskii writes: >>>> I understand that in most cases >>>> users will want to install the latest, >>> >>> I don't know if that is the case. I might be wrong that the revision of >>> the latest release is a good default? Tony, do you think we should add >>> a user-option to regulate this behaviour. >> >> It's certainly my default to install the latest commit of a package >> instead of the latest release. I don't know how general this desire is >> among other people, but an option for controlling the specific behaviour >> sounds great in either case. > > OK, so it might make sense to address this at a later point with a > another patch. > > For now, what issues remain to be resolved before these patches can be > applied? Reviewing the thread, I think everything was ready (aside from a few things that I promised to take care of), so I've pushed the change to master. Thank you for your contribution! ------------=_1684265462-22898-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 3 Mar 2023 15:06:05 +0000 Received: from localhost ([127.0.0.1]:33713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY6yv-0002sU-5J for submit@debbugs.gnu.org; Fri, 03 Mar 2023 10:06:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:53984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY6yp-0002sE-Dl for submit@debbugs.gnu.org; Fri, 03 Mar 2023 10:06:00 -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 1pY6yp-00018P-0m for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 10:05:55 -0500 Received: from netyu.xyz ([152.44.41.246] helo=mail.netyu.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY6yi-0002GR-FT for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 10:05:54 -0500 Received: from fw.net.yu.netyu.xyz ( [222.248.4.98]) by netyu.xyz (OpenSMTPD) with ESMTPSA id e01b794c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 3 Mar 2023 15:05:40 +0000 (UTC) User-agent: mu4e 1.8.14; emacs 29.0.60 From: Ruijie Yu To: bug-gnu-emacs@gnu.org Subject: 29.0.60; [FR] use-package :ensure to allow vc sources Date: Fri, 03 Mar 2023 22:57:36 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=152.44.41.246; envelope-from=ruijie@netyu.xyz; helo=mail.netyu.xyz X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) 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: -2.4 (--) I have been using straight.el [1] before `use-package' was taken into emacs.git, as I needed to use some packages not from any elpa source but from vc sources. I recently noticed the function `package-vc-install' has been introduced into 29, and would like to have `use-package' use it in its :ensure form. An analogous version from straight.el has already been made available, which looks like the following: (use-package foo :straight (foo :repo "https://path.to/foo.el" :type git)) My hope is to extend :ensure form so that a similar specification can be supplied to install packages directly from vc sources. [1]: https://github.com/radian-software/straight.el -- Best, RY ------------=_1684265462-22898-3-- From unknown Sat Jun 14 04:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60418: [PATCH] Add :vc keyword to use-package Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 May 2023 05:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418-done@debbugs.gnu.org, stefankangas@gmail.com Received: via spool by 60418-done@debbugs.gnu.org id=D60418.168430217426470 (code D ref 60418); Wed, 17 May 2023 05:43:01 +0000 Received: (at 60418-done) by debbugs.gnu.org; 17 May 2023 05:42:54 +0000 Received: from localhost ([127.0.0.1]:48557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz9w6-0006ss-E9 for submit@debbugs.gnu.org; Wed, 17 May 2023 01:42:54 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:60934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz9w3-0006sa-1B for 60418-done@debbugs.gnu.org; Wed, 17 May 2023 01:42:53 -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 ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4QLhpB64C0z9spK; Wed, 17 May 2023 07:42:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1684302162; 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=Qm/Cfo9K0P7HByi3M8pS17WgR0mflLhVhyq+e7AJ/uo=; b=c2CRQVhqjCzRQUbgN2Q8Gcy6GZrocaYMITpRIKqf3EafkrP70IS+zkgS3nR395dfPRaz6Z 6zJWejO8Km3W0sW1giJ6D5lkPFNZm8cnU0AI1J/B0PuxPGQzp9blFhGM/JWzPiAnfX8fMo BL8FoL/LQ8vURdsGcc49rPm3fuP+VAF+7JXci5cZBFNTrSg7sQeZDr2NCDJQxCvd8C7dd/ nHkfYnT8kiFa7hocecRP6Bdi+wQdf+Rajk+Dm1oBKA/rddP0qwMo9aMNF+sGTCl4SdQmMW 8rYVaD3w3TPtTQ3EQOkAUjM+MH5IfGYQh/7s/jMg1+1wQC1gdLUROT3T2KQYsA== From: Tony Zorman In-Reply-To: <87zg649iqf.fsf@posteo.net> References: <87zgb6uk2r.fsf@hyperspace> <87v8hrn56l.fsf@hyperspace> <87cz3w2lvb.fsf@posteo.net> <87jzy3ku6u.fsf@hyperspace> <87bkje93ou.fsf@posteo.net> <87y1mhihhy.fsf@hyperspace> <87ildbet2d.fsf@hyperspace> <831qjyoqj5.fsf@gnu.org> <87h6suolt2.fsf@hyperspace> <83ttwun4q4.fsf@gnu.org> <87o7n0fr9e.fsf@hyperspace> <878re3cqro.fsf@posteo.net> <83ild7jq5c.fsf@gnu.org> <87v8h7ba55.fsf@posteo.net> <83zg6ji806.fsf@gnu.org> <87wn1mlmwx.fsf@posteo.net> <83v8h6hb2q.fsf@gnu.org> <87wn1lguqt.fsf@posteo.net> <878re1i70u.fsf@hyperspace> <87cz3cfrr8.fsf@posteo.net> <87zg649iqf.fsf@posteo.net> Date: Wed, 17 May 2023 07:42:35 +0200 Message-ID: <875y8rzf78.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-META: rz7r6bmem47w8qrwwrabdc731x8baxh3 X-MBO-RS-ID: 4a258d490b93a7d1f3f X-Spam-Score: -0.7 (/) 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.7 (-) On Tue, May 16 2023 19:30, Philip Kaludercic wrote: > Reviewing the thread, I think everything was ready (aside from a few > things that I promised to take care of), so I've pushed the change to > master. Thank you for your contribution! Fantastic; thanks to you and Eli for guiding this along! -- Tony Zorman | https://tony-zorman.com/