From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20892: 25.0.50; Applying vc-diff hunks on CRLF tracked files Date: Thu, 25 Jun 2015 17:41:13 +0300 Message-ID: <83bng3etpy.fsf@gnu.org> References: <83y4j9duh6.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1435243361 22699 80.91.229.3 (25 Jun 2015 14:42:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2015 14:42:41 +0000 (UTC) Cc: 20892@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 25 16:42:26 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z88M3-0006Kw-RZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 16:42:15 +0200 Original-Received: from localhost ([::1]:56045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88M3-0001z1-6k for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 10:42:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88Lu-0001yi-IT for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 10:42:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z88Lr-0006wJ-C1 for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 10:42:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88Lr-0006wD-8G for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 10:42:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z88Lq-00049w-In for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 10:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jun 2015 14:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20892 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20892-submit@debbugs.gnu.org id=B20892.143524329015946 (code B ref 20892); Thu, 25 Jun 2015 14:42:02 +0000 Original-Received: (at 20892) by debbugs.gnu.org; 25 Jun 2015 14:41:30 +0000 Original-Received: from localhost ([127.0.0.1]:57348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z88LK-000498-3i for submit@debbugs.gnu.org; Thu, 25 Jun 2015 10:41:30 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:32978) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z88LG-00048u-Pm for 20892@debbugs.gnu.org; Thu, 25 Jun 2015 10:41:27 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NQI008008NV8P00@a-mtaout23.012.net.il> for 20892@debbugs.gnu.org; Thu, 25 Jun 2015 17:41:20 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQI008DS8SW5T50@a-mtaout23.012.net.il>; Thu, 25 Jun 2015 17:41:20 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104337 Archived-At: > From: João Távora > Date: Thu, 25 Jun 2015 14:54:26 +0100 > Cc: 20892@debbugs.gnu.org > > I don't think simply removing the CR characters is the right thing, we > should interpret them according to coding-system-eol-type, right? You should remove them if coding-system-eol-type for buffer-file-coding-system of the buffer which the hunk comes from returns 1. > So, say a diff hunk contains just a couple of lines with CRLF and a > couple of lines just LF. If applied to a buffer that is all CRLF, I > would say that applying this hunk should eventually provoke the normal > Emacs behaviour of highlighting all CR's except for the two lines with > LF. Is it worth it? What do you both think? It depends on what the user wants/needs. The Patch utility has options which will cause it to strip the CR characters when applying the diffs; I guess we should have a similar flexibility here.