emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Babel][Bug] Inconsistent output from babel function depending on how called
@ 2011-05-26 18:37 Ethan Ligon
  2011-05-26 18:46 ` Eric Schulte
  0 siblings, 1 reply; 8+ messages in thread
From: Ethan Ligon @ 2011-05-26 18:37 UTC (permalink / raw)
  To: Emacs-orgmode@gnu.org

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-27 16:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26 18:37 [Babel][Bug] Inconsistent output from babel function depending on how called Ethan Ligon
2011-05-26 18:46 ` 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

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).