[Top][All Lists]

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

Re: map-file-lines

From: Ted Zlatanov
Subject: Re: map-file-lines
Date: Mon, 02 Feb 2009 13:22:01 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Mon, 02 Feb 2009 13:54:30 -0500 Stefan Monnier <address@hidden> wrote: 

>> Emacs Lisp lacks a good way to iterate over all the lines of a file,
>> especially for a large file.

SM> I'm not really happy about focusing on "line at a time".  It's a useful
SM> and common case, but Emacs usually is pretty good about being "line
SM> agnostic" (font-lock being an obvious counter example).

SM> Providing some kind of stream-processing functionality might be good,
SM> tho the need doesn't seem terribly high, since we've managed to avoid it
SM> until now.

Without this function, Emacs simply can't handle large files and that's
been requested at least 4 times by users that I can recall.  I think a
general solution to the large file Emacs problem would be better, but
line-oriented processing is a classic approach to processing large files
that many Emacs users will probably find familiar.

SM> FWIW, another option is to provide an open-file-stream along the same
SM> lines as open-network-stream.  I.e. the chunks are received via
SM> a process filter.

How is that better than insert-file-contents as I use it?  Are you
thinking of a stateful back/forward seek capability?  Or do you mean
you'd like it to be asynchronous?


reply via email to

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