Subject: bug#75775: closed (Re: bug#75775: 30.0.93; [PATCH] Restore the old behavior of `bookmark-write-file')

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 25 Jan 2025 14:00:03 +0000

Your bug report

#75775: 30.0.93; [PATCH] Restore the old behavior of `bookmark-write-file'

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
75775: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75775
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#75775: 30.0.93; [PATCH] Restore the old behavior of `bookmark-write-file'
From: Eli Zaretskii <[email-masked]>
To: Stefan Monnier <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sat, 25 Jan 2025 15:59:13 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Stefan Monnier <[email-masked]>
> Cc: Zhengyi Fu <[email-masked]>,  [email-masked]
> Date: Sat, 25 Jan 2025 07:18:43 -0500
> 
> > I'm not sure we should use such kludges just because the new default
> > changes the whitespace.  But if we do make any changes, we should do
> > it ASAP, since the change in pp's behavior was introduced in Emacs 30.
> >
> > Stefan, WDYT?
> 
> No specific opinion.  My understanding is that we should introduce some
> kind of `pp-fast` function, but in the mean time hacks like this patch
> seem fine to me.

Thanks, installed on the emacs-30 branch, and closing the bug.

Subject: 30.0.93; [PATCH] Restore the old behavior of `bookmark-write-file'
From: Zhengyi Fu <[email-masked]>
To: [email-masked]
Date: Thu, 23 Jan 2025 13:45:11 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

`pp' now defaults to fill the code to fit in `fill-column', which is
great.  However, this changed the bookmark format and made it less
human-readable and unfriendly to version control.   This small patch
restores the old behavior of `bookmark-write-file'.

>From f39460bf7de265fcbff23298f37e086106b9683e Mon Sep 17 00:00:00 2001
From: Zhengyi Fu <[email-masked]>
Date: Thu, 23 Jan 2025 13:35:16 +0800
Subject: [PATCH] Restore the old behavior of `bookmark-write-file'

---
 lisp/bookmark.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index b931a4ed2f5..cd59293e0a4 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1678,7 +1678,8 @@ bookmark-write-file
 	;; Rather than a single call to `pp' we make one per bookmark.
 	;; Apparently `pp' has a poor algorithmic complexity, so this
 	;; scales a lot better.  bug#4485.
-	(dolist (i bookmark-alist) (pp i (current-buffer)))
+	(let ((pp-default-function #'pp-28))
+	  (dolist (i bookmark-alist) (pp i (current-buffer))))
 	(insert ")\n")
 	;; Make sure the specified encoding can safely encode the
 	;; bookmarks.  If it cannot, suggest utf-8-emacs as default.
-- 
2.43.0