From: Eli Zaretskii <eliz@gnu.org>
To: "J.P." <jp@neverwas.me>
Cc: stefankangas@gmail.com, 60730@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 [thread overview]
Message-ID: <838rhmab8f.fsf@gnu.org> (raw)
In-Reply-To: <87k016y7o9.fsf@neverwas.me> (jp@neverwas.me)
> From: "J.P." <jp@neverwas.me>
> Cc: 60730@debbugs.gnu.org, stefankangas@gmail.com
> Date: Sat, 28 Jan 2023 07:56:22 -0800
>
> Eli Zaretskii <eliz@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?
next prev parent reply other threads:[~2023-01-28 16:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 13:50 bug#60730: 29.0.60; Free variable with :buffer keyword in ert-with-temp-file J.P.
2023-01-13 1:56 ` Stefan Kangas
2023-01-28 14:13 ` J.P.
2023-01-28 15:03 ` Eli Zaretskii
2023-01-28 15:56 ` J.P.
2023-01-28 16:13 ` Eli Zaretskii [this message]
2023-01-29 2:00 ` J.P.
2023-01-29 4:35 ` J.P.
2023-01-29 6:38 ` Eli Zaretskii
2023-01-29 14:08 ` J.P.
2023-01-29 15:10 ` Eli Zaretskii
2023-01-29 16:18 ` J.P.
2023-01-29 6:28 ` Eli Zaretskii
2023-01-29 9:56 ` Andreas Schwab
2023-01-29 10:29 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=838rhmab8f.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=60730@debbugs.gnu.org \
--cc=jp@neverwas.me \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.