[Top][All Lists]

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

Re: axiom mode

From: martin rudalics
Subject: Re: axiom mode
Date: Mon, 11 Jun 2007 10:39:15 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> To be honest, I don't understand this code at all, it's not mine.

Your current code does the following:

In `axiom-comint-run' you leave it to `make-comint' to create a new
axiom process and return its object.

In `axiom-run' you set `axiom-process' to that object with

  (setq axiom-process (get-buffer-process (current-buffer)))

This works because, presumably, you never try to associate a second
process with the current buffer (it could fail miserably if you did).

You define `axiom-process' as a "global" variable, hence it may
reference one and only one "axiom process" at any instant of time.  If
you want a couple of axiom processes to coexist simultaneously you have
to make `axiom-process' buffer-local.  Then you can try to maintain a
one-to-one correspondence between axiom buffers and axiom processes.

> What I would
> like to have is the behaviour of shell mode: usually M-x axiom should switch 
> the running axiom, but optionally, something like
> (add-hook 'shell-mode-hook (lambda () (rename-uniquely)))
> or renaming the current axiom buffer should give us a new axiom.

I don't understand what "usually" and "optionally" refer to.  You would
have to state precisely what you do currently and what you want to do
differently.  `rename-uniquely' simply generates a new name for the
current buffer, it doesn't create a new process.  On the other hand you
can always create a new buffer and start a new process from that buffer.

reply via email to

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