1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

The maxima command used should be configurable--defaults to maxima-command if defined

* lisp/ob-maxima.el (org-babel-maxima-command): The maxima command
  used should be configurable (defaults to maxima-command if defined).
  (org-babel-execute:maxima): The maxima command used should be
  configurable (defaults to maxima-command if defined).
This commit is contained in:
Eric Schulte 2012-03-26 07:45:40 -04:00
parent 4202665f5b
commit ab76b8f29e

View File

@ -40,6 +40,10 @@
(defvar org-babel-default-header-args:maxima '())
(defcustom org-babel-maxima-command
(if (boundp 'maxima-command) maxima-command "maxima")
"Command used to call maxima on the shell.")
(defun org-babel-maxima-expand (body params)
"Expand a block of Maxima code according to its header arguments."
(let ((vars (mapcar #'cdr (org-babel-get-header params :var))))
@ -67,8 +71,8 @@ called by `org-babel-execute-src-block'."
(result
(let* ((cmdline (cdr (assoc :cmdline params)))
(in-file (org-babel-temp-file "maxima-" ".max"))
(cmd (format "maxima --very-quiet -r 'batchload(%S)$' %s"
in-file cmdline)))
(cmd (format "%s --very-quiet -r 'batchload(%S)$' %s"
org-babel-maxima-command in-file cmdline)))
(with-temp-file in-file (insert (org-babel-maxima-expand body params)))
(message cmd)
((lambda (raw) ;; " | grep -v batch | grep -v 'replaced' | sed '/^$/d' "