Bug 64702 - diff-mode corrupts diff when it is edited
diff-mode corrupts diff when it is edited
Status: CLOSED UPSTREAM
Product: Red Hat Raw Hide
Classification: Retired
Component: emacs (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Aaron Brown
: MoveUpstream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-09 16:14 EDT by Jonathan Kamens
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-29 04:18:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Jonathan Kamens 2002-05-09 16:14:42 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
incorrect.
Comment 1 Jonathan Kamens 2002-05-09 16:15:10 EDT
Created attachment 56847 [details]
test patch file to show emacs diff mode misbehaving
Comment 2 Jonathan Kamens 2002-05-09 16:15:50 EDT
Created attachment 56848 [details]
try again; attached the wrong file last time
Comment 3 Trond Eivind Glomsrxd 2002-05-10 15:43:10 EDT
This is an invalid patch file, isn't it? Please submit a real one.
Comment 4 Jonathan Kamens 2002-05-10 17:42:02 EDT
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 17:37:02 EST
Reproduced.  Hmmm, I guess a workaround is "M-x diff-fixup-modifs".
Comment 6 Jens Petersen 2003-01-15 10:39:10 EST
Would probably be best to move this upstream.
Comment 7 Jens Petersen 2004-01-14 03:09:26 EST
This problem still occurs with 21.3.
Comment 8 Jens Petersen 2004-01-14 20:01:47 EST
and with current cvs emacs.
Comment 9 Jens Petersen 2004-09-29 04:18:08 EDT
Reported upstream.

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