From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.help Subject: Re: Maximum buffer size exceeded Date: Wed, 05 May 2004 13:16:27 -0400 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87isfan6ac.fsf@cs.cmu.edu> References: <7iekpzljjq.fsf@neoscale.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083777798 10828 80.91.224.253 (5 May 2004 17:23:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 May 2004 17:23:18 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Kin Cho Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 05 19:23:10 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BLQ6w-0002cN-00 for ; Wed, 05 May 2004 19:23:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLQ4Z-0000pt-Qb for geh-help-gnu-emacs@m.gmane.org; Wed, 05 May 2004 13:20:43 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BLQ3t-0000lR-JW for help-gnu-emacs@gnu.org; Wed, 05 May 2004 13:20:01 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BLQ0z-0007YZ-8e for help-gnu-emacs@gnu.org; Wed, 05 May 2004 13:17:32 -0400 Original-Received: from [205.201.10.244] (helo=maru) by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BLQ0c-00077z-Oh for help-gnu-emacs@gnu.org; Wed, 05 May 2004 13:16:39 -0400 Original-Received: from md5i by maru with local (Exim 4.32) id 1BLQ0R-0003lG-ID; Wed, 05 May 2004 13:16:27 -0400 Original-To: Harish Narayanan In-Reply-To: (Harish Narayanan's message of "Tue, 04 May 2004 23:26:17 -0400") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:18275 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:18275 Harish Narayanan writes: > Thanks Kin. > > I do things like that when I need to edit the last or first few > lines. What if the portions I need edited are at some arbitrary line > numbers in the middle? I don't always know exactly where they will be. I had to deal with this recently for some files, as I ended up using something like "split -C 100m". You can use cat to rejoin them afterwards. > Kin Cho wrote: > >>Harish Narayanan writes: >> >> >> >>>I've been trying to open a large file (208 MB) but I receive the >>>error "Maximum buffer size exceeded" and Emacs fails to open the >>>file. This is Emacs 21.2.1 on a Redhat GNU/Linux 9 box. >>> >>>I tried searching in the archives, and noticed this has been >>>asked before, but the responses don't seem encouraging. Is there >>>a way of working around this that's arisen in the recent past? >>> >>> >> >>Use head/tail/dd to extract the small part of the file you want >>to edit, edit that small file, then use cat/head/tail/dd to put >>it back into your original file. >> >>Let's say you want to edit the last line of the file 208MB, which >>is 1 million lines long: >> >>tail -1 208MB > foo >>emacs foo >>(head -999999 208MB; cat foo) > new-208MB >> >>-kin >> >>_______________________________________________ >>Help-gnu-emacs mailing list >>Help-gnu-emacs@gnu.org >>http://mail.gnu.org/mailman/listinfo/help-gnu-emacs >> >> >> > > > -- Michael Welsh Duggan (md5i@cs.cmu.edu)