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: Martin Rubey
Subject: Re: [Axiom-developer] A multi-line mode for Emacs.
Date: 24 Jun 2007 19:45:43 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Francois Maltey <address@hidden> writes:

> 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.

Not for me.

> Do you want to run several axiom in several buffers ?

Yes.  I'd like behaviour as with shell mode.  M-x axiom switches to *axiom* if
present and if it is a buffer in axiom-mode, otherwise it creates such a
buffer.

Setting

(add-hook 'axiom-mode-hook (lambda () (rename-uniquely)))

in my .emacs should give me a new axiom buffer whenever I do M-x axiom.

But with clean up I also meant: clean up, i.e., make it tidy.  Currently, the
code is a mess, at least for me.

> 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 ?

Yes, the above looks far too complicated for me.  I'd like the way shell mode
works far better, i.e., only one command, which works "the emacs way", though.

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

That doesn't look very useful for me.  If I want to read a whole input file, I
just )read it.  What I need however is to mark parts of an input file and send
it to axiom.

> 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.

So, how do you determine end of input then?

> 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>>>>

I doubt that you'll catch all situations with that, but I don't know.  I think
we should try to stay as flexible as possible.

Really, I think the best thing would be a mode axiom-input.el, which allows
sending the region to axiom, via saving it into a temporary file and )read ing
it in the axiom buffer.  This would also allow us to do some syntax
highlighting and possibly even some indentation features for input files.

Another good feature would be tab completion, by the way.  This works if you
start axiom in a terminal, so it should be possible...

Martin





reply via email to

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