GNU bug report logs - #60730
29.0.60; Free variable with :buffer keyword in ert-with-temp-file

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: "J.P." <jp <at> neverwas.me>
Cc: stefankangas <at> gmail.com, 60730 <at> debbugs.gnu.org
Subject: bug#60730: 29.0.60; Free variable with :buffer keyword in ert-with-temp-file
Date: Sat, 28 Jan 2023 18:13:20 +0200
> From: "J.P." <jp <at> neverwas.me>
> Cc: 60730 <at> debbugs.gnu.org,  stefankangas <at> gmail.com
> Date: Sat, 28 Jan 2023 07:56:22 -0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Not sure if that's the right call, though. If this keyword is already
> >> seeing action in the wild, perhaps it's worth ensuring that its argument
> >> arrives unquoted? Or maybe another type check (to accompany the one for
> >> `name') would do?
> >
> > Can you show the results of macro-expansion both when coding has a
> > value and when it is nil (and then coding-system-for-write is nil or
> > has a non-nil value)?
> 
> `coding-system-for-write' nil, keyword nil
> 
>   (ert-with-temp-file myfile :coding nil)
>   (let* ((coding-system-for-write nil) ...)
> 
>   ;; keyword absent
> 
>   (ert-with-temp-file myfile)
>   (let* ((coding-system-for-write nil) ...)
> 
> `coding-system-for-write' nil, keyword non-nil
> 
>   (ert-with-temp-file myfile :coding utf-8)
>   (let* ((coding-system-for-write utf-8) ...)
> 
>   ;; keyword quoted
> 
>   (ert-with-temp-file myfile :coding 'utf-8)
>   (let* ((coding-system-for-write 'utf-8) ...)
> 
> `coding-system-for-write' non-nil, keyword nil
> 
>   (setq coding-system-for-write 'utf-8)
> 
>   (ert-with-temp-file myfile :coding nil)
>   (let* ((coding-system-for-write utf-8) ...)
> 
>   ;; keyword absent
> 
>   (ert-with-temp-file myfile myfile)
>   (let* ((coding-system-for-write utf-8) ...)
> 
> `coding-system-for-write' non-nil, keyword non-nil
> 
>   (setq coding-system-for-write 'utf-8)
> 
>   (ert-with-temp-file myfile :coding raw-text)
>   (let* ((coding-system-for-write raw-text) ...)
> 
>   ;; keyword quoted
> 
>   (ert-with-temp-file myfile :coding 'raw-text)
>   (let* ((coding-system-for-write 'raw-text) ...)

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.

Is the problem that a coding-system symbol is not quoted?




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.