From: Philip Kaludercic <philipk@posteo.net>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Jarmo Hurri <jarmo.hurri@iki.fi>, emacs-devel@gnu.org
Subject: Re: [ELPA] New package: ob-asymptote.el
Date: Wed, 06 Sep 2023 22:08:56 +0000 [thread overview]
Message-ID: <8734zreyyv.fsf@posteo.net> (raw)
In-Reply-To: <CADwFkmmJ9=RCMFkgO+J0+r3KtTkMAGoFMZkT0SU0Z=GFBqc+2w@mail.gmail.com> (Stefan Kangas's message of "Wed, 6 Sep 2023 02:37:18 -0700")
[-- Attachment #1: Type: text/plain, Size: 701 bytes --]
Stefan Kangas <stefankangas@gmail.com> writes:
> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> Philip Kaludercic <philipk@posteo.net> writes:
>>
>>>> Is there anything blocking this package from going in?
>>>
>>> I don't think so, I am just confused why I appear to not find any
>>> previous discussion on this in the archives.
>>
>> It was discussed previously here:
>> https://lists.gnu.org/r/emacs-devel/2023-07/msg00339.html
>
> Do you think we could add it now?
The requirements section mentioned that "asy-mode" is necessary, but
there is no package for that. I guess that is a blocker, unless the
information is outdated.
Otherwise, I think a change like this would be nice to have:
[-- Attachment #2: Type: text/plain, Size: 1421 bytes --]
diff --git a/ob-asymptote.el b/ob-asymptote.el
index de99ca3..a088fab 100644
--- a/ob-asymptote.el
+++ b/ob-asymptote.el
@@ -61,20 +61,19 @@ This function is called by `org-babel-execute-src-block'."
"pdf"))
(cmdline (cdr (assq :cmdline params)))
(in-file (org-babel-temp-file "asymptote-"))
- (cmd
- (concat "asy "
- (if out-file
- (concat
- "-globalwrite -f " format
- " -o " (org-babel-process-file-name out-file))
- "-V")
- " " cmdline
- " " (org-babel-process-file-name in-file))))
+ (cmd `("asy"
+ ,@(if out-file
+ `("-globalwrite" "-f" format
+ "-o" (org-babel-process-file-name out-file))
+ "-V")
+ cmdline
+ (org-babel-process-file-name in-file))))
(with-temp-file in-file
(insert (org-babel-expand-body:generic
- body params
- (org-babel-variable-assignments:asymptote params))))
- (message cmd) (shell-command cmd)
+ body params
+ (org-babel-variable-assignments:asymptote params))))
+ (message (mapconcat #'shell-quote-argument cmd " "))
+ (apply #'call-process "asy" nil nil cmd) ;should "asy" be a user option?
nil)) ;; signal that output has already been written to file
(defun org-babel-prep-session:asymptote (_session _params)
next prev parent reply other threads:[~2023-09-06 22:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-09 10:20 [ELPA] New package: ob-asymptote.el Jarmo Hurri
2023-07-10 7:02 ` Ihor Radchenko
2023-07-17 12:51 ` Jarmo Hurri
2023-07-20 4:14 ` Richard Stallman
2023-07-27 7:19 ` Jarmo Hurri
2023-09-04 1:27 ` Stefan Kangas
2023-09-05 17:12 ` Philip Kaludercic
2023-09-05 17:47 ` Ihor Radchenko
2023-09-05 20:16 ` Stefan Kangas
2023-09-06 9:32 ` Ihor Radchenko
2023-09-05 20:15 ` Stefan Kangas
2023-09-06 9:37 ` Stefan Kangas
2023-09-06 22:08 ` Philip Kaludercic [this message]
2023-09-07 9:59 ` Stefan Kangas
2023-09-07 10:07 ` Ihor Radchenko
2023-09-08 6:54 ` Jarmo Hurri
2023-09-08 11:34 ` Stefan Kangas
2023-09-08 12:12 ` Jarmo Hurri
2023-10-14 9:27 ` Ihor Radchenko
2023-10-14 22:19 ` Stefan Kangas
2023-11-08 10:05 ` Ihor Radchenko
2023-11-08 13:23 ` Bastien Guerry
2023-09-08 17:28 ` Philip Kaludercic
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=8734zreyyv.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=emacs-devel@gnu.org \
--cc=jarmo.hurri@iki.fi \
--cc=stefankangas@gmail.com \
/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.