|
From: | Max Nikulin |
Subject: | Re: Maxima code blocks does not work in windows revisited |
Date: | Thu, 3 Nov 2022 09:35:00 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 |
On 03/11/2022 03:11, Leo Butler wrote:
On Wed, Nov 02 2022, Max Nikulin wrote:On 02/11/2022 11:47, Ihor Radchenko wrote:(for reference, this email is a followup of https://orgmode.org/list/CA+ikm3wqA33xP4c3pVV+F2a-gn0dbEzsdx6Vf2cRd+37+u6pBA@mail.gmail.com)Ihor, you recently applied an alternative patch to Org main branch. Emacs tree still has ob-maxima.el with single quotes around batchload. Nikolay Kudryavtsev. Re: [PATCH] ob-maxima.el: Fix execution on MS Windows. Thu, 30 Dec 2021 23:54:10 +0300. https://list.orgmode.org/8cd49b4c-9342-a77f-d665-402c41432b57@gmail.comdiff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el index dba12d7b6..52423db18 100644 --- a/lisp/ob-maxima.el +++ b/lisp/ob-maxima.el @@ -84,7 +84,7 @@ (defun org-babel-execute:maxima (body params) (cmd (format "%s --very-quiet -r %s$ %s" org-babel-maxima-command (shell-quote-argument - (format "batchload(%S)" in-file)) + (format "\"batchload(\\\"%S\\\")\"" in-file))Notice that code in the message you cited has "%s" and does not have `shell-quote-argument'. Extra quotes may discard effect of existing double pass escaping.Yes, OP should try this solution first. If it fails, then there is some problem in `shell-quote-argument' that needs to be fixed.
To be clear. I believe that Mati should try the code from the Org "main" branch, not the patch Ihor posted in this thread. If I got it correctly, Mati currently has some problems with plots, ghostscript, etc.
Is there anything wrong with the following command (I am unsure concerning Temp location)? If so, what is the proper escaping for cmd.exe+maxima?
(let ((system-type 'ms-dos) (org-babel-maxima-command "maxima") (in-file "c:\\Temp\\maxima-XXXXXX.max") (cmdline "")) (message "%s" (format "%s --very-quiet -r %s$ %s" org-babel-maxima-command (shell-quote-argument (format "batchload(%S)" in-file)) cmdline))) maxima --very-quiet -r "batchload(\"c:\\Temp\\maxima-XXXXXX.max\")"$ (there is a trailing space)
[Prev in Thread] | Current Thread | [Next in Thread] |