From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Tom Breton (Tehom)" Newsgroups: gmane.emacs.bugs 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 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20101117154023_38812" X-Trace: dough.gmane.org 1290026705 8837 80.91.229.12 (17 Nov 2010 20:45:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 17 Nov 2010 20:45:05 +0000 (UTC) To: 7430@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 17 21:45:00 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PIosG-00079P-5Y for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Nov 2010 21:45:00 +0100 Original-Received: from localhost ([127.0.0.1]:54668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIosF-0005ER-BW for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Nov 2010 15:44:59 -0500 Original-Received: from [140.186.70.92] (port=53811 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIorh-0004yF-8B for bug-gnu-emacs@gnu.org; Wed, 17 Nov 2010 15:44:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIore-0007LH-WB for bug-gnu-emacs@gnu.org; Wed, 17 Nov 2010 15:44:24 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIore-0007L8-Ua for bug-gnu-emacs@gnu.org; Wed, 17 Nov 2010 15:44:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PIoja-0004lv-He; Wed, 17 Nov 2010 15:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Tom Breton (Tehom)" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Nov 2010 20:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7430 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.129002613618334 (code B ref -1); Wed, 17 Nov 2010 20:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Nov 2010 20:35:36 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PIoiz-0004lc-Vf for submit@debbugs.gnu.org; Wed, 17 Nov 2010 15:35:36 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PIoiy-0004lV-15 for submit@debbugs.gnu.org; Wed, 17 Nov 2010 15:35:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIonq-0006ke-7A for submit@debbugs.gnu.org; Wed, 17 Nov 2010 15:40:27 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:38184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIonq-0006ka-4S for submit@debbugs.gnu.org; Wed, 17 Nov 2010 15:40:26 -0500 Original-Received: from [140.186.70.92] (port=38993 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIonp-0003aQ-6t for bug-gnu-emacs@gnu.org; Wed, 17 Nov 2010 15:40:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIonn-0006kN-WC for bug-gnu-emacs@gnu.org; Wed, 17 Nov 2010 15:40:25 -0500 Original-Received: from mail2.panix.com ([166.84.1.73]:53873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIonn-0006kH-QN for bug-gnu-emacs@gnu.org; Wed, 17 Nov 2010 15:40:23 -0500 Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by mail2.panix.com (Postfix) with ESMTP id AF95138E4B for ; Wed, 17 Nov 2010 15:40:23 -0500 (EST) Original-Received: from mail.panix.com (localhost [127.0.0.1]) by mailbackend.panix.com (Postfix) with ESMTP id 94035322E2 for ; Wed, 17 Nov 2010 15:40:23 -0500 (EST) X-Panix-Received: from 96.252.49.112 (SquirrelMail authenticated user tehom@panix.com) by mail.panix.com with HTTP; Wed, 17 Nov 2010 15:40:23 -0500 User-Agent: SquirrelMail/1.4.19 X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 17 Nov 2010 15:36:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:41712 Archived-At: ------=_20101117154023_38812 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable **** 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. I= t 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 * "=3D" 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) ------=_20101117154023_38812 Content-Type: text/plain; name="odd-whitespace-file1.a.txt" Content-Disposition: attachment; filename="odd-whitespace-file1.a.txt" Content-Transfer-Encoding: quoted-printable Line 1 Line 2 Line 3 A Line 4 Line 5 A Line 6 Line 7 A Line 8 Line 9 Line 10 ------=_20101117154023_38812 Content-Type: text/plain; name="odd-whitespace-file1.b.txt" Content-Disposition: attachment; filename="odd-whitespace-file1.b.txt" Content-Transfer-Encoding: quoted-printable Line 1 Line 2 Line 3 Line 4 B Line 5 Line 6 B Line 7 Line 8 B Line 9 Line 10 ------=_20101117154023_38812 Content-Type: text/plain; name="odd-whitespace-file1.c.txt" Content-Disposition: attachment; filename="odd-whitespace-file1.c.txt" Content-Transfer-Encoding: quoted-printable Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 ------=_20101117154023_38812 Content-Type: text/plain; name="odd-whitespace-2-file1.a.txt" Content-Disposition: attachment; filename="odd-whitespace-2-file1.a.txt" Content-Transfer-Encoding: quoted-printable 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 ------=_20101117154023_38812 Content-Type: text/plain; name="odd-whitespace-2-file1.b.txt" Content-Disposition: attachment; filename="odd-whitespace-2-file1.b.txt" Content-Transfer-Encoding: quoted-printable 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 ------=_20101117154023_38812 Content-Type: text/plain; name="odd-whitespace-2-file1.c.txt" Content-Disposition: attachment; filename="odd-whitespace-2-file1.c.txt" Content-Transfer-Encoding: quoted-printable 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 ------=_20101117154023_38812--