GNU bug report logs -
#60730
29.0.60; Free variable with :buffer keyword in ert-with-temp-file
Previous Next
Reported by: "J.P." <jp <at> neverwas.me>
Date: Wed, 11 Jan 2023 13:51:01 UTC
Severity: normal
Found in version 29.0.60
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #25 received at 60730 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
> Thanks, but I'm not sure I follow: coding-system's name should always
> be quoted, as it's a symbol. So why things like the below:
>
> (ert-with-temp-file myfile :coding raw-text)
>
> are relevant? AFAIU, they are a mistake: raw-text should be quoted,
> as in 'raw-text.
I shouldn't have included the keyword argument; it only muddies the
waters here. The correctness of the output, what we expect to see in the
expanded form, is of primary concern.
> Is the problem that a coding-system symbol is not quoted?
When the value of `coding-system-for-write' is non-nil, only quoting it
twice survives expansion:
(setq coding-system-for-write ''raw-text)
(ert-with-temp-file myfile)
-> (let* ((coding-system-for-write 'raw-text) ...)
Otherwise, we get a free variable:
(setq coding-system-for-write 'raw-text)
(ert-with-temp-file myfile)
-> (let* ((coding-system-for-write raw-text) ...)
BTW, I'm not setting `coding-system-for-write' myself. That's being done
by the diagnostic tool.
[flymake-ert-with-temp-file.png (image/png, attachment)]
This bug report was last modified 2 years and 169 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.