From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: map-file-lines Date: Mon, 02 Feb 2009 13:54:30 -0500 Message-ID: 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 1233600895 15544 80.91.229.12 (2 Feb 2009 18:54:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2009 18:54:55 +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 19:56:09 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 1LU3xd-0000hG-8N for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 19:55:57 +0100 Original-Received: from localhost ([127.0.0.1]:46786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU3wK-0004Jf-KH for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 13:54:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LU3wH-0004JO-ET for emacs-devel@gnu.org; Mon, 02 Feb 2009 13:54:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LU3wF-0004Ij-Q2 for emacs-devel@gnu.org; Mon, 02 Feb 2009 13:54:32 -0500 Original-Received: from [199.232.76.173] (port=48344 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU3wF-0004If-LH for emacs-devel@gnu.org; Mon, 02 Feb 2009 13:54:31 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:53103) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LU3wF-0008FN-7G for emacs-devel@gnu.org; Mon, 02 Feb 2009 13:54:31 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgMFAN/PhknO+IQk/2dsb2JhbACBbspFhBQGgmw X-IronPort-AV: E=Sophos;i="4.37,366,1231131600"; d="scan'208";a="33215310" Original-Received: from 206-248-132-36.dsl.teksavvy.com (HELO pastel.home) ([206.248.132.36]) by ironport2-out.teksavvy.com with ESMTP; 02 Feb 2009 13:54:30 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 678138229; Mon, 2 Feb 2009 13:54:30 -0500 (EST) In-Reply-To: <86wsc87o3c.fsf@lifelogs.com> (Ted Zlatanov's message of "Mon, 02 Feb 2009 11:20:07 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:108618 Archived-At: > Emacs Lisp lacks a good way to iterate over all the lines of a file, > especially for a large file. I'm not really happy about focusing on "line at a time". It's a useful and common case, but Emacs usually is pretty good about being "line agnostic" (font-lock being an obvious counter example). Providing some kind of stream-processing functionality might be good, tho the need doesn't seem terribly high, since we've managed to avoid it until now. FWIW, another option is to provide an open-file-stream along the same lines as open-network-stream. I.e. the chunks are received via a process filter. Stefan