emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ethan Ligon <ligon@are.berkeley.edu>
To: "Emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: [Babel][Bug] Inconsistent output from babel function depending on how called
Date: Thu, 26 May 2011 11:37:33 -0700	[thread overview]
Message-ID: <BANLkTi=H9tasSwrPy6+JkSjeUz-J_DJtgw@mail.gmail.com> (raw)

I'd like to call a simple babel code block to generate org-code
If I define a list thusly:

#+results: list1
 - foo
 - bar

Then I define a code block thusly, and execute it by C-c C-c on the
"source" line.  That yields the desired result: a sequence of headings
under "#+results: print_list".

#+source: print_list(lst=list1)
#+begin_src sh :results output org
  for i in $lst; do
    echo "* $i"
  done
#+end_src

#+results: print_list
#+BEGIN_ORG
* foo
* bar
#+END_ORG

Now I want to reuse the code block to generate other sequences of
headings.  But even if I call it with the *same* list, instead of the
desired headings, I get a literal, as below.

#+call: print_list(lst=list1)

#+results: print_list(lst=list1)
: * foo
: * bar

I think this qualifies as a bug---surely the method of calling the
code block shouldn't affect the output?

Thoughts, patches, or work-arounds welcomed!

Thanks,
-Ethan

-- 
Ethan Ligon, Associate Professor
Agricultural & Resource Economics
University of California, Berkeley

             reply	other threads:[~2011-05-26 18:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 18:37 Ethan Ligon [this message]
2011-05-26 18:46 ` [Babel][Bug] Inconsistent output from babel function depending on how called Eric Schulte
2011-05-26 19:17   ` Christian Moe
2011-05-27  1:04     ` Ethan Ligon
2011-05-27 15:28       ` Eric Schulte
2011-05-27 16:35     ` Eric Schulte
2011-05-26 19:36   ` Ethan Ligon
2011-05-26 23:57     ` 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='BANLkTi=H9tasSwrPy6+JkSjeUz-J_DJtgw@mail.gmail.com' \
    --to=ligon@are.berkeley.edu \
    --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).