Subject: bug#30407: dired-diff ignores backup-directory-alist

From: Eli Zaretskii <[email-masked]>
Date: Sat, 10 Feb 2018 11:52:25 +0200

> From: 積丹尼 Dan Jacobson
> 	<[email-masked]>
> Date: Sat, 10 Feb 2018 06:53:47 +0800
> 
> dired-diff prompts with
> Diff p with (default            !home!jidanni!org!debconf!p.~8~): ~/org/debconf/ #WRONG
> Diff p with (default ~/.backups/!home!jidanni!org!debconf!p.~8~): ~/org/debconf/ #Correct
> when in .emacs the user does
> (setq
>  auto-save-list-file-prefix "~/.backups/.saves-";less clutter in $HOME
>  backup-directory-alist '((".*" . "~/.backups/"))
>  backup-by-copying-when-linked t ;don't destroy other hard links
>  backup-by-copying-when-mismatch t)
> 
> It correctly detects that we are already at version ~8~ in that faraway
> directory, but then it forgets to add the prefix to the default.
> 
> It then prompts with a non-existent wrong file doomed to fail if the
> user hits RET.

I believe this bug is already fixed in Emacs 26, please try the latest
pretest.

> Also using M-n, M-p do not make the default that it shows available to
> the user to edit.

Because M-n and M-p show possible directories where that other file
could live, not only possible backup file names.  Dired-diff is not
necessarily for comparison with the backup file, it's more general.

> emacs-version "25.2.2" and I do recall I reported something similar
> years ago...

If you are willing to make such remarks, please always make a point of
trying the latest codebase first.