Bug 64702

Summary: diff-mode corrupts diff when it is edited
Product: [Retired] Red Hat Raw Hide Reporter: Jonathan Kamens <jik>
Component: emacsAssignee: Jens Petersen <petersen>
Status: CLOSED UPSTREAM QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0Keywords: MoveUpstream
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-29 08:18:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
test patch file to show emacs diff mode misbehaving
none
try again; attached the wrong file last time none

Description Jonathan Kamens 2002-05-09 20:14:42 UTC
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
incorrect.

Comment 1 Jonathan Kamens 2002-05-09 20:15:10 UTC
Created attachment 56847 [details]
test patch file to show emacs diff mode misbehaving

Comment 2 Jonathan Kamens 2002-05-09 20:15:50 UTC
Created attachment 56848 [details]
try again; attached the wrong file last time

Comment 3 Trond Eivind Glomsrxd 2002-05-10 19:43:10 UTC
This is an invalid patch file, isn't it? Please submit a real one.

Comment 4 Jonathan Kamens 2002-05-10 21:42:02 UTC
No, it's not an invalid patch file.  It's a patch file containing modifications
to multiple files.  That's perfectly legal.


Comment 5 Jens Petersen 2002-10-30 22:37:02 UTC
Reproduced.  Hmmm, I guess a workaround is "M-x diff-fixup-modifs".

Comment 6 Jens Petersen 2003-01-15 15:39:10 UTC
Would probably be best to move this upstream.

Comment 7 Jens Petersen 2004-01-14 08:09:26 UTC
This problem still occurs with 21.3.

Comment 8 Jens Petersen 2004-01-15 01:01:47 UTC
and with current cvs emacs.

Comment 9 Jens Petersen 2004-09-29 08:18:08 UTC
Reported upstream.