[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Re: [Orgmode] [babel] maxima support?
From: |
Eric S Fraga |
Subject: |
[O] Re: [Orgmode] [babel] maxima support? |
Date: |
Tue, 15 Mar 2011 16:39:32 +0000 |
User-agent: |
Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux) |
"Eric Schulte" <address@hidden> writes:
> Eric S Fraga <address@hidden> writes:
>
>> "Eric Schulte" <address@hidden> writes:
>>
>> [...]
>>
>>>
>>> Ah, I see the problem, I used let instead of let*. Please try this
>>> updated version of the patch. Sorry I would test this myself, but I
>>> don't have Maxima installed.
>>
>> No problem at all! I'm happy to test this as many times as necessary.
>>
>> In any case, this works fine in that maxima is indeed evaluated and
>> output is returned. However, two problems arise:
>>
>> 1. lines of the form "rat: replaced XXX by YYY = ZZZ" are not deleted
>> (as used to be by the grep -v replaced hack I had in the original
>> ob-maxima). Essentially, we need to ignore output lines that match
>> the regex "^rat: replaced .*$" (I think this should do it...).
>>
>> 2. The output is converted to an org table:
>>
>
> The attached should fix both of these problems. Please let me know how
> this works.
Eric,
Well, it didn't work :(.
However, I think I managed to fix it. I think you have an ulterior
motive: to make me learn elisp properly once and for all... ;-).
Attached is the updated ob-maxima.el file with two changes:
1. quoted =identity= in the =mapconcat= sexp.
2. asked =split-string= to split on newlines so that (a) the regex for
the rat line would match *and* (b) so that the output is faithful to
what maxima generates.
I hope these make sense! I've gone through the code and I think I
understand it. More importantly, the output is now essentially the same
as I was getting before which makes me quite happy.
I'll do some more testing but the various tests I have tried should
cover most aspects that I ever use.
Thanks,
eric
ob-maxima.el
Description: modified ob-maximal file
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.38.gf8c6.dirty)