"Eric Schulte" <schulte.e...@gmail.com> writes: > Hi Eric, > > I've gone through your ob-maxima.el, and tried to re-work it to the > point where it can be included into Org-mode -- mainly just switching to > a couple of Babel "best practices", and replacing some shell script > munging with elisp munging. > > Please try out the attached version (packaged as a patch against the > current Org-mode head) and let me know if it works --- i.e., If I > haven't broken it too badly. If it works I think we can fold it into > Org-mode immediately. > > Cheers -- Eric
I've tried this but cannot get it to execute my maxima code: --8<---------------cut here---------------start------------->8--- #+begin_src maxima programmode: false; eq: x**2-1 = 0; solution: solve(eq, x); print(solution); #+end_src --8<---------------cut here---------------end--------------->8--- I get the following error: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (void-variable in-file) (format "maxima --very-quiet -r 'batchload(%S)$' %s" in-file cmdline) (let ((result-params (split-string (or (cdr (assoc :results params)) ""))) (cmdline (cdr (assoc :cmdline params))) (in-file (org-babel-temp-file "maxima-")) (cmd (format "maxima --very-quiet -r 'batchload(%S)$' %s" in-file cmdline))) (with-temp-file in-file (insert body)) (message cmd) ((lambda (raw) (delq nil (mapcar (lambda (line) (unless (or ... ... ...) line)) (split-string raw)))) (org-babel-eval cmd ""))) org-babel-execute:maxima("programmode: false;\neq: x**2-1 = 0;\nsolution: solve(eq, x);\nprint(solution);\n" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "") (:shebang . "") (:cache . "no") (:noweb . "no") (:tangle . "no") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none"))) org-babel-execute-src-block(nil ("maxima" "programmode: false;\neq: x**2-1 = 0;\nsolution: solve(eq, x);\nprint(solution);\n" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "") (:shebang . "") (:cache . "no") (:noweb . "no") (:tangle . "no") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none")) "" nil 4)) org-babel-execute-src-block-maybe() org-babel-execute-maybe() org-babel-execute-safely-maybe() run-hook-with-args-until-success(org-babel-execute-safely-maybe) org-ctrl-c-ctrl-c(nil) call-interactively(org-ctrl-c-ctrl-c nil nil) --8<---------------cut here---------------end--------------->8--- This was with a freshly invoked emacs (with my own ob-maxima.el moved out of the way). Any suggestions? thanks, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.38.gf8c6.dirty)