[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-25 e30c3e9: Fix EOL decoding in vc-annotate with
From: |
Eli Zaretskii |
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 |
> From: Stefan Monnier <address@hidden>
> Cc: Eli Zaretskii <address@hidden>
> 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.
- Re: [Emacs-diffs] emacs-25 e30c3e9: Fix EOL decoding in vc-annotate with SVN back-end on MS-Windows,
Eli Zaretskii <=