Subject: Re: bug#24089: 25.1; Dired: diff error on = <RET> if the file has a backup inside .~/

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 24 Aug 2020 19:17:37 +0200

Jorge Morais Neto <[email-masked]> writes:

> I found a problem with the solution to this bug.  The solution could be further
> improved.
>
> My Emacs init file is "~/.emacs.d/init.el".  It has numbered backups in
> "~/.emacs.d/.~/".  It is true that with the existing fix, I can invoke
> dired-diff on init.el and immediately hit RET, and it will work as expected.
> However, I often want to compare with an earlier backup.Therefore, I want to be
> able to:
> 1. Pull into the minibuffer (with M-n) the path to the latest backup, so I could
>    edit it to become the path of an earlier backup.  Or even better,
> 2. Pull into the minibuffer (with M-n) the path to the latest backup, and get
>    the path of earlier and earlier backups with successive invocations of M-n.
>
> The current fix lacks both of these features.

That makes sense to me, and is something that sounds quite useful.  I
grepped around Emacs, but I could find any function that just returned
the list of backup files conveniently, so I added one --
'file-backup-file-names'.  (Everybody -- feel free to change the name if
that's too awkward.)  I wrote it by ripping everything out of
'file-newest-backup', basically.

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