From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Help with tangling a table into a source-code representation of the data contained within Date: Mon, 24 Feb 2014 22:37:58 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI9mL-0003ag-1R for emacs-orgmode@gnu.org; Mon, 24 Feb 2014 23:38:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WI9mJ-00064P-NK for emacs-orgmode@gnu.org; Mon, 24 Feb 2014 23:38:00 -0500 Received: from mail-ob0-x22f.google.com ([2607:f8b0:4003:c01::22f]:36028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI9mJ-00064K-Im for emacs-orgmode@gnu.org; Mon, 24 Feb 2014 23:37:59 -0500 Received: by mail-ob0-f175.google.com with SMTP id va2so5072414obc.6 for ; Mon, 24 Feb 2014 20:37:58 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" Hi, My goal is to define a table in org-mode, display it nicely to humans using export, and tangle that same data table into an elisp data structure for use elsewhere within the program. It might look something like this: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; * Modes This is a place for humans to keep track both of what modes activated for what file types; and also what utilies are used with those modes when they are activated. #+tblname: modes_data | mode name | file_type | paredit | auto-save | |-----------+-----------+---------+-----------| | scheme | .scm | yes | yes | | elisp | .el | yes | yes | | ielm | nil | yes | no | * Test #+begin_src emacs-lisp :noweb tangle :tangle test.el (mapcar (lambda (row) (message (car row))) modes_data) #+end_src ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The problem right now is that modes_data is referenced but not defined anywhere in the tangled file. How do I include the data itself from modes_data as an elisp data structure to be defined during the tangling? What I need help with is: 1. Is the goal I seek realistic? 2. What am I doing wrongly? An alternative that I figured would work fine is to define modes_data in a code block with elisp and export that in the tangling; it would be nicer to use the org table features thoug= h. Regards, --=20 Grant Rettke | ACM, AMA, COG, IEEE gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/ =E2=80=9CWisdom begins in wonder.=E2=80=9D --Socrates ((=CE=BB (x) (x x)) (=CE=BB (x) (x x))) =E2=80=9CLife has become immeasurably better since I have been forced to st= op taking it seriously.=E2=80=9D --Thompson