axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-mail] Re: [Axiom-developer] empty line in an axiom pipe.


From: Stephen Wilson
Subject: [Axiom-mail] Re: [Axiom-developer] empty line in an axiom pipe.
Date: Tue, 24 May 2005 18:09:34 -0400
User-agent: Mutt/1.5.6+20040907i


Francois,

About two yeas ago I wrote an emacs mode for aldor, its interpreter
and debugger.  I have thought it might serve as a basis for an axiom
mode at some point in the future.  I can send you the code if you are
interested.

Have you looked at the comint elisp library?  Briefly, It serves as
the glue for many modes which need to interact with a process in a
buffer.  For example, `M-x comint-run <ret> AXIOMsys' should give you
and axiom session in its own buffer with a command line history.
Since a `raw' comint session happily cooperates with axiom, I would
expect one would find it a good starting point in programming a
full-fledged axiom mode.  Take a look at comint.el in the emacs
sources.

Sincerely,
Steve


On Tue, May 24, 2005 at 09:47:59PM +0200, Francois Maltey wrote:
> Hello, 
> 
> I try to write a emacs-mode for running axiom.
> 
> I can start axiom, read the output and send ONE commandline.
> 
> This is the minimal 3 lines to put in a new buffer as *Axiom* buffer :
> 
> (setenv "TERM" "xterm")
> (setq axiomRun-process 
>   (start-process "axiom" (current-buffer) "axiom" "-noht"))
> 
> Then eval this command in emacs, with ^X^E
> 
> (process-send-string axiomRun-process "123+456\n")
> 
> it's right.
> 
> You can send a lot of computation of one line, 
> but wait the end of the axiom-computation !
> 
> If you add a "-noclef" after "-noht", the display is cleaner,  
> but it isnot the problem.
> 
> I get a problem when I send 2 or more \n.
> 
> When I send one empty-line with this command, 
> axiom doesn't seem to understand.
> 
> (process-send-string axiomRun-process "123+456\n\n")
> (process-send-string axiomRun-process "123*456\n")
> 
> After this error, I must send two commands if I want to get one reponse.
> And the reponse is the reponse of the previous command, not the reponse 
> of this command.
> The error is the same with the underscore _ end-line.
> 
> What is the normal use of axiom command-line ?
> 
> Thanks a lot for your help !
> 
> François
> 
> My log-file is this one, I replace ^H and ^M to ascii 2 chars.
> ----------------------------------------------------------------
> (setenv "TERM" "xterm") 
> (setq axiomRun-process 
>   (start-process "axiom" (current-buffer) "axiom" "-noht"))
> ; I evaluate this two lines buffer with M-x eval-buffer
> ;
> ;
> GCL (GNU Common Lisp)  2.6.6 CLtL1    Jan 18 2005 00:13:38
> Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
> Binary License:  GPL due to GPL'ed components: (READLINE BFD UNEXEC)
> Modifications of this banner must retain notice of a compatible license
> Dedicated to the memory of W. Schelter
> 
> Use (help) to get some basic information on how to use GCL.
>                         AXIOM Computer Algebra System 
>                    Version: Axiom 3.0 Beta (February 2005)
>               Timestamp: Monday February 21, 2005 at 20:01:15 
> -----------------------------------------------------------------------------
>    Issue )copyright to view copyright notices.
>    Issue )summary for a summary of useful system commands.
>    Issue )quit to leave AXIOM and return to shell.
> -----------------------------------------------------------------------------
>  
>    Re-reading compress.daase   Re-reading interp.daase
>    Re-reading operation.daase
>    Re-reading category.daase
>    Re-reading browse.daase
> (1) -> 
> ;
> ; 
> ; then run this with C-x C-e at the end of the next line
> ;
> (process-send-string axiomRun-process "123+456\n")
> ;
> ; the result appears before this lisp-line, I move it after.
> 
> (1) -> 123+456^H^H^H^H^H^H^H^M(1) -> ^M
>    (1)  579
>                                                         Type: PositiveInteger
> ;
> ; I can do a lot of calculs so.
> ; But when I send a 2 lines command axiom become silly :
> ;  
> (process-send-string axiomRun-process "123+456\n\n")
> ;
> (2) -> 123+456^H^H^H^H^H^H^H^M(2) -> ^M
>    (2)  579
>                                                         Type: PositiveInteger
> 
> (process-send-string axiomRun-process "12+56\n")
> (process-send-string axiomRun-process "12+56\n")
> (process-send-string axiomRun-process "12+56\n")
> (process-send-string axiomRun-process "12+5\n")
> 
> ;
> ; The command line redisplayed isn't the result : so 12+5=68.
> ;
> 
> (3) -> 12+56^H^H^H^H^H^M(3) -> ^M(3) -> 12+56^H^H^H^H^H^M(3) -> ^M
>    (3)  68
>                                                         Type: PositiveInteger
> (4) -> 12+56^H^H^H^H^H^M(4) -> ^M
>    (4)  68
>                                                         Type: PositiveInteger
> (5) -> 12+5^H^H^H^H^M(5) -> ^M
>    (5)  68
>                                                         Type: PositiveInte
> 
> 
> _______________________________________________
> Axiom-developer mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/axiom-developer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]