From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: using org-babel-trim in org-sbe?
Date: Thu, 03 Apr 2014 13:48:44 +0200 [thread overview]
Message-ID: <m2fvluvdk3.fsf@polytechnique.org> (raw)
Hello,
I noticed a call to org-sbe failed because there were some extra spaces
present in one argument. I tried to clean them up before calling the
code block, but instead I'm getting literally what I'm writing. Here is
an example:
--8<---------------cut here---------------start------------->8---
#+name: spending
#+begin_src sh :var c="bar" :results output
echo "res:$c:"
#+end_src
| Name | Test1 | Test2 |
|------+-------------+------------------------------|
| Food | res: Food : | res: (org-babel-trim Food) : |
#+TBLFM: $2='(org-sbe spending (c (concat "\"" $1 "\"")))::$3='(org-sbe spending (c (concat "\"" (org-babel-trim $1) "\"")))
--8<---------------cut here---------------end--------------->8---
The Test1 column shows the extra space, and the Test2 column my attempt
to clean things up.
I suppose this behavior is due to the fact that org-sbe is a macro, but
I don't know how tell it to evaluate its arguments and not pass them
literally.
Any suggestion on how to proceed?
Thanks,
Alan
next reply other threads:[~2014-04-03 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 11:48 Alan Schmitt [this message]
2014-04-18 13:17 ` using org-babel-trim in org-sbe? Bastien
2014-04-18 16:51 ` Alan Schmitt
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=m2fvluvdk3.fsf@polytechnique.org \
--to=alan.schmitt@polytechnique.org \
--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).