After creating a split window and using dired in each, how do I run diff to compare two files?
I have looked but haven't found any clear explanation.
Not clear what you're asking.
But in Dired, provided you've loaded (e.g. require
d) library dired-aux.el
, you can use =
(or menu Immediate > Diff), which runs command dired-diff
, to diff the file listed on the current line against another file, for which you're prompted.
If you use library Dired+ (dired+.el
), then =
runs command diredp-ediff
instead:
=
runs the commanddiredp-ediff
(found indired-mode-map
), which is an interactive compiled Lisp function indired+.el
.It is bound to
=
,menu-bar immediate ediff
.
(diredp-ediff FILE2)
Compare file at cursor with file
FILE2
usingediff
.
FILE2
defaults to the file at the cursor as well. If you enter just a directory name forFILE2
, then the file at the cursor is compared with a file of the same name in that directory.FILE2
is the second file given toediff
; the file at the cursor is the first.Try to guess a useful default value for
FILE2
, as follows:
If the mark is active, use the file at mark.
Else if the file at cursor is a autosave file or a backup file, use the corresponding base file.
Else if there is any backup file for the file at point, use the newest backup file for it.
Else use the file at point.