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

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

bug#4451: 23.1; EOL problems with vc-diff and cygwin


From: Reiner Steib
Subject: bug#4451: 23.1; EOL problems with vc-diff and cygwin
Date: Fri, 18 Sep 2009 13:31:45 +0200
User-agent: Internet Messaging Program (IMP) H3 (4.1.5)

Eli Zaretskii <address@hidden> wrote:

So does it help to add --binary to the diff switches?  (Sorry, I have
no idea how to do that with vc-diff, I just hope there is a way.)

There is:

| vc-cvs-diff-switches is a variable defined in `vc-cvs.el'.
| Its value is "-u"

Adding "--binary" results in completely unusable result:

| Index: K3.xml^M
| ===================================================================^M
| RCS file: [...]/K3.xml,v^M
| retrieving revision 1.2^M
| diff -u --binary -u -r1.2 K3.xml^M
| cvs.exe diff: warning: did not set stdout to binary mode^M
| --- K3.xml    24 Jul 2009 16:09:12 -0000      1.2^M
| +++ K3.xml    16 Sep 2009 11:20:27 -0000^M
| @@ -1,4365 +1,4379 @@^M
| -<?xml version='1.0'       ^M^M
| - encoding='UTF-8'    ^M^M
| -?>        ^M^M
| -<policy name='K3' ^M^M
| - version='2.0.0'     ^M^M
| - schema-version='1.0.0'      ^M^M
| [... complete file follows ...]
| -</bar>^M^M
| -</foo>^M^M
| +<?xml version='1.0'       ^M
| + encoding='UTF-8'    ^M
| +?>        ^M
| +<policy name='K3_test'    ^M
| + version='2.0.0'     ^M
| + schema-version='1.0.0'      ^M
| [... complete file follows ...]

The saved Emacs buffer from vc-diff (vc-diff-2.output) has "^M^M$"
whereas the buffer from cvs-mode-diff (cvs-mode-diff.output) has
"^M$".

What is the value of buffer-file-coding-system in both of these
buffers?

vc-diff / buffer *vc-diff*: iso-latin-1-dos

(saving this buffer and using `find-file-literally' display "^M^M$".)

cvs-mode-diff / buffer *cvs-diff*: iso-latin-1-dos

The diffed file file K3.xml: utf-8-unix

Stefan's patch seem to work.  See my other mail.

Bye, Reiner





reply via email to

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