From: Juri Linkov <juri@linkov.net>
To: Andrea Cardaci <cyrus.and@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Detecting the coding system of a file programmatically
Date: Fri, 17 Aug 2018 00:27:22 +0300 [thread overview]
Message-ID: <874lfudmth.fsf@mail.linkov.net> (raw)
In-Reply-To: <CACMsj9M38DGS5rE4VoJScf6K-WPT_VsMQWZ-EMKoQfy-E3WMBw@mail.gmail.com> (Andrea Cardaci's message of "Fri, 10 Aug 2018 03:02:55 +0200")
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
> 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 #2: dired-diff.el --]
[-- Type: application/emacs-lisp, Size: 984 bytes --]
next prev parent reply other threads:[~2018-08-16 21:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 1:02 Detecting the coding system of a file programmatically Andrea Cardaci
2018-08-10 7:28 ` Eli Zaretskii
2018-08-10 13:37 ` Andrea Cardaci
2018-08-10 13:54 ` Eli Zaretskii
2018-08-10 14:47 ` Andrea Cardaci
2018-08-10 15:26 ` Stefan Monnier
2018-08-16 21:27 ` Juri Linkov [this message]
2018-08-17 11:33 ` Andrea Cardaci
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874lfudmth.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=cyrus.and@gmail.com \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).