From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: map-file-lines Date: Mon, 02 Feb 2009 13:22:01 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86skmw7ig6.fsf@lifelogs.com> References: <86wsc87o3c.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 1233602446 21597 80.91.229.12 (2 Feb 2009 19:20:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2009 19:20:46 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 02 20:22:00 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 1LU4Mq-0003gk-E0 for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 20:22:00 +0100 Original-Received: from localhost ([127.0.0.1]:37425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU4LX-0006wh-Np for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 14:20:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LU4LT-0006wA-1y for emacs-devel@gnu.org; Mon, 02 Feb 2009 14:20:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LU4LR-0006vH-Bz for emacs-devel@gnu.org; Mon, 02 Feb 2009 14:20:34 -0500 Original-Received: from [199.232.76.173] (port=55714 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU4LR-0006vE-2v for emacs-devel@gnu.org; Mon, 02 Feb 2009 14:20:33 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:33916 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LU4LQ-00039K-LI for emacs-devel@gnu.org; Mon, 02 Feb 2009 14:20:32 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LU4LQ-00046g-4K for emacs-devel@gnu.org; Mon, 02 Feb 2009 19:20:32 +0000 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Feb 2009 19:20:32 +0000 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Feb 2009 19:20:32 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:iwsdlZ/UUNLZJizY1VUzFpIt9Jg= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:108623 Archived-At: 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? Ted