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

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

Re: Memory-efficient way of opening large files in Emacs read-only


From: tomas
Subject: Re: Memory-efficient way of opening large files in Emacs read-only
Date: Fri, 9 Dec 2022 06:21:54 +0100

On Fri, Dec 09, 2022 at 10:03:15AM +0700, Mikhail Pomaznoy wrote:
> Thanks for your replies. Seamless less-like viewing in Emacs (not terminals
> of any kind) is my ultimate goal and I will look into that per Marcin'c
> suggestion. If it will turn out not fun (too difficult), further investment
> into VLF makes total sense.

The elephant in the room is file coding. Emacs tries to get that right,
so usually it has to transform the whole file into its internal coding
system (which is utf8-ish but can cope with non-UTF8 stuff as well).

Less just punts on the problem and leaves it to your terminal to
cope with the display of funny stuff (apart from filtering things
it thinks might break your display, cf. less's options -r, -R and
friends).

So I guess a good starting point for you would be to play with the
function `insert-file-contents-literally' or its interactive sister
`insert-file-literally', which bypass this.

The interesting part would be how Emacs displays potentially strange
stuff in this "raw" mode, I think.

Good luck and keep us posted :)

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


reply via email to

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