[Top][All Lists]

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

Re: help editing huge files in emacs

From: Stefan Monnier
Subject: Re: help editing huge files in emacs
Date: Wed, 15 Mar 2006 01:09:11 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> How can I edit a selected number of lines in a 4GB file in Emacs
> without open the whole file? Is it possible?

`insert-file-contents' takes two integer parameters BEG and END to allow
getting only part of a file into a buffer.  The corresponding `write-region'
takes an APPEND parameter which can be an integer indicating at which
position in the file the text should be written.

With those two elisp functions, you can read&write parts of files, so you
can do what you want.  But it requires some coding on top of that to make it
really usable (probably some kind of special major or minor mode, or maybe
a file-name-handler) and I don't know of any package that does that.


reply via email to

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