GNU bug report logs -
#12507
24.2.50; `bookmark-write-file': use `write-file', not `write-region', to get backups
Previous Next
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
Message #119 received at 12507 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> oracle.com> writes:
>
> This kind of comes back to Thierry's suggestion that we might want to come up
> with a version of `write-region', which does not visit the file it writes to,
> that also backs up that file first. Or to do something similar.
Just to clarify (I am not sure what mean "come up"):
My final proposition is:
(with-current-buffer (find-file-no-select FILE) ; [1]
;; 2) erase-buffer
;; 3) write DATA => bookmark-alist
;; 4) let-bound version-control to bookmark-version-control
(save-buffer) [5]
In [1] I still not understanding what is this paranoia about "visiting
file" specially for this file that no body want to edit manually:
bookmark save bookmark-alist in file in two different ways:
- Immidiately when you bookmark something.
- When emacs quit if bookmark-alist have been modified.
So the file should never hang in a non--saved state at any point.
In [4] if you remove bookmark-version-control, this don't mean the file
will not be backed up, hopefully `version-control' will do its job.
But it doesn't arm to keep bookmark-version-control.
In [5], if you use [1] (i.e find-file-no-select) you don't want to use
`write-file' because it use `set-visited-file-name'; you don't need it
because find-file-no-select do it, so save-buffer is enough.
So I don't understand why there is an interminable discussion on such
simple changes.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
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.