From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: help editing huge files in emacs Date: Wed, 15 Mar 2006 01:09:11 -0500 Organization: Bell Sympatico Message-ID: <87hd605jlx.fsf-monnier+gnu.emacs.help@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1142555655 16568 80.91.229.2 (17 Mar 2006 00:34:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Mar 2006 00:34:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 17 01:34:14 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 1FK2ut-0003Ey-Oo for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Mar 2006 01:34:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FK2ut-0005d9-7d for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Mar 2006 19:34:07 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:+XxQWjAhJmXu09owHyBhjtiljIs= Original-Lines: 15 Original-NNTP-Posting-Host: 67.71.115.9 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1142402951 67.71.115.9 (Wed, 15 Mar 2006 01:09:11 EST) Original-NNTP-Posting-Date: Wed, 15 Mar 2006 01:09:11 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:138162 Original-To: help-gnu-emacs@gnu.org 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:33841 Archived-At: > 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. Stefan