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#69168: [BUG] 30.0.50; pp-emacs-lisp-code produces invalid elisp for backquoted forms Date: Sun, 25 Feb 2024 08:39:34 +0200 Message-ID: <86bk85xd21.fsf@gnu.org> References: <877cj5y1qg.fsf@gmail.com> <87mss1nono.fsf@web.de> <87v86dt9xl.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11083"; mail-complaints-to="usenet@ciao.gmane.io" Cc: iarchivedmywholelife@gmail.com, 69168@debbugs.gnu.org To: Michael Heerdegen , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 25 07:57:05 2024 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 1re8Rb-0002VT-Hc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Feb 2024 07:57:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1re8RE-00068R-PO; Sun, 25 Feb 2024 01:56:40 -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 1re8RC-000688-B7 for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 01:56:38 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1re8RC-0005MR-1N for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 01:56:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1re8Ra-0004Ub-9b for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 01:57: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: Sun, 25 Feb 2024 06:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69168 X-GNU-PR-Package: emacs Original-Received: via spool by 69168-submit@debbugs.gnu.org id=B69168.170884418517162 (code B ref 69168); Sun, 25 Feb 2024 06:57:02 +0000 Original-Received: (at 69168) by debbugs.gnu.org; 25 Feb 2024 06:56:25 +0000 Original-Received: from localhost ([127.0.0.1]:47326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1re8Qz-0004Sk-14 for submit@debbugs.gnu.org; Sun, 25 Feb 2024 01:56:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1re8Qu-0004S7-IA for 69168@debbugs.gnu.org; Sun, 25 Feb 2024 01:56:21 -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 1re8Ai-0002Qg-H8; Sun, 25 Feb 2024 01:39:36 -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=7jR5aiPJ/KLpztjpaCURY0qIQpqC+NRZmHDyM+9uNJ0=; b=EGLhGOc6+2Eo FTUb6dPkBPIb2uOI907J1SfM3Hh0RcUVbWar5u7JZEtamIoIcmclXdUWKc4ERrSUWzNpJZp2MjthD h7GV2t03G5m9Us71c2s1MXZ4cJoEUa04Tw9sy5ij+4un21TFI1KWk/VppI5bYT4NysAYn1Lxetb3X bocjcwasHNEyYSdvDknZQ7dK+kHk+z0p/7dLmnpCu+9TgO/hwDkllQZzWsQ8VtU+hVKA1DMX+V2eE iRM4PJQ5B21BtJ3HCtIr03izN3wjqDpn/Eo98oElDUIr/6ga2ktBVoPUtHF4OeLmxq4ycoQM5RS83 F1FItIf/USH/48NCbHWThQ==; In-Reply-To: <87v86dt9xl.fsf@web.de> (bug-gnu-emacs@gnu.org) 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:280594 Archived-At: > Cc: 69168@debbugs.gnu.org > Date: Sun, 25 Feb 2024 06:00:38 +0100 > From: Michael Heerdegen via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > Michael Heerdegen writes: > > > The second problem is that the recursive calls of `pp--insert-lisp' > > print symbols using `princ' (i.e., without quoting), so even the list > > representation is wrong. > > I think we should print any symbol using `prin1', not `princ' - printing > symbols that need quoting without quoting is not useful: > > > From f493708a456608f59b29c3f2308ecc51177667ec Mon Sep 17 00:00:00 2001 > From: Michael Heerdegen > Date: Sun, 18 Feb 2024 02:48:15 +0100 > Subject: [PATCH] Fix pp-emacs-lisp-code printing of symbols > > * lisp/emacs-lisp/pp.el (pp--insert-lisp): Print symbols > readably (bug#69168). > --- > lisp/emacs-lisp/pp.el | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el > index 1d722051406..944dd750839 100644 > --- a/lisp/emacs-lisp/pp.el > +++ b/lisp/emacs-lisp/pp.el > @@ -458,6 +458,8 @@ pp--insert-lisp > (string > (let ((print-escape-newlines t)) > (prin1 sexp (current-buffer)))) > + (symbol > + (prin1 sexp (current-buffer))) > (otherwise (princ sexp (current-buffer))))) > > (defun pp--format-vector (sexp) > -- > 2.39.2 Thanks. Stefan, any comments?