From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: map-file-lines Date: Mon, 02 Feb 2009 20:52:20 +0100 Message-ID: References: <86wsc87o3c.fsf@lifelogs.com> <86skmw7ig6.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233604676 29691 80.91.229.12 (2 Feb 2009 19:57:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2009 19:57:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 02 20:59:10 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LU4wm-0000NS-R6 for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 20:59:09 +0100 Original-Received: from localhost ([127.0.0.1]:36762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU4vU-0004tk-9J for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 14:57:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LU4vF-0004kw-N0 for emacs-devel@gnu.org; Mon, 02 Feb 2009 14:57:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LU4vD-0004j0-Sy for emacs-devel@gnu.org; Mon, 02 Feb 2009 14:57:33 -0500 Original-Received: from [199.232.76.173] (port=47104 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU4vD-0004ip-KZ for emacs-devel@gnu.org; Mon, 02 Feb 2009 14:57:31 -0500 Original-Received: from iwfs.imcode.com ([82.115.149.64]:33768 helo=gate.verona.se) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LU4vD-0007Aj-1P for emacs-devel@gnu.org; Mon, 02 Feb 2009 14:57:31 -0500 Original-Received: from localhost.localdomain (IDENT:1005@localhost [127.0.0.1]) by gate.verona.se (8.13.4/8.11.4) with ESMTP id n12JvNp8026470; Mon, 2 Feb 2009 20:57:23 +0100 In-Reply-To: <86skmw7ig6.fsf@lifelogs.com> (Ted Zlatanov's message of "Mon, 02 Feb 2009 13:22:01 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:108628 Archived-At: Ted Zlatanov writes: > On Mon, 02 Feb 2009 13:54:30 -0500 Stefan Monnier wrote: > >>> Emacs Lisp lacks a good way to iterate over all the lines of a file, >>> especially for a large file. > > SM> I'm not really happy about focusing on "line at a time". It's a useful > SM> and common case, but Emacs usually is pretty good about being "line > SM> agnostic" (font-lock being an obvious counter example). > > SM> Providing some kind of stream-processing functionality might be good, > SM> tho the need doesn't seem terribly high, since we've managed to avoid it > SM> until now. > > Without this function, Emacs simply can't handle large files and that's > been requested at least 4 times by users that I can recall. I think a > general solution to the large file Emacs problem would be better, but > line-oriented processing is a classic approach to processing large files > that many Emacs users will probably find familiar. > > SM> FWIW, another option is to provide an open-file-stream along the same > SM> lines as open-network-stream. I.e. the chunks are received via > SM> a process filter. > > How is that better than insert-file-contents as I use it? Are you > thinking of a stateful back/forward seek capability? Or do you mean > you'd like it to be asynchronous? I would like to add my voice in requesting "large file" capability in Emacs. I wanted it many times over the years, but always coped-out into some other editor for this. A common example is hex-editing a large binary file, or finding some text in some enourmous log-file. > > Ted > > -- Joakim Verona