all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 14516@debbugs.gnu.org, Dima Kogan <dima@secretsauce.net>
Subject: bug#14516: 24.3.50; vc-diff ignores the encoding of its input
Date: Wed, 24 Feb 2016 16:01:59 +1100	[thread overview]
Message-ID: <877fhuhfaw.fsf@gnus.org> (raw)
In-Reply-To: <87d2lpqni0.fsf@yandex.ru> (Dmitry Gutov's message of "Mon, 25 Nov 2013 03:27:35 +0200")

Dmitry Gutov <dgutov@yandex.ru> writes:

> Dima Kogan <dima@secretsauce.net> writes:
>
>> VC already has code in it to detect the encoding of its input. I'm
>> attaching a small patch that sets this detected encoding to the
>> *vc-diff* buffer. This fixes the issue.
>
> I'd prefer a slightly different patch.  This way, you have smaller
> probability of conflict when `vc-setup-buffer' is called from any
> fuction other than `vc-diff-internal'.
>
> And `coding-system-for-read' detection is only peformed for the diff
> commands.
>
> === modified file 'lisp/vc/vc.el'
> --- lisp/vc/vc.el       2013-11-13 20:06:37 +0000
> +++ lisp/vc/vc.el       2013-11-25 01:13:04 +0000
> @@ -1642,6 +1642,8 @@
>          (coding-system-for-read
>           (if files (vc-coding-system-for-diff (car files)) 'undecided)))
>      (vc-setup-buffer buffer)
> +    (when coding-system-for-read
> +      (setq buffer-file-coding-system coding-system-for-read))
>      (message "%s" (car messages))
>      ;; Many backends don't handle well the case of a file that has been
>      ;; added but not yet committed to the repo (notably CVS and Subversion).

It looks like this was added instead:

    ;; On MS-Windows and MS-DOS, Diff is likely to produce DOS-style
    ;; EOLs, which will look ugly if (car files) happens to have Unix
    ;; EOLs.
    (if (memq system-type '(windows-nt ms-dos))
	(setq coding-system-for-read
	      (coding-system-change-eol-conversion coding-system-for-read
						   'dos)))

I guess that makes as much sense as anything.  (I mean, there may be
different coding systems in each file being diffed in the same
buffer...)

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2016-02-24  5:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 21:50 bug#14516: 24.3.50; vc-diff ignores the encoding of its input Dima Kogan
2013-05-31  6:29 ` Richard Stallman
2013-11-25  1:27 ` Dmitry Gutov
2016-02-24  5:01   ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fhuhfaw.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=14516@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=dima@secretsauce.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.