GNU bug report logs -
#60418
[PATCH] Add :vc keyword to use-package
Previous Next
Reported by: Tony Zorman <soliditsallgood <at> mailbox.org>
Date: Fri, 30 Dec 2022 07:04:03 UTC
Severity: normal
Tags: patch
Merged with 61937
Found in version 29.0.60
Done: Philip Kaludercic <philipk <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
Message #85 received at 60418 <at> debbugs.gnu.org (full text, mbox):
On Sun, Apr 23 2023 12:35, Philip Kaludercic wrote:
> Tony Zorman <soliditsallgood <at> mailbox.org> 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—maybe 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…-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).
>
> 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—global variables,
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!
--
Tony Zorman | https://tony-zorman.com/
This bug report was last modified 2 years and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.