emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Phil Regier <pregier@ittc.ku.edu>
To: emacs-orgmode@gnu.org
Subject: Babel #+CALL: results?
Date: Tue, 12 Nov 2013 16:54:24 -0600 (CST)	[thread overview]
Message-ID: <1546434227.8905.1384296864359.JavaMail.root@ittc.ku.edu> (raw)
In-Reply-To: <179869262.8638.1384295274080.JavaMail.root@ittc.ku.edu>

I'm new to Babel -- I've been using Org for the last few years just to organize and typeset simple LaTeX for PDF and MathJax export -- and furthermore have had to compile Emacs from scratch and install into my home directory (installing Org as an ELPA package) to get my versions to sync up with the Worg documentation, so I may have broken something, but I've had no end of trouble trying to get even the simplest named block calls to produce output.

As I understand Worg, and some old list messages from gmane, the following should produce meaningful output:

#+NAME: testfun
#+BEGIN_SRC sh :var Var1="Val1"                                                                                      
echo "Var1:  $Var1"                                                                                                  
#+END_SRC                                                                                                            

#+CALL: testfun[:results output](Var1="Val3") :results output verbatim

#+RESULTS:
: ""                                                                                                                 


*Once* I got output, but I could not reproduce this after making and undoing a few formatting changes; I would chalk this up to my own cluelessness, except that I can get what I *think* is statefully incorrect output from the first block:

Iteration 1 (control case):  Begin with only the #+NAME: ... #+END_SRC with ":results verbatim" and execute block to get

#+NAME: testfun
#+BEGIN_SRC sh :var Var1="Val1" :results output verbatim
echo "Var1:  $Var1"
#+END_SRC

#+RESULTS: testfun
: Var1:  Val1
                                                                                     

Iteration 2:  Replace ":results output verbatim" with ":results output raw" and execute block to get

#+NAME: testfun
#+BEGIN_SRC sh :var Var1="Val1" :results output raw
echo "Var1:  $Var1"
#+END_SRC

#+RESULTS: testfun
Var1:  Val1


Iteration 3:  Change back to ":results output verbatim" and execute block to get

#+NAME: testfun
#+BEGIN_SRC sh :var Var1="Val1" :results output verbatim
echo "Var1:  $Var1"
#+END_SRC

#+RESULTS: testfun
=Var1:  Val1
=Var1:  Val1


Iteration 3+n:  Execute the same block to get

#+NAME: testfun
#+BEGIN_SRC sh :var Var1="Val1" :results output verbatim
echo "Var1:  $Var1"
#+END_SRC

#+RESULTS: testfun
=Var1:  Val1
==Var1:  Val1
==Var1:  Val1
(prev. line repeated n times total)
=Var1:  Val1


Is this intended behavior?  I will admit I don't understand Babel's output modes sufficiently well to know for sure; *however*, I also believe my one isolated success in getting output from #+CALL: was a side effect of this stateful behavior.  If this is likely to be due to a bad install/configuration, can anyone clarify the "right" way to get a current org-mode installation (or at least, a version that corresponds to one or more "official" online documentation repositories) as an unprivileged user on a system that already has a prepackaged emacs installation?  If this is intended behavior, where can I find the right combination of :results properties to pass output from a named block to a later call for display and/or export?

Running from my current home directory installation, here are my emacs and Org versions:

GNU Emacs 24.3.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9) of 2013-11-10 on <host>
Org-mode version 8.2.2 (8.2.2-dist @ /<homedir>/.emacs.d/elpa/org-20131108/)

Any guidance would be greatly appreciated...


Phil Regier
pregier@ittc.ku.edu

       reply	other threads:[~2013-11-12 22:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <179869262.8638.1384295274080.JavaMail.root@ittc.ku.edu>
2013-11-12 22:54 ` Phil Regier [this message]
2013-11-12 23:13   ` Babel #+CALL: results? Aaron Ecay
2013-11-12 23:40     ` Phil Regier

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=1546434227.8905.1384296864359.JavaMail.root@ittc.ku.edu \
    --to=pregier@ittc.ku.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).