From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Babel language support for Mathematica Date: Fri, 13 Mar 2015 19:09:56 -0400 Message-ID: References: <0E109199-8E68-4B76-A1D9-20105FF0C1D3@haas.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWYiR-0008Jr-PV for emacs-orgmode@gnu.org; Fri, 13 Mar 2015 19:10:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWYiO-00042R-JK for emacs-orgmode@gnu.org; Fri, 13 Mar 2015 19:10:03 -0400 Received: from smtp.andrew.cmu.edu ([128.2.157.37]:36492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWYiO-00042E-ER for emacs-orgmode@gnu.org; Fri, 13 Mar 2015 19:10:00 -0400 In-reply-to: <0E109199-8E68-4B76-A1D9-20105FF0C1D3@haas.berkeley.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: Richard Stanton Cc: emacs-orgmode@gnu.org, tririverwangyi@gmail.com I wonder if this is an output vs value issue on the return of the block. If you set :results output does anything change? or, is there a way to specify a return value? or specifically print something? Richard Stanton writes: > I recently saw this posting about org support for Mathematica. Thanks for writing this! > > Unfortunately, while I can get it to work for simple things (e.g., 2+3), even slightly more complex things don't seem to work. For example, suppose I'd like to define a function f(x) = x + 3, and then calculate f(5). In a MMA notebook, if I type > > f[x_] := x+3 > f[5] > > I get the answer 8. If I try the same code in an org-mode code block, here's what happens: > > #+BEGIN_SRC mathematica > f[x_] := x+3 > f[5] > #+END_SRC > > #+RESULTS: > : Null > > Am I missing something obvious here? > > Thanks very much. > > Richard Stanton -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu