From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <838rhmab8f.fsf@gnu.org> References: <87o7r5ji3q.fsf@neverwas.me> <874jsazqzz.fsf@neverwas.me> <83edreaehg.fsf@gnu.org> <87k016y7o9.fsf@neverwas.me> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12593"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, 60730@debbugs.gnu.org To: "J.P." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 28 17:14:20 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 1pLnqO-00036W-LL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Jan 2023 17:14:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLnq8-00023H-9K; Sat, 28 Jan 2023 11:14:04 -0500 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 1pLnq7-000237-BT for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2023 11:14:03 -0500 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 1pLnq6-0004Qh-U0 for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2023 11:14:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pLnq6-0003b7-Eo for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2023 11:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Jan 2023 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60730 X-GNU-PR-Package: emacs Original-Received: via spool by 60730-submit@debbugs.gnu.org id=B60730.167492242213790 (code B ref 60730); Sat, 28 Jan 2023 16:14:02 +0000 Original-Received: (at 60730) by debbugs.gnu.org; 28 Jan 2023 16:13:42 +0000 Original-Received: from localhost ([127.0.0.1]:41413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLnpl-0003aM-Sk for submit@debbugs.gnu.org; Sat, 28 Jan 2023 11:13:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLnpi-0003a2-7C for 60730@debbugs.gnu.org; Sat, 28 Jan 2023 11:13:40 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLnpc-0004OF-MP; Sat, 28 Jan 2023 11:13:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KC3kniPaFhHtjoKfj0oZvBrw2BvKoHJ6AoC0IEh0U0Q=; b=cl0cAX09EuYC IYEbx6RJOr+GfVqjrcH/Yid99V6D8Zw9nOaZQOQH5RMBwYfdvQqfjL41ipuNW4OPlxEnvyfaTyDaf bKT7OyNIaFHHWgaj6WN2SayxrrNu1zUgwQN1dhQFQvJ34dINMb9bgnmM+LGvEbMiemcEx44Cv0LrC Ay3tLVMNGmQdBtbySbQuWA1FgdP07skCkNjlmXhktI9oVS4asSbM3ZBIyTbzmtN4jebY4l+hBx2zM 7RyhXtuKHzSfEYB4pEAjwCP41n3zIJC5ujT/EuvPsEL3VtVGTkSZ5RQ/y3BBdzUBdpG28ia4cL0hG 7K9A78uJRuG0XeugH5AdFA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLnpc-00017K-0Z; Sat, 28 Jan 2023 11:13:32 -0500 In-Reply-To: <87k016y7o9.fsf@neverwas.me> (jp@neverwas.me) 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:254307 Archived-At: > From: "J.P." > Cc: 60730@debbugs.gnu.org, stefankangas@gmail.com > Date: Sat, 28 Jan 2023 07:56:22 -0800 > > Eli Zaretskii 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?