From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Regier Subject: Babel #+CALL: results? Date: Tue, 12 Nov 2013 16:54:24 -0600 (CST) Message-ID: <1546434227.8905.1384296864359.JavaMail.root@ittc.ku.edu> References: <179869262.8638.1384295274080.JavaMail.root@ittc.ku.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgMqw-00021V-Fb for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 17:54:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgMqp-0000Tx-GB for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 17:54:34 -0500 Received: from stephens.ittc.ku.edu ([129.237.125.220]:52049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgMqp-0000Tm-9i for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 17:54:27 -0500 Received: from zimbra.ittc.ku.edu (zimbra.ittc.ku.edu [129.237.125.105]) by stephens.ittc.ku.edu (Postfix) with ESMTP id 808E9940112 for ; Tue, 12 Nov 2013 16:54:24 -0600 (CST) Received: from zimbra.ittc.ku.edu (localhost.localdomain [127.0.0.1]) by zimbra.ittc.ku.edu (Postfix) with ESMTP id 72D18C2137 for ; Tue, 12 Nov 2013 16:54:24 -0600 (CST) Received: from zimbra.ittc.ku.edu (zimbra.ittc.ku.edu [129.237.125.105]) by zimbra.ittc.ku.edu (Postfix) with ESMTP id 6F32EC14BC for ; Tue, 12 Nov 2013 16:54:24 -0600 (CST) In-Reply-To: <179869262.8638.1384295274080.JavaMail.root@ittc.ku.edu> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 Org-mode version 8.2.2 (8.2.2-dist @ //.emacs.d/elpa/org-20131108/) Any guidance would be greatly appreciated... Phil Regier pregier@ittc.ku.edu