Subject: Re: Ediff cannot handle C-m in output of diff

From: Eli Zaretskii <[email-masked]>
Date: Tue, 4 Nov 1997 12:36:19 +0200 (IST)

On Mon, 3 Nov 1997, Thorbjoern Hansen wrote:

> I have trouble using Ediff under Windows NT together with a version of
> 'diff' for Windows NT that insists on emitting "\C-m\C-j" instead of
> only "\C-j". Ediff reports:
> 
>   Errors in diff output. Diff output is in #<buffer *ediff-diff*>
>   
> and that buffer will contain lines like
> 
>   3c3^M
>   20a21^M
>   62a64,65^M
> 
> If I change the setting of the two variables
> ediff-diff-ok-lines-regexp and ediff-match-diff-line in ediff-diff.el
> to include "\C-m?" before "$", Ediff will work correctly.

IMHO, this is not a problem with Ediff, and therefore it's not Ediff
which should correct it.  These C-m (aka CR, the Carriage Return)
characters should have been stripped by Emacs when it reads diff's
output.  This is how it works in the MS-DOS version of Emacs, although
DOS versions of `diff' also write the CR characters at the end of each
line.

Please also note that Emacs 20 has a mechanism whereby the EOL
conversion (CRLF <-> NL) on input and output happens automatically.