all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Maxima code blocks does not work in windows revisited
Date: Thu, 3 Nov 2022 09:35:00 +0700	[thread overview]
Message-ID: <tjv9cm$5it$1@ciao.gmane.io> (raw)
In-Reply-To: <875yfxm80h.fsf@t14.reltub.ca>

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




  reply	other threads:[~2022-11-03  2:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01  7:45 [O] Maxima code blocks does not work in windows revisited Mati
2022-11-01  8:04 ` Ihor Radchenko
2022-11-01 10:34   ` Mati
2022-11-01 17:42     ` Leo Butler
2022-11-01 21:14       ` Mati
2022-11-02  4:47     ` Ihor Radchenko
2022-11-02  7:35       ` Mati
2022-11-02  7:44         ` Ihor Radchenko
     [not found]           ` <7b358b1a-95d8-4733-5a44-4e6e4c782d8f@electrum-bikes.pl>
     [not found]             ` <87eduk8tas.fsf@localhost>
2022-11-03 11:39               ` Mati
2022-11-02 15:17       ` Max Nikulin
2022-11-02 20:11         ` Leo Butler
2022-11-03  2:35           ` Max Nikulin [this message]
2022-11-03 10:01             ` Fraga, Eric
2022-11-03 15:54               ` Max Nikulin
2022-11-03 16:09                 ` [PATCH] " Leo Butler
2022-11-06  2:54                   ` Ihor Radchenko
2022-11-07 15:04                     ` Leo Butler
2022-11-03  6:08         ` Ihor Radchenko
2022-11-03  6:09         ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2014-07-10 19:48 Juan Alvaro Fuentes
2014-07-27 23:07 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='tjv9cm$5it$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.