Subject: 23.0.92.1; Ediff: Creating a multi-file patch

From: Noam Postavsky <[email-masked]>
Date: Fri, 3 Jun 2016 16:10:41 -0400

tag 3348 + confirmed
severity 3348 minor
found 3348 25.0.94
quit

Confirmed this is still an issue. Here is an elisp script for easier
reproduction (run as emacs -Q -l bug-3348.el):

(defconst bug-3348-test-dir
  (expand-file-name "bug-3348-testdir" temporary-file-directory))
(make-directory bug-3348-test-dir t)
(cd bug-3348-test-dir)

(make-directory "dir-a" t)
(make-directory "dir-b" t)

(with-temp-file "dir-a/file"
  (insert "aaa"))
(with-temp-file "dir-b/file"
  (insert "bbb"))

(ediff-directories "dir-a" "dir-b" nil)
(switch-to-buffer "*Ediff Session Group Panel*")

(ediff-next-meta-item 1)
(ediff-mark-for-operation-at-pos nil)
(ediff-collect-custom-diffs)

(with-current-buffer "*Ediff Multifile Diffs*"
  (write-file "foo.patch"))

(with-temp-file "dir-b/file"
  (insert "BBB"))

(ediff-collect-custom-diffs)

(switch-to-buffer "foo.patch")
(diff-buffer-with-file)
(message (concat "Observe foo.patch buffer is different from its file,\n"
                 "but is marked read-only, not modified"))