From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: help editing huge files in emacs Date: Fri, 17 Mar 2006 13:50:16 +0200 Message-ID: References: <87hd605jlx.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1142596236 11760 80.91.229.2 (17 Mar 2006 11:50:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Mar 2006 11:50:36 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 17 12:50:34 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FKDTJ-0001iY-Jy for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Mar 2006 12:50:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKDTI-0001LB-Ta for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Mar 2006 06:50:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FKDT9-0001Ks-3X for help-gnu-emacs@gnu.org; Fri, 17 Mar 2006 06:50:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FKDT7-0001KO-Jf for help-gnu-emacs@gnu.org; Fri, 17 Mar 2006 06:50:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKDT7-0001KJ-Ft for help-gnu-emacs@gnu.org; Fri, 17 Mar 2006 06:50:09 -0500 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FKDXz-0002BV-1e for help-gnu-emacs@gnu.org; Fri, 17 Mar 2006 06:55:11 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-84-228-141-3.inter.net.il [84.228.141.3]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DTR15981 (AUTH halo1); Fri, 17 Mar 2006 13:50:07 +0200 (IST) Original-To: help-gnu-emacs@gnu.org In-reply-to: <87hd605jlx.fsf-monnier+gnu.emacs.help@gnu.org> (message from Stefan Monnier on Wed, 15 Mar 2006 01:09:11 -0500) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33859 Archived-At: > From: Stefan Monnier > Date: Wed, 15 Mar 2006 01:09:11 -0500 > > > 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. ??? But aren't those parameters limited to EMACS_INT max values, i.e. to the same number of less-than-32 bits that limits the maximum size of an Emacs buffer? Or am I missing something? If I'm right, then editing of a 4GB file using your suggestions is possible only in a 64-bit build of Emacs.