emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Stanton <stanton@haas.berkeley.edu>
To: emacs-orgmode@gnu.org
Cc: tririverwangyi@gmail.com
Subject: Re: Babel language support for Mathematica
Date: Fri, 13 Mar 2015 16:06:12 -0700	[thread overview]
Message-ID: <0E109199-8E68-4B76-A1D9-20105FF0C1D3@haas.berkeley.edu> (raw)

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

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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 23:06 Richard Stanton [this message]
2015-03-13 23:09 ` Babel language support for Mathematica John Kitchin
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:
  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=0E109199-8E68-4B76-A1D9-20105FF0C1D3@haas.berkeley.edu \
    --to=stanton@haas.berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=tririverwangyi@gmail.com \
    /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).