a file img/dot.png.png was created instead. This might be due to some recent changes in asy. Adding file-name-sans-extension to the command line creation changed its file naming behaviour accordingly.
(defun org-babel-execute:asymptote (body params)
"Execute a block of Asymptote code.
This function is called by `org-babel-execute-src-block'."
(let* ((out-file (cdr (assq :file params)))
(format (or (file-name-extension out-file)
"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 (file-name-sans-extension 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)
nil)) ;; signal that output has already been written to file
Using ob-asymptote a for a file
img/dot.pnp
a file
img/dot.png.png
was created instead. This might be due to some recent changes in asy. Addingfile-name-sans-extension
to the command line creation changed its file naming behaviour accordingly.org-version is 9.6.15 asy-version is 2.87