From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33567: Syntactic fontification of diff hunks Date: Thu, 06 Dec 2018 08:53:46 +0200 Message-ID: <83r2ev6t8l.fsf@gnu.org> References: <878t18j4is.fsf@mail.linkov.net> <83a7lobemr.fsf@gnu.org> <87a7lnv6ex.fsf@mail.linkov.net> <83pnuj9kb8.fsf@gnu.org> <87bm62npwr.fsf@mail.linkov.net> <83a7llai7v.fsf@gnu.org> <87va4826tz.fsf@mail.linkov.net> <83sgzc8mp0.fsf@gnu.org> <87a7lj8rmd.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1544079218 13316 195.159.176.226 (6 Dec 2018 06:53:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2018 06:53:38 +0000 (UTC) Cc: 33567@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 06 07:53:34 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUnXS-0003KU-2j for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Dec 2018 07:53:34 +0100 Original-Received: from localhost ([::1]:39175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUnZY-0007Ne-I7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Dec 2018 01:55:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUnZ8-00079S-CZ for bug-gnu-emacs@gnu.org; Thu, 06 Dec 2018 01:55:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUnZ0-0005Hc-6x for bug-gnu-emacs@gnu.org; Thu, 06 Dec 2018 01:55:16 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58863) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gUnYs-0005Fp-JF for bug-gnu-emacs@gnu.org; Thu, 06 Dec 2018 01:55:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gUnYs-0004xc-8v for bug-gnu-emacs@gnu.org; Thu, 06 Dec 2018 01:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Dec 2018 06:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33567 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33567-submit@debbugs.gnu.org id=B33567.154407925018997 (code B ref 33567); Thu, 06 Dec 2018 06:55:02 +0000 Original-Received: (at 33567) by debbugs.gnu.org; 6 Dec 2018 06:54:10 +0000 Original-Received: from localhost ([127.0.0.1]:34888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUnXy-0004wH-71 for submit@debbugs.gnu.org; Thu, 06 Dec 2018 01:54:10 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUnXs-0004vj-A6 for 33567@debbugs.gnu.org; Thu, 06 Dec 2018 01:54:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUnXg-0004HD-Rx for 33567@debbugs.gnu.org; Thu, 06 Dec 2018 01:53:54 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUnXg-0004GN-Dp; Thu, 06 Dec 2018 01:53:48 -0500 Original-Received: from [176.228.60.248] (port=2434 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gUnXg-0000gr-0y; Thu, 06 Dec 2018 01:53:48 -0500 In-reply-to: <87a7lj8rmd.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 06 Dec 2018 01:25:46 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153139 Archived-At: > From: Juri Linkov > Cc: 33567@debbugs.gnu.org > Date: Thu, 06 Dec 2018 01:25:46 +0200 > > I'm thinking about overriding coding in vc-git-find-revision like > > diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el > index f317400530..e5f44524df 100644 > --- a/lisp/vc/vc-git.el > +++ b/lisp/vc/vc-git.el > @@ -838,8 +838,8 @@ vc-git-checkin > > (defun vc-git-find-revision (file rev buffer) > (let* (process-file-side-effects > - (coding-system-for-read 'binary) > - (coding-system-for-write 'binary) > + (coding-system-for-read (or coding-system-for-read 'binary)) > + (coding-system-for-write (or coding-system-for-write 'binary)) > (fullname > (let ((fn (vc-git--run-command-string > file "ls-files" "-z" "--full-name" "--"))) > > then a caller function could set its own value of this dynamic binding. > But I haven't tested yet if it works with UTF-8 file names. This is something that we might want to do anyway (it is IMO rude to unconditionally bind these symbols), but I'm not sure it helps you, because the level you work on is not vc-git. The right value to bind coding-system-for-read here is vc-git-log-output-coding-system, but that is a Git specific value, whereas you are trying to provide a VCS-independent feature, which should work with any supported VCS.