* bug#3348: 23.0.92.1; Ediff: Creating a multi-file patch
@ 2009-05-22 3:34 Jon Strait
2016-06-03 20:10 ` Noam Postavsky
2023-10-15 11:16 ` Mauro Aranda
0 siblings, 2 replies; 3+ messages in thread
From: Jon Strait @ 2009-05-22 3:34 UTC (permalink / raw)
To: bug-gnu-emacs
The modified flag is not being set on the patch results buffer when
ediff-collect-custom-diffs is rerun.
1. Mark the sessions within an ediff-directories session.
2. Run ediff-collect-custom-diffs, which creates a multi-file patch
and displays the buffer with this patch.
3. Save this buffer to a file 'foo.patch' with write-file.
4. Change one of the files included in the session group.
5. Run ediff-collect-custom-diffs on the same session group
again.
6. The new patch will be displayed as the buffer 'foo.patch', but
the buffer's modified flag is not set.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#3348: 23.0.92.1; Ediff: Creating a multi-file patch
2009-05-22 3:34 bug#3348: 23.0.92.1; Ediff: Creating a multi-file patch Jon Strait
@ 2016-06-03 20:10 ` Noam Postavsky
2023-10-15 11:16 ` Mauro Aranda
1 sibling, 0 replies; 3+ messages in thread
From: Noam Postavsky @ 2016-06-03 20:10 UTC (permalink / raw)
To: 3348
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"))
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#3348: 23.0.92.1; Ediff: Creating a multi-file patch
2009-05-22 3:34 bug#3348: 23.0.92.1; Ediff: Creating a multi-file patch Jon Strait
2016-06-03 20:10 ` Noam Postavsky
@ 2023-10-15 11:16 ` Mauro Aranda
1 sibling, 0 replies; 3+ messages in thread
From: Mauro Aranda @ 2023-10-15 11:16 UTC (permalink / raw)
To: 3348; +Cc: jstrait, Noam Postavsky
Noam Postavsky <npostavs@users.sourceforge.net> writes:
> 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"))
This still happens, but I'm not really sure if this should be called a
bug. ediff-collect-custom-diffs explicitly marks this buffer as not
modified with (set-buffer-modified-p nil). I can't find the reasons for
that, but that doesn't mean there isn't a good one. And it is
consistent about doing that.
The first call to ediff-collect-custom-diffs creates the buffer
*Ediff Multifile Diffs* and also marks it as unmodified, even though it
is. So, why is that not a problem? Why is the second time a problem?
Using write-file again is possible, so what are the expectations of the
second time of typing `P' (or calling ediff-collect-custom-diffs) and
why do they differ from the expectations for the 1st call?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-15 11:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-22 3:34 bug#3348: 23.0.92.1; Ediff: Creating a multi-file patch Jon Strait
2016-06-03 20:10 ` Noam Postavsky
2023-10-15 11:16 ` Mauro Aranda
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).