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

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

Re: Stream-based Scanning of File-Buffers


From: Juanma Barranquero
Subject: Re: Stream-based Scanning of File-Buffers
Date: Fri, 25 Sep 2009 14:55:34 +0200

On Fri, Sep 25, 2009 at 14:12, Nordlöw <per.nordlow@gmail.com> wrote:

> Is there a way to perform string/regexp scanning (using search-forward
> or re-search-forward) in a file-buffer whose contents is loaded only
> when it's needed, kind of like file streams in C, so that I only do a
> physical read on the blocks that I actually scan and then skip the
> rest of the file as soon as I get a hit.

You can use `insert-file-contents' to implement something like that;
presumably, the only tricky part is taking care of matches across
block boundaries.

    Juanma




reply via email to

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