From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] maxima support? Date: Tue, 15 Mar 2011 11:27:32 -0600 Message-ID: <87ei681egr.fsf@gmail.com> References: <5rbp23p04b.fsf@kana.aer.mw.tum.de> <87bp21ohkt.fsf@pinto.chemeng.ucl.ac.uk> <8762s7ipr7.fsf@gmail.com> <87y6503zkk.fsf@ucl.ac.uk> <874o75wfzf.fsf@gmail.com> <871v28slsr.fsf@ucl.ac.uk> <87r5a834lc.fsf@gmail.com> <87fwqompb6.fsf@ucl.ac.uk> <87oc5c1js6.fsf@gmail.com> <87d3lss5h7.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=60548 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzY21-0006WG-4T for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 13:27:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzY1z-0007zq-WB for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 13:27:41 -0400 Received: from mail-pv0-f169.google.com ([74.125.83.169]:57579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzY1z-0007zJ-PK for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 13:27:39 -0400 Received: by pvg4 with SMTP id 4so194479pvg.0 for ; Tue, 15 Mar 2011 10:27:38 -0700 (PDT) In-Reply-To: <87d3lss5h7.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Tue, 15 Mar 2011 16:39:32 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric S Fraga Cc: Litvinov Sergey , emacs-orgmode@gnu.org Eric S Fraga writes: > "Eric Schulte" writes: > >> Eric S Fraga writes: >> >>> "Eric Schulte" 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... ;-). > sure... that must be the reason I've put all these bugs in the code /looking around suspiciously/ > > 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. > Great, these changes look good, I've just push this up to the org-mode repository. Thanks for contributing support for a new language! -- Eric > > I'll do some more testing but the various tests I have tried should > cover most aspects that I ever use. > > Thanks, > eric