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

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

Re: Reading portions of large files


From: David Kastrup
Subject: Re: Reading portions of large files
Date: 10 Jan 2003 21:51:49 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Eli Zaretskii" <eliz@is.elta.co.il> writes:

> > From: David Kastrup <dak@gnu.org>
> > Newsgroups: gnu.emacs.help
> > Date: 09 Jan 2003 19:20:06 +0100
> > 
> > > I have very large files, sometimes over 1G, from which I would
> > > like to edit very small portions, the headers or trailers for
> > > example.  Emacs won't open those files, it complains about them
> > > being too big.  Is it possible to edit, and save back after
> > > editing, only small portions of such files.
> > 
> > insert-file-contents is a built-in function.
> > (insert-file-contents FILENAME &optional VISIT BEG END REPLACE)
> 
> I don't think this will help the OP, since BEG and END need to be
> representable as Lisp integers, so they still are subject to the same
> 128-MB limit.

Oops, I forgot.  In that case it would probably be best to run dd
from or to pipes with appropriate options for writing and reading
pieces from a big file.

BTW, would it be terribly complicated to extend the range of Lisp
integers to 31bit?  Integers don't need any garbage collection or tag
bits per se.  One could still use, say, the upper byte (or a smaller
unit) as a tag byte, only that the first or last 128 values would all
signify "integer".

Emacs has a most-positive-fixnum of 134217727, while XEmacs has
1073741823, more than 8 times as much.  So it would appear to be
possible in theory.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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