Dear all,

It seems that maxima code blocks still does not work in windows as the
following code did not work when I tried to run it:

#+begin_src maxima
 a: 1+1;
 print(a);
#+end_src

This is an old issue already emailed to this emacs org-mode list in an
email dating from june 2011.

The conversation ended up with a final reflection which I copy next:

>* Okay, it definitely is a Windows problem. If I run the following command*
>* in a cygwin shell, everything works as expected:*
>
>* maxima --very-quiet -r*
>* 
>'batchload("c:/Users/weiss/AppData/Local/Temp/babel-17716aLH/maxima-17716hCp")$'*
>* nil*
>
>* However, it does not work in a Windows shell. But this is no longer an*
>* org issue.*
>
>* Bernd*


Trying to find the correct string that makes maxima execute the batch
file in windows I found that this command does work:

maxima --very-quiet -r
"batchload(\"c:/Users/alvaro/AppData/Local/Temp/babel-7740OHt/maxima-7740OpY.max\")$"

maxima --very-quiet -r
"batchload(\"c:/Users/alvaro/AppData/Local/Temp/babel-7740OHt/maxima-7740OpY.max\")$"

2


I tried to make this string when maxima is executed in the shell and
modifying ob-maxima.el found that this seems to work for windows 8,
emacs 24.4 and org 8.2.7b:


 (let* ((cmdline (or (cdr (assoc :cmdline params)) ""))
          (in-file (org-babel-temp-file "maxima-" ".max"))
                (cmd (format "%s --very-quiet -r \"batchload(\\\"%s\\\")$\" %s"
                             org-babel-maxima-command in-file cmdline)))


The problem is that my lisp skills are not very good, to say the
least, and sending a patch is one more problem so I write this email
if this can help anybody to makemaxima code blocks work in windows.


Thanks,

Juan Alvaro

Reply via email to