emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: francois@avalenn.eu
To: emacs-orgmode@gnu.org
Subject: table as argument to code block : type of the elements
Date: Thu, 12 Sep 2013 09:43:43 +0200	[thread overview]
Message-ID: <ebfb907516745615e383f18f5ca880b5@avalenn.eu> (raw)

Hello list,

This code does not work because of automatic conversion from string to
number in org-babel-read-table.

#+TBLNAME: table_test
| name  |  id |
|-------+-----|
| name1 | 034 |
| name2 | 135 |
| name3 | 1B5 |

#+NAME: code_test
#+BEGIN_SRC emacs-lisp :var table=table_test
   (setq myv "")
   (dolist (line table myv)
     (unless (eq line 'hline)
       (setq myv (concat myv ";" (mapconcat 'identity line ",")))))
   myv

#+END_SRC

I would like to have this result :

#+RESULTS: code_test
: ;name,id;name1,034;name2,135;name3,1B5

Is there any possibility to deactivate this conversion as with
inhibit-lisp-eval for lisp forms ? Or better is there any way to chose
conversion parameters on a column to column basis ?


François.

             reply	other threads:[~2013-09-12  7:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12  7:43 francois [this message]
2013-09-12  8:42 ` table as argument to code block : type of the elements francois
2013-09-13  4:05 ` Nick Dokos
2013-09-13  4:24   ` Nick Dokos
2013-09-13  4:41 ` Nick Dokos
2013-09-13 17:02   ` Eric Schulte

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=ebfb907516745615e383f18f5ca880b5@avalenn.eu \
    --to=francois@avalenn.eu \
    --cc=emacs-orgmode@gnu.org \
    /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).