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: Reading huge files Date: Wed, 10 Jan 2007 06:11:24 +0200 Message-ID: References: <8642ba650701081417n3c658d33v6dbf743a9bd30c7c@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1168402301 23871 80.91.229.12 (10 Jan 2007 04:11:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Jan 2007 04:11:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 10 05:11:40 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H4UoN-0001YS-UE for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Jan 2007 05:11:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4UoN-0005tJ-8r for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jan 2007 23:11:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H4Uo6-0005sw-Hr for help-gnu-emacs@gnu.org; Tue, 09 Jan 2007 23:11:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H4Uo4-0005sQ-MP for help-gnu-emacs@gnu.org; Tue, 09 Jan 2007 23:11:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4Uo4-0005sN-H7 for help-gnu-emacs@gnu.org; Tue, 09 Jan 2007 23:11:20 -0500 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H4Uo3-00052G-PR for help-gnu-emacs@gnu.org; Tue, 09 Jan 2007 23:11:20 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-83-130-193-163.inter.net.il [83.130.193.163]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id GTW43688 (AUTH halo1); Wed, 10 Jan 2007 06:11:17 +0200 (IST) Original-To: help-gnu-emacs@gnu.org In-reply-to: (message from Mathias Dahl on Wed, 10 Jan 2007 00:29:15 +0100) 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:40207 Archived-At: > From: Mathias Dahl > Date: Wed, 10 Jan 2007 00:29:15 +0100 > > Eli Zaretskii writes: > > > Does this really work? I think it won't: the underlying problem is > > that for large files, END overflows the limits of the ELisp integer > > type, and your suggestion doesn't resolve this fundamental problem. > > So insert-file-contents will still barf with large files. > > > > Or am I missing something? > > I have only tested the code below with a 700 MB large movie file, and > that is probably within the bounds you talk about. But even if it > would fail (when does it fail?), being able to browse files hundreds > of MB in size seems quite nice. Hence my new hack below. If this is a 32-bit machine, then the Lisp integer overflows at 256MB. If that's a 64-bit machine, then you don't need any tricks to edit 700MB files.