all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Dima Kogan <dima@secretsauce.net>
Cc: 14516@debbugs.gnu.org
Subject: bug#14516: 24.3.50; vc-diff ignores the encoding of its input
Date: Mon, 25 Nov 2013 03:27:35 +0200	[thread overview]
Message-ID: <87d2lpqni0.fsf@yandex.ru> (raw)
In-Reply-To: <877gigt9wz.fsf@secretsauce.net> (Dima Kogan's message of "Thu, 30 May 2013 14:50:04 -0700")

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).





  parent reply	other threads:[~2013-11-25  1:27 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 [this message]
2016-02-24  5:01   ` Lars Ingebrigtsen

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=87d2lpqni0.fsf@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=14516@debbugs.gnu.org \
    --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.