GNU bug report logs -
#7430
Bug in ediff's treatment of whitespace (this time with ALL the attachments)
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
**** Explanation of the bug:
Wordwise merging in ediff doesn't handle whitespace reasonably when
merging to a blank element. It just plops the non-blank element at the
end of whatever whitespace it ends up with, even across line breaks.
**** How it should work (IMO)
IMO it would be more correct to infer the division of whitespace from the
whitespace around the non-blank element.
**** Instructions for reproducing it
***** General orientation
Use the attached files:
* odd-whitespace-2-file1.{abc}.txt
* odd-whitespace-file1.{abc}.txt
I found it useful to give each set of {a,b,c} its own directory and keep
the filenames the same across directories. I can't attach them to this
email with directory names, though.
I found this code useful in seeing this bug, so I'm including it here. It
just starts an merge-with-ancestor with the respective files - saves time.
It expects filenames of the form file1.{a,b,c}.txt in different
directories.
(defun bug-ediff-merge-files-with-ancestor (dir)
""
(interactive "DDirectory: ")
(ediff-merge-files-with-ancestor
(expand-file-name "file1.a.txt" dir)
(expand-file-name "file1.b.txt" dir)
(expand-file-name "file1.c.txt" dir)))
***** Explicit instructions
* Merge file1.a.txt with file1.b.txt using ancestor file1.c.txt
* "n" to go to first clash
* "b" to partly merge - just so it's merging nicely and not seeing
"<<<<<<" ">>>>>>" "#####Ancestor" etc
* "=" to start an inferior merge
* "a" to compare to buffer A
* (Now in the inferior ediff)
* "n" to go to a line that still needs to be merged to the ancestor.
In the demo they're all of the form "Line N A".
* "a" to try to use the version from A.
* It doesn't merge right. It moves "A" to another place.
Both odd-whitespace-* and odd-whitespace-2-* exhibit similar unexpected
behavior.
Tom Breton (Tehom)
[odd-whitespace-file1.a.txt (text/plain, attachment)]
[odd-whitespace-file1.b.txt (text/plain, attachment)]
[odd-whitespace-file1.c.txt (text/plain, attachment)]
[odd-whitespace-2-file1.a.txt (text/plain, attachment)]
[odd-whitespace-2-file1.b.txt (text/plain, attachment)]
[odd-whitespace-2-file1.c.txt (text/plain, attachment)]
This bug report was last modified 14 years and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.