unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] emacs-25 e30c3e9: Fix EOL decoding in vc-annotate with SVN back-end on MS-Windows
       [not found] ` <E1alinW-0003XD-6G@vcs.savannah.gnu.org>
@ 2016-03-31 21:30   ` Stefan Monnier
  2016-04-01  7:14     ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2016-03-31 21:30 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii

> --- 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?


        Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] emacs-25 e30c3e9: Fix EOL decoding in vc-annotate with SVN back-end on MS-Windows
  2016-03-31 21:30   ` [Emacs-diffs] emacs-25 e30c3e9: Fix EOL decoding in vc-annotate with SVN back-end on MS-Windows Stefan Monnier
@ 2016-04-01  7:14     ` Eli Zaretskii
  2016-04-01 13:21       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2016-04-01  7:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>
> 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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] emacs-25 e30c3e9: Fix EOL decoding in vc-annotate with SVN back-end on MS-Windows
  2016-04-01  7:14     ` Eli Zaretskii
@ 2016-04-01 13:21       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2016-04-01 13:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>> > +        ;; 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?
> 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.

So you're saying that it's not just "svn annotate" that does that but
(e.g.) "git annotate" does it as well?  If so, please clarify the
comment to explain that "svn annotate" is just one example.


        Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-01 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20160331200230.13543.3434@vcs.savannah.gnu.org>
     [not found] ` <E1alinW-0003XD-6G@vcs.savannah.gnu.org>
2016-03-31 21:30   ` [Emacs-diffs] emacs-25 e30c3e9: Fix EOL decoding in vc-annotate with SVN back-end on MS-Windows Stefan Monnier
2016-04-01  7:14     ` Eli Zaretskii
2016-04-01 13:21       ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).