reddit / emacs

Jump to project repl / process ?

olymk2 · 2022-08-25 08:42
I am aware you can jump to a process buffer attached to the current buffer, I was wondering if there is functionality to connect the process to a project and jump to it while when in any buffer ? I use the send to buffer quite a lot, so would ideally like a flow of send to python if the python buffer is not visible then open a window, hopefully which works regardless of which python file I am editing in the project. I know clojure has a better story for this but would also like the pop up the buffer if its not open for clojure code in case it can be done for one of the languages.
7890yuiop · 2022-08-25 09:10
Sounds pretty easy. You just need to have a variable mapping projects to REPL buffers, and write a "jump to REPL" command which checks the project for the buffer you're in now, checks the mapping, and does the appropriate thing (i.e. if there's no mapping, or the mapping is not buffer-live-p, then start a new REPL process and store its buffer in the map. Then pop-to-buffer for the mapped REPL buffer.)