emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <Rainer@krugs.de>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	Grant Rettke <gcr@wisdomandwonder.com>
Subject: Re: Help with tangling a table into a source-code representation of the data contained within
Date: Tue, 25 Feb 2014 10:00:58 +0100	[thread overview]
Message-ID: <m28usz4ldh.fsf@krugs.de> (raw)
In-Reply-To: <m21tyrre3z.fsf@tsdye.com> (Thomas S. Dye's message of "Mon, 24 Feb 2014 18:49:20 -1000")

[-- Attachment #1: Type: text/plain, Size: 1956 bytes --]

tsd@tsdye.com (Thomas S. Dye) writes:

> Aloha Grant,
>
> Grant Rettke <gcr@wisdomandwonder.com> 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:      Rainer@krugs.de

Skype:      RMkrug

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

  reply	other threads:[~2014-02-25  9:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25  4:37 Help with tangling a table into a source-code representation of the data contained within Grant Rettke
2014-02-25  4:45 ` Samuel Wales
2014-02-25  4:49 ` Thomas S. Dye
2014-02-25  9:00   ` Rainer M Krug [this message]
2014-02-26  4:41     ` Grant Rettke
2014-02-26  5:21       ` Grant Rettke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m28usz4ldh.fsf@krugs.de \
    --to=rainer@krugs.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=gcr@wisdomandwonder.com \
    --cc=tsd@tsdye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).