From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4451: 23.1; EOL problems with vc-diff and cygwin Date: Thu, 17 Sep 2009 12:35:37 -0400 Message-ID: References: <87skemzrre.fsf@marauder.physik.uni-ulm.de> <83r5u6wqvs.fsf@gnu.org> <20090917162612.l0stf7ln28gc4s8o@imap.uni-ulm.de> Reply-To: Stefan Monnier , 4451@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1253206128 593 80.91.229.12 (17 Sep 2009 16:48:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Sep 2009 16:48:48 +0000 (UTC) Cc: 4451@emacsbugs.donarmstrong.com To: Reiner Steib Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 17 18:48:41 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MoK9l-0005Ah-JV for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Sep 2009 18:48:38 +0200 Original-Received: from localhost ([127.0.0.1]:58381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoK9j-0000VI-R9 for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Sep 2009 12:48:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoK8V-0007yB-Lp for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 12:47:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoK8R-0007wF-0x for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 12:47:11 -0400 Original-Received: from [199.232.76.173] (port=37170 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoK8Q-0007w4-Nd for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 12:47:06 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:45626) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MoK8P-0005g8-Ge for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 12:47:06 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8HGl1i3020495; Thu, 17 Sep 2009 09:47:02 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8HGj8Ow020264; Thu, 17 Sep 2009 09:45:08 -0700 Resent-Date: Thu, 17 Sep 2009 09:45:08 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 17 Sep 2009 16:45:08 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4451 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4451-submit@emacsbugs.donarmstrong.com id=B4451.125320534318864 (code B ref 4451); Thu, 17 Sep 2009 16:45:08 +0000 Original-Received: (at 4451) by emacsbugs.donarmstrong.com; 17 Sep 2009 16:35:43 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8HGZe43018859 for <4451@emacsbugs.donarmstrong.com>; Thu, 17 Sep 2009 09:35:41 -0700 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n8HGZbBF012993; Thu, 17 Sep 2009 12:35:38 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 997723A104; Thu, 17 Sep 2009 12:35:37 -0400 (EDT) In-Reply-To: <20090917162612.l0stf7ln28gc4s8o@imap.uni-ulm.de> (Reiner Steib's message of "Thu, 17 Sep 2009 16:26:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3364=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 17 Sep 2009 12:47:11 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31172 Archived-At: 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. Does the patch below help? Stefan === modified file 'lisp/vc.el' --- lisp/vc.el 2009-09-14 15:39:41 +0000 +++ lisp/vc.el 2009-09-17 16:35:00 +0000 @@ -1470,7 +1470,11 @@ ;; use the buffer's coding system (let ((buf (find-buffer-visiting file))) (when buf (with-current-buffer buf - buffer-file-coding-system))) + (if buffer-file-coding-system + ;; Don't inherit the EOL part of the coding-system, + ;; because some diff tools may choose to use + ;; another one. + (coding-system-base buffer-file-coding-system))))) ;; otherwise, try to find one based on the file name (car (find-operation-coding-system 'insert-file-contents file)) ;; and a final fallback