Bug 64702 - diff-mode corrupts diff when it is edited
Summary: diff-mode corrupts diff when it is edited
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: emacs
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-09 20:14 UTC by Jonathan Kamens
Modified: 2007-04-18 16:42 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-29 08:18:08 UTC
Embargoed:


Attachments (Terms of Use)
test patch file to show emacs diff mode misbehaving (180 bytes, patch)
2002-05-09 20:15 UTC, Jonathan Kamens
no flags Details | Diff
try again; attached the wrong file last time (270 bytes, patch)
2002-05-09 20:15 UTC, Jonathan Kamens
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.