[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#13705: closed (24.2.93; "^M" characters in diff bu

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#13705: closed (24.2.93; "^M" characters in diff buffers)
Date: Wed, 13 Feb 2013 19:01:01 +0000

Your message dated Wed, 13 Feb 2013 19:59:23 +0100
with message-id <address@hidden>
and subject line Re: bug#13705: 24.2.93; "^M" characters in diff buffers
has caused the debbugs.gnu.org bug report #13705,
regarding 24.2.93; "^M" characters in diff buffers
to be marked as done.

(If you believe you have received this mail in error, please contact

13705: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13705
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.2.93; "^M" characters in diff buffers Date: Wed, 13 Feb 2013 10:40:22 +0100
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 (i386-mingw-nt6.1.7601)
 of 2013-02-10 on VBOX-W7
Bzr revision: 111243 address@hidden
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

Dani Moncayo

Attachment: capture.png
Description: PNG image

Attachment: fa
Description: Binary data

Attachment: fb
Description: Binary data

--- End Message ---
--- Begin Message --- Subject: Re: bug#13705: 24.2.93; "^M" characters in diff buffers Date: Wed, 13 Feb 2013 19:59:23 +0100
> 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 ----

In GNU Emacs (x86_64-unknown-linux-gnu, GTK+ Version 2.24.13)
 of 2013-02-11 on LeG570-ubuntu
Bzr revision: 111735 address@hidden
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:     Ubuntu 12.10

Dani Moncayo

Attachment: Screenshot-MS-Windows.png
Description: PNG image

Attachment: Screenshot-Ubuntu.png
Description: PNG image

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]