all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Memory-efficient way of opening large files in Emacs read-only
Date: Fri, 9 Dec 2022 06:21:54 +0100	[thread overview]
Message-ID: <Y5LF8m/wEX7si47d@tuxteam.de> (raw)
In-Reply-To: <d19f3043-bbc3-a73a-17da-cb72d75cfcbc@mikpom.ru>

[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

      reply	other threads:[~2022-12-09  5:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08  2:49 Memory-efficient way of opening large files in Emacs read-only Mikhail Pomaznoy
2022-12-08 14:13 ` Filipp Gunbin
2022-12-08 14:27 ` Marcin Borkowski
2022-12-09  3:03   ` Mikhail Pomaznoy
2022-12-09  5:21     ` tomas [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5LF8m/wEX7si47d@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.