GNU bug report logs - #12507
24.2.50; `bookmark-write-file': use `write-file', not `write-region', to get backups

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 24 Sep 2012 18:44:01 UTC

Severity: wishlist

Tags: notabug

Found in version 24.2.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: 12507 <at> debbugs.gnu.org
Subject: bug#12507: 24.2.50; `bookmark-write-file': use `write-file', not `write-region', to get backups
Date: Mon, 24 Sep 2012 11:41:39 -0700
I believe that `bookmark-write-file' should use `write-file', not
`write-region', because otherwise no backup file is made for the user's
bookmark file.
 
The original code used `write-file'.  The change was made to use
`write-region' on 2005-11-12:
 
 Revision ID: kfogel <at> red-bean.com-20051112203022-g0v8q4n9urlfew61
 
 (bookmark-write-file): Don't visit the destination file, just write
 the data to it using write-region.  This is similar to revision 1.32
 of saveplace.el, but with an additional change to avoid visiting the
 file in the first place.
 
I'm no expert on this, but from what I see by experimenting, using
`write-region' means that no backup is made, and using `write-file'
creates a backup.  It is important for users to be able to have a backup
for their bookmark file.
 
 
In GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600)
 of 2012-09-17 on MARVIN
Bzr revision: 110062 cyd <at> 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'
 





This bug report was last modified 4 years and 176 days ago.

Previous Next


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