Emaxima Emacs Mode (Was Re: [Maxima] User Manual)



C Y <smustudent1@yahoo.com> writes:

> --- Daniel Martins <dmartins@lcmi.ufsc.br> wrote:
> > >>>>> "Jay" == Jay Belanger <belanger@truman.edu> writes:
> > 
> >     Jay> willisb@unk.edu writes: ...
> >     >> And I *really* like Jay Belanger's offer to get Dan Dill's
> >     >> Mathematica mode for emacs working for Maxima.
> > 
> > Great. This a really good news and can improve a lot the performance
> > of best GUI, IMHO, that I found for Maxima.
> 
> I've given it a shot, and so far I agree that this is an excellent
> feature to add to maxima.  I was unable to get the TeX part to work,
> but I am more inclined to blame that on the slightly older version of
> maxima I have at home.  From what I could see, however, this is
> remarkable work.

Thanks, from also (I'm sure) Jürgen Tischer and William Schelter.

What part of the TeX part didn't work?  If I get some details, perhaps
I can fix it.  I'm not sure a slightly older version of Maxima is at
fault.
To get the Maxima output in TeX form, I had emacs send the line
tex(%);
and then get the output.  This occasionally does some squirrelly
things when := is used.

(C1) tex(sin(x));

$$\sin x$$
(D1)                                 FALSE
(C2) tex(f(x):=sin(x));

|
f(x):=SIN(x);|
(D2)                                 FALSE

Of course, sending tex(%); and grabbing the output messes up the d#
references, as well as % and %%, which is why when the TeX output is
used, EMaxima doesn't put in the (D#), and TeX output currently isn't
an option for MaximaDoc.  Ideally, Maxima would have a switch that
would allow the output to be already in TeX form, much like there is
currently the option to use 1D or 2D output.  
Another option is to have the Maxima process evaluate a file that
causes it to display the output in TeX form, much like TeXmacs does.
It should be reasonably easy to alter the TeXmacs file to do this.

> I do have one question - does this work on Windows?  I know we are a
> ways from another bundled maxima Windows binary, but it'd be nice if we
> could have this ability for Windows emacs users, too.  (Not my
> priority, obviously, but probably worth at least checking out.)

I don't know, I haven't tried it.
If no-one else tries it, I can install NTEmacs on my wife's computer
and test it out.

> Also, does this work with emacs 21?  I'd be surprised if backward's
> compatibility were broken, but with a major version number you wonder a
> bit. 

Or rather, does it work with emacs 20?  (I'm using emacs 21 myself.)
I don't think that I used any emacs 21 specific features, so it should
work on emacs 20, but I haven't tested it out.

> Speaking of improving the emacs mode, does anyone else have trouble
> with  mismatched parenthesis on some of the inputs when using maxima in
> emacs?  In my case it seems to be a bit flacky.

Can you give details on when that occurs?

Jay