From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] emacs-25 e30c3e9: Fix EOL decoding in vc-annotate with SVN back-end on MS-Windows Date: Fri, 01 Apr 2016 10:14:56 +0300 Message-ID: <83oa9tu7f3.fsf@gnu.org> References: <20160331200230.13543.3434@vcs.savannah.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1459494924 19152 80.91.229.3 (1 Apr 2016 07:15:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Apr 2016 07:15:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 01 09:15:23 2016 Return-path: Envelope-to: ged-emacs-devel@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 1altIh-0008Jn-9b for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2016 09:15:23 +0200 Original-Received: from localhost ([::1]:36325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1altIg-0000AO-Gm for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2016 03:15:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1altIS-000066-TU for emacs-devel@gnu.org; Fri, 01 Apr 2016 03:15:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1altIP-0006la-O3 for emacs-devel@gnu.org; Fri, 01 Apr 2016 03:15:08 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1altIP-0006lB-Ln; Fri, 01 Apr 2016 03:15:05 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2708 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1altIO-00012u-Tr; Fri, 01 Apr 2016 03:15:05 -0400 In-reply-to: (message from Stefan Monnier on Thu, 31 Mar 2016 17:30:48 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202553 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii > Date: Thu, 31 Mar 2016 17:30:48 -0400 > > > --- a/lisp/vc/vc-annotate.el > > +++ b/lisp/vc/vc-annotate.el > [...] > > + ;; On DOS/Windows, "svn annotate" will produce CRLF EOLs even > > + ;; if the original file has Unix EOLs, which will show ^M > > + ;; characters in the Annotate buffer. Prevent that by forcing > > + ;; DOS EOL decoding. > > + (if (memq system-type '(windows-nt ms-dos)) > > + (setq coding-system-for-read > > + (coding-system-change-eol-conversion coding-system-for-read > > + 'dos))) > > Why do we need to put this in vc-annotate rather than in vc-svn.el? Because it's vc-annotate that commits the crime in the first place: (with-output-to-temp-buffer temp-buffer-name (let ((backend (or vc-bk (vc-backend file))) (coding-system-for-read buffer-file-coding-system)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Any command running on MS-Windows should be expected to produce a CRLF output, so inheriting EOL decoding from the buffer is not a good idea.