From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kin Cho Newsgroups: gmane.emacs.help Subject: Re: Maximum buffer size exceeded Date: 04 May 2004 19:00:41 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <7iekpzljjq.fsf@neoscale.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083723464 9574 80.91.224.253 (5 May 2004 02:17:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 May 2004 02:17:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 05 04:17:38 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 1BLByc-0006gW-00 for ; Wed, 05 May 2004 04:17:38 +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 1BLBx7-0007g1-QC for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2004 22:16:05 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!12.24.46.85!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: 12.24.46.85 Original-X-Trace: news.uni-berlin.de 1083722444 937535 I 12.24.46.85 ([151019]) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:122966 Original-To: help-gnu-emacs@gnu.org 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:18253 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:18253 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