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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: joaotavora <at> gmail.com (João Távora)
Cc: 20892 <at> debbugs.gnu.org
Subject: bug#20892: 25.0.50; Applying vc-diff hunks on CRLF tracked files
Date: Wed, 24 Jun 2015 17:57:57 +0300
> From: joaotavora <at> gmail.com (João Távora)
> Date: Wed, 24 Jun 2015 12:29:05 +0100
> 
>  @@ -1799,7 +1799,8 @@ 
>        (with-current-buffer buf
>  	(goto-char (car pos))
>  	(delete-region (car pos) (cdr pos))
> -	(insert (car new)))
> +	(insert (decode-coding-string (car new)
> +	                              buffer-file-coding-system)))

That doesn't sound right: the string you are passing to
decode-coding-string is already a multibyte string in Emacs's internal
representation.  So decoding it one more time is not what you want.

I think we should simply remove the CR characters from the end of each
line, if buffer-file-coding-system states DOS EOL format.  (You can
check the latter with coding-system-eol-type.)

Thanks.




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.