emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: Babel language support for Mathematica
@ 2015-03-13 23:06 Richard Stanton
  2015-03-13 23:09 ` John Kitchin
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Stanton @ 2015-03-13 23:06 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: tririverwangyi

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

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Babel language support for Mathematica
@ 2014-01-09  3:46 Yi Wang
  2014-01-09 10:28 ` Bastien
  0 siblings, 1 reply; 14+ messages in thread
From: Yi Wang @ 2014-01-09  3:46 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Yi Wang

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

Hello,

As far as I can find, there is no babel support for Mathematica. So I wrote
one and share it in case other people are interested:

https://github.com/tririver/wy-els/blob/master/ob-mathematica.el

It is also discussed in this blog
http://cosmosimple.blogspot.co.uk/2014/01/evaluate-mathematica-code-in-emacs-org.html


While writing this extension, I have a question: How to add font-lock mode
in org code blocks? I had a read of ob-C and ob-python code and didn't find
out how they do font-lock.

Note that the font lock support for Mathematica is available as mma-mode at
https://github.com/skaslev/emacs.d/blob/master/progmodes/mma.el

For my case in a .m file I have font lock from mma.el, but not src code
blocks.

Best wishes,
Yi

[-- Attachment #2: Type: text/html, Size: 1231 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-03-15 17:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-13 23:06 Babel language support for Mathematica Richard Stanton
2015-03-13 23:09 ` 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

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