GNU bug report logs - #20892
25.0.50; Applying vc-diff hunks on CRLF tracked files

Previous Next

Package: emacs;

Reported by: joaotavora <at> gmail.com (João Távora)

Date: Wed, 24 Jun 2015 11:30:05 UTC

Severity: normal

Found in version 25.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 20892 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 20892 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#20892: 25.0.50; Applying vc-diff hunks on CRLF tracked files
Date: Thu, 25 Jun 2015 17:41:13 +0300
> From: João Távora <joaotavora <at> gmail.com>
> Date: Thu, 25 Jun 2015 14:54:26 +0100
> Cc: 20892 <at> 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.




This bug report was last modified 9 years and 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.