clojure-emacs / inf-clojure

Basic interaction with a Clojure subprocess
250 stars 45 forks source link

Multiple repls #118

Open arichiardi opened 6 years ago

arichiardi commented 6 years ago

Hi @bbatsov, Given we are at it, it would be awesome to implement multiple Repl per project and/or one repl per project.

At the moment C-c C-z always brings up always the same buffer. It looks like there can only be one. I really really hope it is not due to comint limitations.

arichiardi commented 6 years ago

I checked and there shouldn't be any limitation from comint for one repl per project setups.

The only thing to "share" across buffer is the inf-clojure-repl-type: it is filled lazily at the time of the first "operation" . So when we detect the type we need to dispatch it to all the buffers opened for the project - to their buffer local vars. If there is a way to get all the buffer "belonging" to a folder we are good to go, otherwise we'd need to keep a list. I'd like to keep the "detect it once" behavior because of the thing I have brought up in the other PR: the read of the above var is done every key press and I would not want to keep detecting many times. Plus the asynchronous nature of reading from comint makes things more complicated (unless we bring in some library). Of course this is based on my limited understanding of all things emacs and I would yield to any more informed opinion.

arichiardi commented 6 years ago

Actually scratch all of that, I see that the feature is already there :open_mouth: !

bbatsov commented 6 years ago

Indeed. :-)

arichiardi commented 6 years ago

Keeping it open for improving a bit on it.

MalloZup commented 5 years ago

autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it