From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#13705: 24.2.93; "^M" characters in diff buffers Date: Wed, 13 Feb 2013 23:44:21 +0200 Message-ID: <83ehgj51oq.fsf@gnu.org> References: <83r4kk41vo.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1360791942 875 80.91.229.3 (13 Feb 2013 21:45:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2013 21:45:42 +0000 (UTC) Cc: 13705@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 13 22:46:04 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U5k9S-0002kZ-6W for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2013 22:46:02 +0100 Original-Received: from localhost ([::1]:40591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5k97-0000IJ-Mj for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2013 16:45:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5k8y-0000B4-Jc for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 16:45:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5k8w-0006cO-Cw for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 16:45:32 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5k8w-0006bi-9V for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 16:45:30 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U5k9S-0002mo-IO for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 16:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Feb 2013 21:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13705-submit@debbugs.gnu.org id=B13705.136079195310695 (code B ref 13705); Wed, 13 Feb 2013 21:46:02 +0000 Original-Received: (at 13705) by debbugs.gnu.org; 13 Feb 2013 21:45:53 +0000 Original-Received: from localhost ([127.0.0.1]:54631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5k9J-0002mS-4j for submit@debbugs.gnu.org; Wed, 13 Feb 2013 16:45:53 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:32836) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5k9G-0002mH-4P for 13705@debbugs.gnu.org; Wed, 13 Feb 2013 16:45:51 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MI600A00HLO3D00@a-mtaout22.012.net.il> for 13705@debbugs.gnu.org; Wed, 13 Feb 2013 23:44:07 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MI60090PHPIVL40@a-mtaout22.012.net.il>; Wed, 13 Feb 2013 23:44:07 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71211 Archived-At: > Date: Wed, 13 Feb 2013 19:59:23 +0100 > From: Dani Moncayo > Cc: 13705-done@debbugs.gnu.org > > > (let ((coding-system-for-read 'no-conversion)) > > (call-process shell-file-name nil t nil > > shell-command-switch "diff -c fa fb")) > > > > and look at the lines generated by Diff, like these: > > > > *** fa 2013-02-12 18:41:03.201375000 +0200 > > --- fb 2013-02-08 16:25:03.161000000 +0200 > > The above expression produces the output shown in > "Screenshot-MS-Windows.png" (attached). As expected. > Yes, the problem seems to be the one you've spotted, but note that > I've just reproduced the exact same problem on Ubuntu [1]. See the > screenshot "Screenshot-Ubuntu.png" (attached). On Ubuntu, it is expected to see the ^M characters, because that's what you'd see if you invoke Diff from the shell prompt as well. IOW, on Windows, two files which have DOS EOLs should not show ^M in the Diff output, because DOS EOLs are native on Windows, and ^M at the end of the line is not considered part of the text there. On Unix, files with DOS EOLs are expected to be seen with the ^M explicit, because it _is_ part of the text. > Therefore, the problem seems to be more general: it affects to every > diff made from two files with DOS-type EOLs, unless the "diff" program > is adapted to deal with this scenario (like the one from GnuWin32). It _is_ general, but it is not a problem. When Emacs sees inconsistent EOL format it _always_ refrains from decoding the EOLs.