From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: Litvinov Sergey <slitvinov@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: [babel] maxima support?
Date: Tue, 15 Mar 2011 10:47:00 +0000 [thread overview]
Message-ID: <871v28slsr.fsf@ucl.ac.uk> (raw)
In-Reply-To: <874o75wfzf.fsf@gmail.com> (Eric Schulte's message of "Mon, 14 Mar 2011 15:26:30 -0600")
"Eric Schulte" <schulte.eric@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)
next prev parent reply other threads:[~2011-03-15 10:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 9:32 [babel] maxima support? Litvinov Sergey
2011-02-24 10:25 ` Eric S Fraga
2011-02-24 10:28 ` Eric S Fraga
2011-02-25 9:17 ` Litvinov Sergey
2011-02-25 23:58 ` Eric Schulte
2011-02-28 16:15 ` Eric S Fraga
2011-03-14 21:26 ` Eric Schulte
2011-03-15 10:47 ` Eric S Fraga [this message]
2011-03-15 13:17 ` Eric Schulte
2011-03-15 14:27 ` Eric S Fraga
2011-03-15 15:32 ` Eric Schulte
2011-03-15 16:39 ` Eric S Fraga
2011-03-15 17:27 ` Eric Schulte
2011-03-15 18:32 ` Eric S Fraga
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871v28slsr.fsf@ucl.ac.uk \
--to=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
--cc=schulte.eric@gmail.com \
--cc=slitvinov@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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).