[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Help with tangling a table into a source-code representation of the

From: Grant Rettke
Subject: [O] Help with tangling a table into a source-code representation of the data contained within
Date: Mon, 24 Feb 2014 22:37:58 -0600


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)


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 though.


Grant Rettke | ACM, AMA, COG, IEEE
address@hidden | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]