From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juan Alvaro Fuentes Subject: Maxima code blocks does not work in windows revisited Date: Thu, 10 Jul 2014 21:48:48 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c032c00886d204fddc1dfc Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5KKy-00018E-7g for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 15:49:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5KKw-00008t-Qh for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 15:49:00 -0400 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:65468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5KKw-00008l-M7 for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 15:48:58 -0400 Received: by mail-qg0-f49.google.com with SMTP id 63so66826qgz.36 for ; Thu, 10 Jul 2014 12:48:58 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a11c032c00886d204fddc1dfc Content-Type: text/plain; charset=UTF-8 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 --001a11c032c00886d204fddc1dfc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Dear all,

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

#+begin_src maxima
=C2=A0a: 1+1;
=C2=A0print(a);
<= div>#+end_src

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

The conversation ended up with a final reflection which I copy n= ext:

&g=
t; Okay, it definitely is a Windows problem. If I run the following comm=
and
> in a cygwin shell, everything works as expected:
>
> maxima --very-quiet -r
> 'batchload("c:/Users/weiss/AppData/Local/Temp/babel-17716a=
LH/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 m= axima execute the batch file in windows I found that this command does work= :
maxima --=
very-quiet -r "batchload(\"c:/Users/alvaro/AppData/Local/Temp/bab=
el-7740OHt/maxima-7740OpY.max\")$"
maxima --very-quiet -r "batchload(\&=
quot;c:/Users/alvaro/AppData/Local/Temp/babel-7740OHt/maxima-7740OpY.max\&q=
uot;)$"
2 

I=
 tried to make this string when maxima is executed in the shell and modifyi=
ng 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\\\&quo=
t;)$\" %s"
			     org-babel-maxima-command in-file cmdline)))

The prob=
lem 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.

<=
span style=3D"font-family:arial">Thanks,
Juan Alvaro
--001a11c032c00886d204fddc1dfc--