From: Eric Schulte <schulte.eric@gmail.com>
To: Derek Thomas <derekcthomas@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Maxima session support
Date: Thu, 07 Jul 2011 19:23:52 -0600 [thread overview]
Message-ID: <87fwmh1rgb.fsf@gmail.com> (raw)
In-Reply-To: CALDRGc9AJQGpv_k_nmxXSiBdvuBFK7oZvmDe8TKq31dDTDeZtw@mail.gmail.com
Hi Derek,
Take a look at org-babel-execute:js in ob-js.el, it performs a check of
the :session header argument, and then either performs external
evaluation as currently implemented in org-babel-execute:maxima, or it
performs session evaluation as you have described.
Implementation may be as simple as passing the "body" of the code block
to the `maxima-send-region' command and returning the results.
Also, you may want to look at the contribution instructions on Worg [1],
because if you are not able to sign the FSF copyright assignment papers
we will not be able to include your contribution.
Best of luck and let me know if I can help in any way -- Eric
Derek Thomas <derekcthomas@gmail.com> writes:
> I've been poking around in the ob-maxima.el and maxima.el files and I
> believe that maxima.el provides the commands necessary to simulate
> session support in org-babel. Unfortunately my elisp skills are
> rudimentary and I don't know how to write a function that when called
> by C-c C-c in the source block will pass each line of the source block
> to the function maxima-send-region and insert the output into the
> results portion of the org file using maxima-insert-last-output (both
> of these functions are provided by maxima.el). If anyone can point me
> in the right direction for a similar function that I can modify, or
> can provide a commented example of how this would be done, that would
> be great. Thanks,
>
> Derek
>
Footnotes:
[1] http://orgmode.org/worg/org-contribute.html
--
Eric Schulte
http://cs.unm.edu/~eschulte/
prev parent reply other threads:[~2011-07-08 1:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-06 22:14 Maxima session support Derek Thomas
2011-07-08 1:23 ` Eric Schulte [this message]
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=87fwmh1rgb.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=derekcthomas@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).