GNU bug report logs - #67180
30.0.50; 'pp-to-string' emits extra newline

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Tue, 14 Nov 2023 20:14:02 UTC

Severity: normal

Found in version 30.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 67180 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 67180 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#67180: 30.0.50; 'pp-to-string' emits extra newline
Date: Wed, 15 Nov 2023 14:10:39 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> On Emacs 29 and earlier, with `-Q`, we have:
>>> 
>>> (pp-to-string "foo")
>>>   => "\"foo\""
>>> 
>>> On master with `-Q`, we get an extra newline at the end of the string:
>>> 
>>> (pp-to-string "foo")
>>>   => "\"foo\"
>>> "
>
> Is that a problem?

FWIW, I think that this change is for the better, but it is
incompatible, and sadly it broke `agda2-mode`.  (In some sense this
probably Agda's "fault", because I don't really understand why they're
using `pp-to-string` the way they do.)  My suggestion was simply to
explicitly mention this new behavior in NEWS or some such.

> I also see that the old `pp-to-string` added that same extra newline for
> slightly more complex input:
>
>     ELISP> (pp-to-string '("foo"))
>     "(\"foo\")
>     "
>     ELISP> 
>
>> Stefan, is this due to your changes in pp?
>
> Yes.
>
>
>         Stefan




This bug report was last modified 1 year and 191 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.