[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Help with tangling a table into a source-code representation of
From: |
Rainer M Krug |
Subject: |
Re: [O] Help with tangling a table into a source-code representation of the data contained within |
Date: |
Tue, 25 Feb 2014 10:00:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) |
address@hidden (Thomas S. Dye) writes:
> Aloha Grant,
>
> Grant Rettke <address@hidden> writes:
>
>> 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
>
> I think you want:
> #+header: :var modes-data=modes-data
I don't know about the #+header, but the following works for me perfectly:'
* Columns to evaluate
#+NAME: COLS_TO_EVAL
| | name | usable |
|---+---------------+--------|
| 1 | NPPyC | FALSE |
| 2 | DBBVy | TRUE |
| 3 | DBRFy | FALSE |
| 4 | DBSSy | FALSE |
| 5 | levelstress_2 | TRUE |
#+PROPERTY: var+ COLS_TO_EVAL=COLS_TO_EVAL
Cheers,
Rainer
>
> or something similar.
>
> hth,
> Tom
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: address@hidden
Skype: RMkrug
pgp1LLXPfi68L.pgp
Description: PGP signature