emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Frederick Giasson <fred@fgiasson.com>
To: emacs-orgmode@gnu.org
Subject: Table (used a "spreadsheet") org-sbe issues when the value is a string
Date: Wed, 22 Jun 2016 08:37:36 -0400	[thread overview]
Message-ID: <35a64fca-7d01-b382-15f0-568d93af4f61@fgiasson.com> (raw)

Hi Everybody,

I am experiencing a few issues trying to update a cell value using 
=org-sbe= when the value of a column is a string.

Here is an example that works when the value is a number:


====================

#+NAME: average-dataset-size
#+BEGIN_SRC clojure :var f="turtle" :exports none :results value
(identity f)
#+END_SRC

#+RESULTS: average-dataset-size
: turtle


| Format | Sizes distribution in MB | Average size in MB |
|--------+--------------------------+--------------------|
|      7 |                          |                  7 |
#+TBLFM: $3='(org-sbe "average-dataset-size" (f $1))

====================

Now, if I put a string in the format column, I al getting the following:

====================

#+NAME: average-dataset-size
#+BEGIN_SRC clojure :var f="turtle" :exports none :results value
(identity f)
#+END_SRC

#+RESULTS: average-dataset-size
: turtle


| Format | Sizes distribution in MB | Average size in MB |
|--------+--------------------------+--------------------|
| turtle |                          | #ERROR             |
#+TBLFM: $3='(org-sbe "average-dataset-size" (f $1))

====================

The debugging session I have is (which doesn't tell me with Result: is 
#ERROR):

====================

Substitution history of formula
Orig:   ?
$xyz->  '(org-sbe "average-dataset-size" (f $1))
@r$c->  '(org-sbe "average-dataset-size" (f $1))
$1->    '(org-sbe "average-dataset-size" (f "turtle"))
Result: #ERROR
Format: NONE
Final:  #ERROR

====================


Note #1: (identity) is a function in Clojure that returns the same value 
that is in input.


I am wondering if this is a bug, or something that I am missing in how 
to use these features?


Thanks for helping,


Fred

             reply	other threads:[~2016-06-22 12:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 12:37 Frederick Giasson [this message]
2016-06-22 23:06 ` Table (used a "spreadsheet") org-sbe issues when the value is a string Nicolas Goaziou
2017-09-06 15:32   ` Alex Bennée
2017-09-06 16:14     ` Nicolas Goaziou
2017-09-06 21:46       ` Alex Bennée
2017-09-07 15:21         ` Alex Bennée
2017-09-07 16:04           ` Nicolas Goaziou

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=35a64fca-7d01-b382-15f0-568d93af4f61@fgiasson.com \
    --to=fred@fgiasson.com \
    --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).