bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33567: Syntactic fontification of diff hunks


From: Juri Linkov
Subject: bug#33567: Syntactic fontification of diff hunks
Date: Tue, 04 Dec 2018 01:36:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> BTW, while deciding what to do with this, could you please confirm
>> if I correctly fixed another problem in vc-find-revision-no-save.
>> Recently in bug#33319 I added this function but now discovered
>> a problem with encoding.  A vc process outputs lines to the buffer
>> with no-conversion, so in the patch below I added recode-region
>> to convert output to the buffer's encoding.  coding-system-for-write
>> that I removed was copied from vc-find-revision-save where is was
>> needed for write-region called from the macro with-temp-file,
>> but vc-find-revision-no-save doesn't write output to the file.
>
> vc-find-revision disables encoding/decoding because it wants to
> create an identical copy of the checked-out file, and doesn't want to
> be tripped by encoding/decoding issues.  But in your case you don't
> write the buffer to a file, so why do you need to bind
> coding-system-for-read at all?  I say leave it unbound, and let Emacs
> do its job decoding the text as usual.  Does that not work?

I tried to remove coding-system-for-read binding from
vc-find-revision-no-save, but it still fails to get the buffer
in the right encoding.  Then I discovered that vc-git-find-revision
and also some other VC backend API implementations of find-revision
bind coding-system-for-read too.  It seems that removing
coding-system-for-read from vc-git-find-revision will cause
a lot of breakage.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]