bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12503: 24.2.50; `bookmark-write-file' should bind `print-circle' to


From: Drew Adams
Subject: bug#12503: 24.2.50; `bookmark-write-file' should bind `print-circle' to t
Date: Mon, 24 Sep 2012 09:11:36 -0700

Users can define their own bookmark types, which can store anything at
all in bookmark records, that is, any Lisp objects.
 
Such objects can contain circularities: one part referring to another
part or to the whole - IOW circular lists.
 
When `bookmark-write-file' writes a bookmark list to the bookmark file,
it takes care to bind `print-length' and `print-level' to nil, but it
does yet not bind `print-circle' to t.  It should do that as well.
 
The result currently is that a user's bookmark file can be corrupted,
becoming unreadable because it contains invalid Lisp `read' syntax.
 
I have seen this a couple of times now, with users of Bookmark+.
Bookmark+ does use bookmarks that have circular structure, and it saves
them correctly by binding `print-circle' to t.
 
A user can read such a bookmark file into vanilla Emacs, and s?he can
use the bookmarks there.  But if s?he then saves the file again, in
vanilla Emacs, the result is invalid Lisp.
 
The file cannot be read (in either vanilla Emacs or Bookmark+).  The
user has lost bookmarks and can recuperate them only by hand-editing the
corrupted file, which is laborious and error prone.
 
The simple change of binding `print-circle' to t will have no negative
effect on bookmark.el behavior, and it will solve the problem,
preventing data loss if users have defined bookmark structures that are
circular.

In GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600)
 of 2012-09-17 on MARVIN
Bzr revision: 110062 cyd@gnu.org-20120917054104-r93rtwkrtva73ewe
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]