From: "Tom Breton (Tehom)" <tehom@panix.com>
To: 7430@debbugs.gnu.org
Subject: bug#7430: Bug in ediff's treatment of whitespace (this time with ALL the attachments)
Date: Wed, 17 Nov 2010 15:40:23 -0500 [thread overview]
Message-ID: <fd02b175b3c089d81d39553474ad66bf.squirrel@mail.panix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1952 bytes --]
**** 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)
[-- Attachment #2: odd-whitespace-file1.a.txt --]
[-- Type: text/plain, Size: 85 bytes --]
Line 1
Line 2
Line 3 A
Line 4
Line 5 A
Line 6
Line 7 A
Line 8
Line 9
Line 10
[-- Attachment #3: odd-whitespace-file1.b.txt --]
[-- Type: text/plain, Size: 85 bytes --]
Line 1
Line 2
Line 3
Line 4 B
Line 5
Line 6 B
Line 7
Line 8 B
Line 9
Line 10
[-- Attachment #4: odd-whitespace-file1.c.txt --]
[-- Type: text/plain, Size: 79 bytes --]
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
[-- Attachment #5: odd-whitespace-2-file1.a.txt --]
[-- Type: text/plain, Size: 189 bytes --]
Line 1 X
Line 2 X
Line 3 A X
Line 4 X
Line 5 A X
Line 6 X
Line 7 A X
Line 8 X
Line 9 X
Line 10 X
[-- Attachment #6: odd-whitespace-2-file1.b.txt --]
[-- Type: text/plain, Size: 189 bytes --]
Line 1 X
Line 2 X
Line 3 X
Line 4 B X
Line 5 X
Line 6 B X
Line 7 X
Line 8 B X
Line 9 X
Line 10 X
[-- Attachment #7: odd-whitespace-2-file1.c.txt --]
[-- Type: text/plain, Size: 189 bytes --]
Line 1 X
Line 2 X
Line 3 X
Line 4 X
Line 5 X
Line 6 X
Line 7 X
Line 8 X
Line 9 X
Line 10 X
reply other threads:[~2010-11-17 20:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd02b175b3c089d81d39553474ad66bf.squirrel@mail.panix.com \
--to=tehom@panix.com \
--cc=7430@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.