[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: view/edit large files
From: |
Ted Zlatanov |
Subject: |
Re: view/edit large files |
Date: |
Fri, 06 Feb 2009 15:06:17 -0600 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
On Fri, 6 Feb 2009 14:20:45 +0100 Mathias Dahl <address@hidden> wrote:
MD> This is how far I got:
MD> http://www.emacswiki.org/emacs/vlf.el
Thank you, I looked at it and it's almost exactly what I was thinking
originally (but actually implemented :). I would like it, however, to
be a minor mode rather than a major one so it's more generally useful.
Also writing modifications back is an interesting challenge.
MD> What I do know is that it hits the roof when the file is larger than
MD> that integer limit in Emacs, whatever it is.
Modifying insert-file-contents to take float or list arguments to
specify the file position should not be too hard--I assume that's the
place where it fails. Using floats bothers me a bit. I'd really like
the offet to be a pair of integers, similar to the time storage in
Emacs.
I also got these comments from Chetan Pandya that I wanted to answer
here:
CP> Is this for editing binary files or file with single byte encoding?
CP> If not, it gets more complicated.
It must be single-byte or binary. insert-file-contents doesn't handle
multibyte encodings and Emacs doesn't have a way to ensure a random seek
is to a valid sequence. I believe this is all fixable, but I don't know
enough about multibyte encodings to be helpful.
CP> Is this to be the major mode for the file? In that case it may be
CP> OK. Otherwise it wrecks the font lock information and functions that
CP> work with sexp and such syntactic information.
I think as a major mode it's not very useful. You can use `more' or
`less' from the shell to view a large file in a pager. hexl-mode would
be a good major mode for large files, for example.
I don't think the font-lock information is very useful for large files
over multiple lines. The most common case (viewing logs) just needs to
examine a single line. Can you think of large files that have sexps and
other multiline (over 1000 lines) font-lockable data, which Emacs should
handle? I can't think of any common ones. In any case, at worst the
user will fall back to fundamental-mode, and that's better than nothing.
Ted
- Re: map-file-lines, (continued)
- Re: map-file-lines, Ted Zlatanov, 2009/02/03
- Re: map-file-lines, Stefan Monnier, 2009/02/02
- Re: map-file-lines, joakim, 2009/02/02
- Re: map-file-lines, Stefan Monnier, 2009/02/02
- Re: map-file-lines, joakim, 2009/02/03
- Re: map-file-lines, Stefan Monnier, 2009/02/03
- Re: map-file-lines, Richard M Stallman, 2009/02/04
- Re: map-file-lines, Ted Zlatanov, 2009/02/04
- Re: map-file-lines, Richard M Stallman, 2009/02/05
- view/edit large files (was: map-file-lines), Ted Zlatanov, 2009/02/06
- Re: view/edit large files,
Ted Zlatanov <=
- Re: view/edit large files, Miles Bader, 2009/02/06
- Re: view/edit large files, Ted Zlatanov, 2009/02/09
- Re: view/edit large files, Stefan Monnier, 2009/02/09
- Re: view/edit large files, Eli Zaretskii, 2009/02/10
- Re: view/edit large files, Miles Bader, 2009/02/10
- Re: view/edit large files, Eli Zaretskii, 2009/02/10
- Re: view/edit large files, Miles Bader, 2009/02/10
- Re: view/edit large files, Eli Zaretskii, 2009/02/10
- Re: view/edit large files, Ted Zlatanov, 2009/02/10
- Re: view/edit large files, Stefan Monnier, 2009/02/17