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 18:25:31 +0200 Message-ID: <83r4kk41vo.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1360772740 31249 80.91.229.3 (13 Feb 2013 16:25:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2013 16:25:40 +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 17:26:01 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 1U5f9l-0003K6-7C for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2013 17:26:01 +0100 Original-Received: from localhost ([::1]:37538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5f9R-0007oJ-Mk for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2013 11:25:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5f9I-0007o3-Aj for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 11:25:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5f9G-0008M3-12 for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 11:25:32 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5f9F-0008Lw-UV for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 11:25:29 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U5f9l-0003mc-OF for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 11:26:01 -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 16:26:01 +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.136077275514528 (code B ref 13705); Wed, 13 Feb 2013 16:26:01 +0000 Original-Received: (at 13705) by debbugs.gnu.org; 13 Feb 2013 16:25:55 +0000 Original-Received: from localhost ([127.0.0.1]:54390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5f9e-0003mG-Ur for submit@debbugs.gnu.org; Wed, 13 Feb 2013 11:25:55 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:61811) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5f9c-0003m4-0r for 13705@debbugs.gnu.org; Wed, 13 Feb 2013 11:25:53 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MI6003002VS3K00@a-mtaout23.012.net.il> for 13705@debbugs.gnu.org; Wed, 13 Feb 2013 18:25:17 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MI60031A2Y53B10@a-mtaout23.012.net.il>; Wed, 13 Feb 2013 18:25:17 +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:71181 Archived-At: > Date: Wed, 13 Feb 2013 10:40:22 +0100 > From: Dani Moncayo > > Recipe from "emacs -Q": > 1. Download the two attached files `fa' and `fb'. > 2. M-x diff RET fb RET fa RET > > In the *Diff* buffer, I see annoying/inappropriate "^M" characters at > the end of the compared lines. (see attached screenshot) It's most probably your Diff, not Emacs. I cannot reproduce the problem with the version of Diff I have here (which is a GnuWin32 port). My crystal says that yours is from MSYS or maybe Cygwin, and writes its output with Unix-style LF-only EOL format. That presents to Emacs text that has inconsistent EOLs (because the files you diff have DOS CR-LF EOLs), so Emacs punts and doesn't decode the EOL format. To see if my crystal ball is as clear as it gets, try this: (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 If they don't have the ^M character at their end, your problem is as I described. With my Diff, the above snippet gives me _all_ the lines with ^M, which is consistent.