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: Mon, 24 Apr 2023 14:36:57 +0200 Message-ID: <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> 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="21827"; 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 Mon Apr 24 14:38:41 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 1pqvSq-0005T4-UQ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Apr 2023 14:38:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqvSQ-00069c-3Z; Mon, 24 Apr 2023 08:38:14 -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 1pqvSF-00068v-O1 for bug-gnu-emacs@gnu.org; Mon, 24 Apr 2023 08:38:09 -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 1pqvSF-0005zM-Fy for bug-gnu-emacs@gnu.org; Mon, 24 Apr 2023 08:38:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pqvSF-0004SN-0w for bug-gnu-emacs@gnu.org; Mon, 24 Apr 2023 08:38:03 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 60418-submit@debbugs.gnu.org id=B60418.168233983017051 (code B ref 60418); Mon, 24 Apr 2023 12:38:02 +0000 Original-Received: (at 60418) by debbugs.gnu.org; 24 Apr 2023 12:37:10 +0000 Original-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 Original-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 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-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== In-Reply-To: <87bkje93ou.fsf@posteo.net> X-MBO-RS-ID: 1581c334dbc0bc0beba X-MBO-RS-META: smc68fizm58p4i8nyd84w7fu6aui3edq 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:260569 Archived-At: 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/