all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24474: dired-diff doesn't know about backup-directory-alist
@ 2016-09-19 15:40 積丹尼 Dan Jacobson
  2016-09-20  1:40 ` npostavs
  0 siblings, 1 reply; 2+ messages in thread
From: 積丹尼 Dan Jacobson @ 2016-09-19 15:40 UTC (permalink / raw)
  To: 24474

= runs the command dired-diff, which is an interactive autoloaded
compiled Lisp function in `dired-aux.el'.

It is bound to =, <menu-bar> <immediate> <diff>.

(dired-diff FILE &optional SWITCHES)

Compare file at point with file FILE using `diff'.
If called interactively, prompt for FILE.  If the file at point
has a backup file, use that as the default.  If the file at point
is a backup file, use its original...

[OK, let's try it. Oops:]

diff -U0 /home/jidanni/\!home\!jidanni\!.bash_profile.\~42\~ /home/jidanni/.bash_profile
diff: /home/jidanni/!home!jidanni!.bash_profile.~42~: No such file or directory

Diff finished (diff error).  Mon Sep 19 23:25:22 2016

[Which is because the correct file name is:]

/home/jidanni/.backups/!home!jidanni!.bash_profile.~42~

[because of my:]

backup-directory-alist is a variable defined in `files.el'.
Its value is ((".*" . "~/.backups/"))
Original value was nil

[So we see that dired-diff got the filename right, but the directory
wrong.

Furthermore, "if the file at point is a backup file..." also fails
miserably. Go to your ~/.backups directory and try it on a few files...]

diff -U0 /home/jidanni/.backups/\!home\!jidanni\!.bash_profile.\~42\~ /home/jidanni/.backups/\!home\!jidanni\!.bash_profile
diff: /home/jidanni/.backups/!home!jidanni!.bash_profile: No such file or directory

Diff finished (diff error).  Mon Sep 19 23:37:10 2016

[We see it assumes everything is in the same directory.
It should have tried comparing ~/.bash_profile .

emacs-version "24.5.1".]





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-20  1:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-19 15:40 bug#24474: dired-diff doesn't know about backup-directory-alist 積丹尼 Dan Jacobson
2016-09-20  1:40 ` npostavs

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.