bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Dani Moncayo
Subject: 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 ----

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


reply via email to

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