GNU bug report logs -
#54612
29.0.50; eww-bookmarks data loss when print-length not nil
Previous Next
Reported by: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
Date: Mon, 28 Mar 2022 14:50:01 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54612 in the body.
You can then email your comments to 54612 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54612
; Package
emacs
.
(Mon, 28 Mar 2022 14:50:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 28 Mar 2022 14:50:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
In GNU Emacs 29.0.50 (build 1, powerpc64le-unknown-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
of 2022-02-27 built on orca.fitzsim.org
Repository revision: 6a10a3e8d489d7b4dcffd6b4c63cee77e73e2535
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux bookworm/sid
Configured using:
'configure --with-x-toolkit=lucid'
Somehow print-length got set to 10 globally -- I don't know who the
culprit was -- and I lost about 80 EWW bookmarks. I've looked around
and they seem to have been well and truly purged from this Emacs
session's memory. I'll have to restore from backups, I suppose.
When a bookmark is added, and print-length is less than the length of
eww-bookmarks, the contents of ~/.emacs.d/eww-bookmarks is truncated:
;; Auto-generated file; don't edit -*- mode: lisp-data -*-
((:url "" :title "" :time "")
[(- print-length 1) more items]
...)
I haven't investigated fully, but it seems like a terrible design that a
global variable like print-length can have influence over princ/print in
this way. This makes all printing fundamentally unreliable and subject
to data loss if some rogue package or the end user goes (setq
print-length <some small number>).
What about this to at least insulate eww-write-bookmarks from this
behaviour:
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 700a6c3e82..f5139819fb 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -2053,7 +2053,8 @@ eww-add-bookmark
(defun eww-write-bookmarks ()
(with-temp-file (expand-file-name "eww-bookmarks" eww-bookmarks-directory)
(insert ";; Auto-generated file; don't edit -*- mode: lisp-data -*-\n")
- (pp eww-bookmarks (current-buffer))))
+ (let ((print-length nil))
+ (pp eww-bookmarks (current-buffer)))))
(defun eww-read-bookmarks (&optional error-out)
"Read bookmarks from `eww-bookmarks'.
I'm not sure what a more general solution to the
print-length/print-level data loss problem could be.
Thomas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54612
; Package
emacs
.
(Tue, 29 Mar 2022 12:36:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 54612 <at> debbugs.gnu.org (full text, mbox):
Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:
> What about this to at least insulate eww-write-bookmarks from this
> behaviour:
Thanks, applied to Emacs 29 (along with a binding of print-level, which
has a similar issue).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 29.1, send any further explanations to
54612 <at> debbugs.gnu.org and Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 29 Mar 2022 12:36:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 27 Apr 2022 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 105 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.