emacs-devel
[Top][All Lists]
Advanced

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

Re: sqlite3


From: Lars Ingebrigtsen
Subject: Re: sqlite3
Date: Sun, 12 Dec 2021 05:37:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I don't think we currently have a way to deal with that, but it would be
> good to add one, because sqlite files aren't the one files which are
> typically large and for which we want to have a specialized mode which
> gives access to its content without loading it all upfront
> (e.g. archive-mode could benefit from such a thing).

And for image files, too, I guess?  They're currently loaded in the
least efficient way imaginable -- first we put all the data into a
multibyte buffer (typically using >2x the number of bytes of the
original file), and then we re-read the via from image.c and display the
image.

So perhaps the way to make this workable, we should introduce a new
thing that short-circuits most of the logic in...  `find-file-noselect'?
Like a `special-file-alist' (with the same syntax as `auto-mode-alist')
that calls out to functions to interpret the file and present us with a
buffer in the correct mode.

The buffer returned shouldn't be visiting the file, I guess?  Because we
don't want to accidentally overwrite the file contents, since what we're
displaying in the buffer is just a view into the file, and not the file
itself.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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