emacs-devel
[Top][All Lists]
Advanced

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

Re: Detecting the coding system of a file programmatically


From: Juri Linkov
Subject: Re: Detecting the coding system of a file programmatically
Date: Fri, 17 Aug 2018 00:27:22 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> I use `insert-file-contents-literally' because the non-literally
> counterpart is too slow (about twice as much apparently) as it does a
> bunch of stuff in addition to simply populate the buffer.
> Unfortunately, one of these things is to decode the buffer.

For better performance I restrict the size of inserted file by giving to
`insert-file-contents' a small value of args BEG and END.  For example,
to automatically detect encodings of files for diff I use such customization:

Attachment: dired-diff.el
Description: application/emacs-lisp


reply via email to

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