From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tony Zorman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60418: [PATCH] Add :vc keyword to use-package Date: Tue, 02 May 2023 16:36:37 +0200 Message-ID: <87ednyol56.fsf@hyperspace> 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> Reply-To: Tony Zorman Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23216"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , felician.nemeth@gmail.com, 60418@debbugs.gnu.org, stefankangas@gmail.com To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 02 16:37:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ptr82-0005nx-75 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 May 2023 16:37:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptr7o-0002CV-0g; Tue, 02 May 2023 10:37:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptr7m-0002C4-5J for bug-gnu-emacs@gnu.org; Tue, 02 May 2023 10:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ptr7l-0006e2-Qz for bug-gnu-emacs@gnu.org; Tue, 02 May 2023 10:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ptr7l-000676-KD for bug-gnu-emacs@gnu.org; Tue, 02 May 2023 10:37:01 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168303821623487 (code B ref 60418); Tue, 02 May 2023 14:37:01 +0000 Original-Received: (at 60418) by debbugs.gnu.org; 2 May 2023 14:36:56 +0000 Original-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 Original-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 Original-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== In-Reply-To: <87a5ynizwt.fsf@posteo.net> X-MBO-RS-META: bs8356rzr4gbizneguxa8m5rgkk4sa8o X-MBO-RS-ID: 775a9db862bfecdcd4f X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260933 Archived-At: 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/