Subject: RE: bug#12507: [debbugs-tracker] Processed: severity 12507 wishlist

From: Drew Adams <[email-masked]>
Date: Sat, 19 Sep 2020 10:29:58 -0700 (PDT)

> > No, `write-region' should not, itself, make a backup file.
> 
> No, but there should perhaps be a global mechanism for modes to decide
> whether the data it writes should have backup files, and these modes
> should then call a wrapper around `write-region' that does this stuff.
> 
> And it should be user-customisable, if it exists.

Huh?  This is about a particular context (mode, if
you like).  In _this particular context_ the proper
behavior is to use `write-file'.  There's zero reason
to use `write-region' in this context.  And to fix
this context in this regard there's zero reason to
propose some far-reaching, general change to
`write-region'.

`write-region' is simply the wrong function to use
in this context.  Trying to generalize this for all
contexts is a different solution (in search of a
problem).

The subject of this bug report is:
"`bookmark-write-file': use `write-file', not
`write-region' , to get backups"

To be clear, if this isn't clear already: This
doesn't affect me or my code, personally, because
I fixed this long ago in Bookmark+.  I'm just
trying to help vanilla Emacs DTRT.

There's a real bug here, which I can attest to
because Bookmark+ users have lamented not having
backed up their bookmark files (before I fixed the
code to use `write-file').

There's no reason to expect or require users to
manually back up their bookmark files, especially
when it's trivial for Emacs itself to DTRT and
provide backup by default.  By _default_.