GNU bug report logs - #13705
24.2.93; "^M" characters in diff buffers

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Wed, 13 Feb 2013 09:42:01 UTC

Severity: normal

Found in version 24.2.93

Done: Dani Moncayo <dmoncayo <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dani Moncayo <dmoncayo <at> gmail.com>
Subject: bug#13705: closed (Re: bug#13705: 24.2.93; "^M" characters in
 diff buffers)
Date: Wed, 13 Feb 2013 19:01:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#13705: 24.2.93; "^M" characters in diff buffers

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 13705 <at> debbugs.gnu.org.

-- 
13705: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13705
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 13705-done <at> debbugs.gnu.org
Subject: Re: bug#13705: 24.2.93; "^M" characters in diff buffers
Date: Wed, 13 Feb 2013 19:59:23 +0100
[Message part 3 (text/plain, inline)]
> 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

Yes, my diff (at that moment) was from MSYS.

>, 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

The above expression produces the output shown in
"Screenshot-MS-Windows.png" (attached).

> 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.

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).

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).

But anyway, if there is a problem here, it is not in Emacs, and
therefore, I'm closing this bug report.

As always, thanks for your time Eli.


---- Footnotes ----

[1]
In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.13)
 of 2013-02-11 on LeG570-ubuntu
Bzr revision: 111735 eliz <at> gnu.org-20130211173232-odvn6s0c9gs3jclc
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:	Ubuntu 12.10


-- 
Dani Moncayo
[Screenshot-MS-Windows.png (image/png, attachment)]
[Screenshot-Ubuntu.png (image/png, attachment)]
[Message part 6 (message/rfc822, inline)]
From: Dani Moncayo <dmoncayo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2.93; "^M" characters in diff buffers
Date: Wed, 13 Feb 2013 10:40:22 +0100
[Message part 7 (text/plain, inline)]
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)

I see this bug both in the emacs-24 branch and the trunk.

In GNU Emacs 24.2.93.1 (i386-mingw-nt6.1.7601)
 of 2013-02-10 on VBOX-W7
Bzr revision: 111243 michael.albinus <at> gmx.de-20130210100709-s22fi7zl9w92a8sa
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -IC:/emacs/libs/libXpm-3.5.10/include -IC:/emacs/libs/libXpm-3.5.10/src
 -IC:/emacs/libs/libpng-dev_1.4.3-1_win32/include
 -IC:/emacs/libs/zlib-dev_1.2.5-2_win32/include
 -IC:/emacs/libs/giflib-4.1.4-1-lib/include
 -IC:/emacs/libs/jpeg-6b-4-lib/include
 -IC:/emacs/libs/tiff-3.8.2-1-lib/include
 -IC:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2
 -IC:/emacs/libs/gnutls-3.1.5-w32/include
 -IC:/emacs/libs/libiconv-1.14-2-mingw32-dev/include'


-- 
Dani Moncayo
[capture.png (image/png, attachment)]
[fa (application/octet-stream, attachment)]
[fb (application/octet-stream, attachment)]

This bug report was last modified 12 years and 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.