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: 25 Jun 2007 08:56:36 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Francois Maltey <address@hidden> writes:

> Dear Martin,
> 
> > > > [[M-x axiom]] should switch to the buffer [[*axiom*]], 
> > > > if it exists and if it is an "axiom buffer".  
> 
> > > > 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.
> 
> What do you get when you type ?
> 
>    [[M-x axiom]]         the first time.
>    [[C-x b return]]      to switch to an other buffer
>    [[M-x axiom]]         a second time

Sorry, I was wrong here, this one works.

> Could you send me your axiom.el please ?

I just uploaded my version to MathAction, the only modification is a correction
to axiom-reset.

> Do you have any line about axiom.el in your .emacs ?
> In my .emacs I have only : 
>   
> (load "~/Configuration/emacs/axiom.el")

same thing.

> > > Do you want to run several axiom in several buffers ?
> 
> > Yes.  I'd like behaviour as with shell mode. 

> All right, I test... 

> But it seem today impossible to do this with axiom because variables in
> axiom.el are global for all axiom-process, and it's necessary to create local
> variable for each axiom buffer.

I asked on gnu.emacs.help recently:

http://groups.google.at/group/gnu.emacs.help/browse_thread/thread/7ac4361f78c0e5a3/fdf0e3cebe263990?lnk=st&q=axiom+mode&rnum=1&hl=de#fdf0e3cebe263990

> > M-x axiom switches to *axiom* if present and 
> > if it is a buffer in axiom-mode, otherwise it creates such a buffer.
> 
> Perhaps [[M-x axiom]] will be right if you delete this line from 
> your .emacs...
> 
> > (add-hook 'axiom-mode-hook (lambda () (rename-uniquely)))

Don't worry, that's the line I would *like* to have in my .emacs.  I know that
it won't work at the moment.

> I only look for an axiom-run mode, not for an axiom-input mode
> with font lock and so...

So, what is axiom-run mode supposed to do?

> 1> Really, I think the best thing would be a mode axiom-input.el, This would
> 1> also allow us to do some syntax highlighting and possibly even some
> 1> indentation features for input files.
> 
> 2> which allows sending the region to axiom, via saving it into a temporary
> 2> file and )read ing it in the axiom buffer.
> 
> 3> Another good feature would be tab completion, by the way.  This works if
> 3> you start axiom in a terminal, so it should be possible...

[...] 

> The second one is very easy.

Great.  So please create a mode that does this -- and I suggest that you *name*
it axiom-input.

I.e., it should be a mode separate from axiom-mode -- and in a different file
-- that provides two commands:

axiom-send-line

axiom-send-region

Both check whether there is an *axiom* buffer.  If not, error, or perhaps
create one.

Otherwise:

* axiom-send-line copies the current line into the *axiom* buffer, and calls
  axiom-eval.

* axiom-send-region saves the current region into a temporary file
  /tmp/tmp.input, inserts )read /tmp/tmp.input into the *axiom* buffer and
  calls axiom-eval.

> About axiom.el code :
> 
> > 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 began to play with this very small file.

Do you understand shell.el?

Martin





reply via email to

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