From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Johan Andersson Newsgroups: gmane.emacs.help Subject: Datastructure for table Date: Thu, 14 Jan 2010 22:00:03 +0000 Message-ID: <929ccd881001141400o6c4f31eat72d3c100987c5952@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6db2d235861ee047d270246 X-Trace: ger.gmane.org 1263510200 23738 80.91.229.12 (14 Jan 2010 23:03:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Jan 2010 23:03:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 15 00:03:12 2010 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 1NVYib-0005be-5O for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jan 2010 00:03:09 +0100 Original-Received: from localhost ([127.0.0.1]:42000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVYib-000715-Fw for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jan 2010 18:03:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVYiF-00070i-4F for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 18:02:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVYi9-0006zS-4z for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 18:02:46 -0500 Original-Received: from [199.232.76.173] (port=59702 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVYi9-0006zP-0j for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 18:02:41 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:40601) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NVYi8-0005Sj-9O for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 18:02:40 -0500 Original-Received: from mail-ew0-f209.google.com ([209.85.219.209]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVXjw-0002wI-Sg for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 17:00:31 -0500 Original-Received: by ewy1 with SMTP id 1so21709ewy.8 for ; Thu, 14 Jan 2010 14:00:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=+vWKehZZFSAdqcmdjWMlZMZSSu82Yh4grsCY8Y9m8iU=; b=XZOo0ht52ICbJ/UEzZYkmstulxpr/mO0lW/XXArSC/c/O2o0BBAl8RMzGgflzazYvp wjte6hD2QusxpNPv2StflV+gdfHQn3wNkTyr3qjqHNTZ0yaInZVDsyrpScMewpBdMQoT 4KqPNALopUM4El8vNtrONj55PfCZ+75BJRb6c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=PI2S7d6eITzEe978hUxHGASqyoZUs1AIbo0hkMX6vm75hWrjPdo93cJcU4fBP6onrr B3OMZ2xflsJANTc1KRX1yl3EUR+Be84STU9ryBJ2/CF3aCM10/GJraN90qY+PsfckOtb goOzUglIUtXCJhyVzY1JJWDVyDv5zmoN2O+Sw= Original-Received: by 10.216.85.17 with SMTP id t17mr478003wee.178.1263506403383; Thu, 14 Jan 2010 14:00:03 -0800 (PST) X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:71226 Archived-At: --0016e6db2d235861ee047d270246 Content-Type: text/plain; charset=ISO-8859-1 Hey, I have an Org-table looking like this: | person | car | wife | | John | Volvo | Susan | | Peter | BMW | Greta | | Stefan | Golf | Althea | I want to parse this so that I get one object per row (execpt the header, which defines the keys). So if I for example have the first object, I want to be able to fetch the value of some column given the header key. The table is dynamic and can have any number of columns and the header names differ. What kind of datastructure would fit for this? I can think of a few that may work (Hash-table, Struct and Plist), but none that fit very well. Thanks! --0016e6db2d235861ee047d270246 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hey,

I have an Org-table looking like this:
| person | car =A0 = =A0 | wife =A0 =A0=A0 |
| John=A0=A0=A0=A0 | Volvo | Susan |
| Peter= =A0=A0=A0 | BMW=A0 | Greta=A0=A0 |
| Stefan=A0 | Golf=A0=A0=A0 | Althea= =A0 |

I want to parse this so that I get one object per row (execpt = the
header, which defines the keys). So if I for example have the first
obje= ct, I want to be able to fetch the value of some column given the
header= key. The table is dynamic and can have any number of columns
and the he= ader names differ.

What kind of datastructure would fit for this? I can think of a few
= that may work (Hash-table, Struct and Plist), but none that fit very
wel= l.

Thanks!
--0016e6db2d235861ee047d270246--