Red Hat Bugzilla – Bug 64702
diff-mode corrupts diff when it is edited
Last modified: 2007-04-18 12:42:30 EDT
Load the attached file into emacs. Since its name ends in ".patch", diff mode
should be enabled automatically. Run C-x C-q to make the file writable. Mark
the region starting with the second "---" line and ening at the beginning of the
third "---" line, i.e., mark the entire second file diff in the buffer. Type
C-w to kill it. Note how the numbers in the "@@" line for the *first* diff in
the buffer are changed (from "@@ -1,2 +1,2 @@" to "@@ -1,3 +1,3 @@") and are
Created attachment 56847 [details]
test patch file to show emacs diff mode misbehaving
Created attachment 56848 [details]
try again; attached the wrong file last time
This is an invalid patch file, isn't it? Please submit a real one.
No, it's not an invalid patch file. It's a patch file containing modifications
to multiple files. That's perfectly legal.
Reproduced. Hmmm, I guess a workaround is "M-x diff-fixup-modifs".
Would probably be best to move this upstream.
This problem still occurs with 21.3.
and with current cvs emacs.