emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Richard Stanton <stanton@haas.berkeley.edu>
Cc: emacs-orgmode@gnu.org, tririverwangyi@gmail.com
Subject: Re: Babel language support for Mathematica
Date: Fri, 13 Mar 2015 19:09:56 -0400	[thread overview]
Message-ID: <m21tkssddn.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <0E109199-8E68-4B76-A1D9-20105FF0C1D3@haas.berkeley.edu>

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]
> : 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

  reply	other threads:[~2015-03-13 23:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 23:06 Babel language support for Mathematica Richard Stanton
2015-03-13 23:09 ` John Kitchin [this message]
2015-03-13 23:16   ` Yi Wang
2015-03-15 17:26     ` Richard Stanton
  -- strict thread matches above, loose matches on Subject: below --
2014-01-09  3:46 Yi Wang
2014-01-09 10:28 ` Bastien
2014-01-09 10:34   ` Sebastien Vauban
2014-01-09 10:39     ` Bastien
2014-01-09 10:51   ` Yi Wang
2014-01-09 10:55     ` Bastien
2014-01-09 11:03       ` Yi Wang
2014-01-09 11:15         ` Bastien
2014-01-09 11:31           ` Yi Wang
2014-01-09 11:49             ` Yi Wang

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:

  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=m21tkssddn.fsf@andrew.cmu.edu \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=stanton@haas.berkeley.edu \
    --cc=tririverwangyi@gmail.com \


* 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


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