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: Stefan Monnier
Subject: bug#4451: 23.1; EOL problems with vc-diff and cygwin
Date: Thu, 17 Sep 2009 16:59:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> I think the best solution is to change vc-coding-system-for-diff so that
>> when it takes the coding system from (with-current-buffer buf
>> buffer-file-coding-system), it ignores the EOL part of that
>> coding system.
> Why do you think so?

If we let Emacs (re)discover the EOL of the diff output, we are less
likely to get it wrong:
- if both the diff markers and the text use Unix EOL, we'll detect it right.
- if both the diff markers and the text use DOS EOL, we'll detect it right.
- if the diff markers uses DOS EOLs and the text use Unix EOL,
  we'll detect it as Unix which is about as good as it gets, short of
  decoding the markers and the text separately.
- if the diff markers uses Unix EOLs and the text use DOS EOL, we'll
  detect it as Unix which is not always ideal, admittedly, but it's
  still the correct thing to do in some cases (e.g. if the old version
  of the file used Unix EOL).

So maybe, we should drop the provided EOL info (as in my patch) if it
says "-unix" but keep it if it says "-dos".

> My line of thinking was that a diff of a file with Unix EOLs should
> always yield a diffs file with Unix EOLs.

Apparently this is not the case for Reiner's setup.


        Stefan





reply via email to

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