axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] A multi-line mode for Emacs.


From: Francois Maltey
Subject: Re: [Axiom-developer] A multi-line mode for Emacs.
Date: 24 Jun 2007 18:49:48 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Hi Martin,

Thanks to your axiom.pamphlet and axiom.el files, 
Now I better understand how the comint mode is running...

In your previous mail you write about :

clean up initialisation routines.
---------------------------------
I don't understand what you should like :

>  [[M-x axiom]] should switch to the buffer [[*axiom*]], if it exists and if
>  it is an "axiom buffer".  (I guess that should be a buffer in
>  [[axiom-mode]], with a running axiom process.)
   
>  If there is no such buffer, it should create a new buffer and a new axiom
>  process.

The axiom command in axiom.el file works so.

Do you want to run several axiom in several buffers ?

Nicolas Thery did it in mupad-run.el. 
I hope I can to use this way for axiom.

I'll try to propose :

M-x axiom        goes to the *axiom* buffer in which axiom is running.
M-x axiom-other  goes to a new *axiom<n>* buffer in which axiom is running.
M-x axiom-mode   remains in the same buffer and runs axiom.
M-x axiom-buffer switchs from one axiom buffer to the next one.

Do you have an other idea ?

Then the buffer is seen as an *.input file which will be run after [return]

For this use all variables must be local. It's a curious trick...

And M-x axiom is defined by (switch-to-buffer *axiom*)(axiom-mode).

write another mode which allows input to be sent to the axiom buffer.
---------------------------------------------------------------------
I think I'll use the same mode axiom-mode with a new 
variable axiom-multi-lines. 

If axiom-multi-lines is false :
[return] sends a line which ends with ...._ 
and emacs waits for the new line as now.

If axiom-multi-lines is true :
[return] doesn't look at underscore _ at the end of the lines.

For this I think I must change the code arround the prompt 

About prompt
------------
In axiom-output-filter 
I'll add a complex function of tests arround prompt 
and add a variable axiom-state :
axiom-state is 'running
            or 'usualPrompt    (nn) -> 
            or 'quitPrompt     after )q
            or 'displayPrompt  after )d ...
            or 'debugPrompt    when UPPERCASE>> or UPPERCASE>>>>

In this function I destroy the double prompt (1)-> if necessary.
Then I use this variable in order to lock or to send the next input
after the [return] command.

If axiom-multi-line is true I add a newline command after the prompt.
So the emacs-buffer begins with a new line.

Have a nice week...

Francois




reply via email to

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