unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 4451@emacsbugs.donarmstrong.com, reiner.steib@gmx.de
Subject: bug#4451: 23.1; EOL problems with vc-diff and cygwin
Date: Thu, 17 Sep 2009 16:59:10 -0400	[thread overview]
Message-ID: <jwv1vm5s3dw.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <83k4zxwkny.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Sep 2009 20:22:41 +0300")

>> 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	other threads:[~2009-09-17 20:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16 18:08 bug#4451: 23.1; EOL problems with vc-diff and cygwin Reiner Steib
2009-09-16 20:56 ` Eli Zaretskii
2009-09-17 14:26   ` Reiner Steib
2009-09-17 16:35     ` Stefan Monnier
2009-09-17 17:22       ` Eli Zaretskii
2009-09-17 20:59         ` Stefan Monnier [this message]
2009-09-18 11:29       ` Reiner Steib
2009-09-24 17:00         ` Reiner Steib
2009-09-24 22:07           ` Stefan Monnier
2009-09-25 19:11             ` Eli Zaretskii
2009-09-26  8:27               ` Reiner Steib
2009-09-26  9:20                 ` Eli Zaretskii
2009-09-27  0:36                   ` Stefan Monnier
2009-09-27  7:38                     ` Eli Zaretskii
2009-09-27 19:03                       ` Stefan Monnier
2009-09-27 20:35                         ` Reiner Steib
2009-09-28  1:08                           ` Stefan Monnier
2009-10-05 16:07                   ` Reiner Steib
2009-10-05 18:45                     ` Stefan Monnier
2009-10-05 20:58                     ` Eli Zaretskii
2010-07-15  7:22                       ` Reiner Steib
2010-07-15  8:33                         ` Eli Zaretskii
2010-07-16  6:51                           ` Reiner Steib
2010-07-16  8:05                             ` Andreas Schwab
2010-07-16 10:18                             ` Eli Zaretskii
2010-07-19  7:23                               ` Reiner Steib
2009-09-17 17:18     ` Eli Zaretskii
2009-09-18 11:31       ` Reiner Steib

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv1vm5s3dw.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=4451@emacsbugs.donarmstrong.com \
    --cc=eliz@gnu.org \
    --cc=reiner.steib@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).