all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: iarchivedmywholelife@gmail.com, 69168@debbugs.gnu.org
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	[thread overview]
Message-ID: <86bk85xd21.fsf@gnu.org> (raw)
In-Reply-To: <87v86dt9xl.fsf@web.de> (bug-gnu-emacs@gnu.org)

> 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" <bug-gnu-emacs@gnu.org>
> 
> 
> Michael Heerdegen <michael_heerdegen@web.de> 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 <michael_heerdegen@web.de>
> 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?





  reply	other threads:[~2024-02-25  6:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 19:19 bug#69168: [BUG] 30.0.50; pp-emacs-lisp-code produces invalid elisp for backquoted forms No Wayman
2024-02-16  2:11 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25  5:00   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25  6:39     ` Eli Zaretskii [this message]
2024-02-25  8:02       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-29  2:30         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-09  8:49           ` Eli Zaretskii
2024-03-09 15:34             ` Drew Adams
2024-03-11  4:48             ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25 15:08       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=86bk85xd21.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=69168@debbugs.gnu.org \
    --cc=iarchivedmywholelife@gmail.com \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /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.