bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Ingebrigtsen
Subject: bug#12507: [debbugs-tracker] Processed: severity 12507 wishlist
Date: Wed, 23 Sep 2020 15:34:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Karl Fogel <kfogel@red-bean.com> writes:

> I've just been deep-diving into this again.  I'd like feedback on this 
> general plan for a solution:
>
> 1) In files.el: define a new function `back-up-file' [a] that takes a
>    file name as argument and does most of what `backup-buffer' currently
>    does -- basically, everything from the second `when' on down to the
>    end of the function.
>
> 2) Change `backup-buffer' to use the new function `back-up-file'.
>
>    In other words, we abstract out most of the Emacs file backup
>    functionality to this new function `back-up-file' so we can call it
>    in (3) below, passing a file name argument.

Sounds perfect.  There's a bunch of modes in Emacs that want to do a
backup file, and they go through all these contortions to make this
happen.  

> 3) In bookmark.el, in `bookmark-write-file', call `back-up-file' right
>    before the `write-region' call.  (Note that the ambient value of
>    `version-control' will already be correct at this point.)

Sure.

> [a] Yes, I know I've inserted a hyphen into "back-up" in that function
>     name.  That's because in English "back up" is a compound verb,
>     whereas "backup" as one word is a noun.  The existing function name
>     "backup-buffer" is thus grammatically suspect, but I'm not proposing
>     to fix that here; I'm just trying to avoid repeating the confusion.
>     If folks would prefer "backup-file" for consistency, I could do
>     that, or maybe just find another name.

I'd rather go with `backup-file', just because of the analogy to
`backup-buffer'.  `back-up-file' just looks odd in that context, even if
more correct.  Or perhaps just make it even more explicit:
`make-backup-file'?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]