91 |
nil)) |
nil)) |
92 |
(diff-backup (dired-get-filename) switches)) |
(diff-backup (dired-get-filename) switches)) |
93 |
|
|
94 |
|
;;;###autoload |
95 |
(defun dired-compare-directories (dir2 predicate) |
(defun dired-compare-directories (dir2 predicate) |
96 |
"Mark files with different file attributes in two dired buffers. |
"Mark files with different file attributes in two dired buffers. |
97 |
Compare file attributes of files in the current directory |
Compare file attributes of files in the current directory |
98 |
with file attributes in directory DIR2 using PREDICATE on pairs of files |
with file attributes in directory DIR2 using PREDICATE on pairs of files |
99 |
with the same name. Mark files for which PREDICATE returns non-nil. |
with the same name. Mark files for which PREDICATE returns non-nil. |
100 |
Mark files with different names if PREDICATE is nil (or interactively |
Mark files with different names if PREDICATE is nil (or interactively |
101 |
when the user enters empty input at the predicate prompt). |
with empty input at the predicate prompt). |
102 |
|
|
103 |
PREDICATE is a Lisp expression that can refer to the following variables: |
PREDICATE is a Lisp expression that can refer to the following variables: |
104 |
|
|
118 |
(not (and (= (nth 2 fa1) (nth 2 fa2)) - mark files with different UID |
(not (and (= (nth 2 fa1) (nth 2 fa2)) - mark files with different UID |
119 |
(= (nth 3 fa1) (nth 3 fa2)))) and GID." |
(= (nth 3 fa1) (nth 3 fa2)))) and GID." |
120 |
(interactive |
(interactive |
121 |
(list (read-file-name (format "Compare %s with: " |
(list (read-directory-name (format "Compare %s with: " |
122 |
(dired-current-directory)) |
(dired-current-directory)) |
123 |
(dired-dwim-target-directory)) |
(dired-dwim-target-directory) |
124 |
|
(dired-dwim-target-directory)) |
125 |
(read-from-minibuffer "Mark if (lisp expr or RET): " nil nil t nil "nil"))) |
(read-from-minibuffer "Mark if (lisp expr or RET): " nil nil t nil "nil"))) |
126 |
(let* ((dir1 (dired-current-directory)) |
(let* ((dir1 (dired-current-directory)) |
127 |
(file-alist1 (dired-files-attributes dir1)) |
(file-alist1 (dired-files-attributes dir1)) |