Subject: bug#12507: Have I mentioned how much I hate Debbugs?

From: Thierry Volpiatto <[email-masked]>
Date: Tue, 02 Oct 2012 07:31:01 +0200

"Drew Adams" <[email-masked]> 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