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
View this message in rfc822 format
> > This way we would still use `write-region' and avoid visiting the file.
>
> Why do we have to keep to use write-region?
We don't.
> > Even though we don't know exactly why Richard made the original motivating
> change (commit cfde584f6d, see [b] below), there was some problem with
> `write-file' -- so we shouldn't just go back to that, because a regression
> would be likely.
>
> You already had this discussion with Richard back then, see
>
> https://urldefense.com/v3/__https://lists.gnu.org/archive/html/emacs-
> devel/2005-
> 05/msg01376.html__;!!GqivPVa7Brio!OSjUJblLyJ3EpHMJp5DOIs2JXP2on_caEr0IyNh9zTt
> iU5_MphK2KXh6pWfteriy$
>
> If what Richard wrote in response is not clear enough, we can ask him
> to try to elaborate.
Thanks for finding that. Clearly, the save-place use
case is particular, and the reason for it to use
`write-region' doesn't apply to the use of a bookmark
file. That's clear to me, at least, from what RMS said:
If bookmark.el currently visits the file when reading it,
changing the way it writes the file would not alter the outcome.
How often do users visit the bookmark file? If they do this commonly,
then it is better to visit the file. If they do this quite rarely,
then could be is better to work like save-place-alist-to-file.
Another alternative, which could be best if you want Emacs to make backups
of the bookmark file in the usual way, is to visit the file normally,
but kill the buffer after saving it, unless the buffer existed previously.
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.