From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: File I/O Date: Thu, 02 Nov 2006 16:54:28 -0000 Organization: Alaska Internet Solutions Message-ID: References: <1162472024.435499.77510@e3g2000cwe.googlegroups.com> Reply-To: tim@johnsons-web.com NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1162489343 15162 80.91.229.2 (2 Nov 2006 17:42:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Nov 2006 17:42:23 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 02 18:42:19 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GfgZq-0005nu-J0 for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Nov 2006 18:42:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GfgZq-0000gd-2k for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Nov 2006 12:42:06 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!news.germany.com!sn-xt-sjc-02!sn-xt-sjc-06!sn-xt-sjc-01!sn-post-sjc-01!supernews.com!news.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.8.0 (Linux) Original-X-Complaints-To: abuse@supernews.com Original-Lines: 40 Original-Xref: shelby.stanford.edu gnu.emacs.help:142889 Original-To: help-gnu-emacs@gnu.org 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:38508 Archived-At: On 2006-11-02, Robert Thorpe wrote: >> IOWS: read a file >> process stream a line at a time >> process programmatically > > Not really. The normal way of doing the above is to create a buffer > for the file first. > > It might be better if you tell us what you're trying to do, that makes > it easier to suggest something. My hope was to read a file into an emacs data structure. text delimited by an arbitrary line ( blank or all hyphens as an example) the data structure would be a list of lists. each internal list would have 3 elements. the first two would be strings, the last a list of strings. and the structure would be accessed via 'assoc. ( ;; begin parent structure ( ;; begin element "chop" ;; key "Remove last member" ;; terse description ("Line one" "Line two" "Line three") ;; verbose description ) ) I've created such a structure using a General Purpose Programming Language, but had headaches with escaping. Thought using emacs might bypass that problem. thanks tim -- Tim Johnson http://www.alaska-internet-solutions.com