Thanks. After a bit of experimentation, I found that you can have a block
outputting several lines, but you need to manually add commas and carriage
returns, e.g.,
#+BEGIN_SRC mathematica :results output
f[x_] := 3*x^2+3;
f[8], "\n",
D[f[x],x]
#+END_SRC
#+RESULTS:
: 195
: 6*x
> On Mar 13,
Dear Richard,
You can do:
#+BEGIN_SRC mathematica
f[x_] := x+3;
f[5]
#+END_SRC
Here are explanations: I actually put everything in the SRC block into a
Print[...].
So in the second example, what actually runs is
Print[f[x_] := x+3
f[5]]
This does not return any value. Because what it really d
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
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 calcu
Now it worked. I added (add-to-list 'org-src-lang-modes '("mathematica" .
"mma")). After that font lock and edit source works. Thank @Bastien for the
help!
On Thu, Jan 9, 2014 at 11:31 AM, Yi Wang wrote:
> Ah, now the problem appears. It says "No such language mode:
> mathematica-mode".
>
> So
Ah, now the problem appears. It says "No such language mode:
mathematica-mode".
So there is a mismatch between the name mathematica (which I used as name
in org-babel extension) and the name mma-mode (which is provided by
mma.el).
However, as auto-mode-alist suggests (where there is ("\\.m\\'" .
Yi Wang writes:
> (1) If I open a .m file, there is font lock. Thus the problem
> shouldn't be binding between mma.el and .m files.
> (2) If I insert a src block of C or python code in org mode, there is
> font lock. Thus the problem shouldn't be org-src-fontify-natively
> (and I checked it is in
> I don't think so, you may just have to check that the mode defined in
> mma.el is automatically boundled with .m files -- which is not the case
> with a default Emacs installation, where .m files are open with
> objc-mode.
I already have this line in my configuration file:
(add-to-list 'auto-mo
Yi Wang writes:
> Yes, I already set this. But curiously the Mathematica code is still
> not highlighted like other codes. I wonder there may be some
> non-standard things inside mma.el (the Mathematica package file major
> mode) then?
I don't think so, you may just have to check that the mode d
Hi, Bastien,
> (By the way, you should fix the .el header, it says that the file is
> part of Emacs while it's not.)
Sorry I thought it was general GPL... Now it is updated. Thank you for
pointing that out!
> (setq org-src-fontify-natively t)
Yes, I already set this. But curiously the Mathemati
Hi Sébastien,
"Sebastien Vauban"
writes:
>> (setq org-src-fontify-natively t)
>
> Shouldn't that be enabled by default, now, as there so many users who
> seems to be unaware of that?
Well, I'm all for it.
> Or is there a fear of impacts on overall performance?
No, I don't think so.
Can you
Hi Bastien,
Bastien wrote:
>> While writing this extension, I have a question: How to add font-lock
>> mode in org code blocks?
>
> (setq org-src-fontify-natively t)
Shouldn't that be enabled by default, now, as there so many users who
seems to be unaware of that?
Or is there a fear of impacts o
Hi Yi,
Yi Wang writes:
> 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
Nice, thanks for sharing!
(By the way, you should fix the .el header
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-mathemati
14 matches
Mail list logo