unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#67180: 30.0.50; 'pp-to-string' emits extra newline
@ 2023-11-14 20:12 Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-11-14 20:37 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-11-15 12:01 ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-11-14 20:12 UTC (permalink / raw)
  To: 67180


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\"
"

AFAICT this change in behavior breaks `agda2-mode` completely on master.
This happens because apparently `agda2-mode` uses `pp-to-string` to
quote strings before sending them to a REPL (that doesn't expect the
newline the middle of a command):

--8<---------------cut here---------------start------------->8---
(defun agda2-string-quote (s)
  "..."
  (let ((pp-escape-newlines t)
        (s2 (copy-sequence s)))
    (set-text-properties 0 (length s2) nil s2)
    (mapconcat 'agda2-char-quote (pp-to-string s2) "")))
                                 ^^^^^^^^^^^^^^^^^
--8<---------------cut here---------------end--------------->8---


In GNU Emacs 30.0.50 (build 24, x86_64-apple-darwin23.0.0, NS
 appkit-2487.00 Version 14.0 (Build 23A344)) of 2023-11-13





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-16 16:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-14 20:12 bug#67180: 30.0.50; 'pp-to-string' emits extra newline Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-14 20:37 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-15 12:01 ` Eli Zaretskii
2023-11-15 12:52   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-15 13:10     ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 14:16       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 15:34         ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 16:20           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).