ocaml / tuareg

Emacs OCaml mode
GNU General Public License v3.0
360 stars 79 forks source link

Implement jumping to an active REPL (and back from it) #293

Closed bbatsov closed 2 years ago

bbatsov commented 2 years ago

That's inspired from numerous Emacs modes (e.g. SLIME, CIDER, inf-clojure, etc).

I use this workflow all the time when programming in other languages and it was pretty painful for me to work in Tuareg without it, as I'm way to used to press C-c C-z to jump between my REPL and my source buffer.

monnier commented 2 years ago

Bozhidar Batsov [2022-07-15 05:18:36] wrote:

bcaf90d58bee8c3b2031733dfffcc2b3fd2768dd Address a byte-compilation warning

This one should be squashed (I think the warning is not a false positive).

Regarding tuareg--swap-to-buffer-window, I'm surprised you need to mess with pop-up-frames to convince Emacs to use another frame. I think you probably want to use something like:

'(display-buffer-reuse-window (reusable-frames . 0))

instead. An alternative is to use pop-to-buffer as-is and report any misbehavior of that default as a bug via M-x report-emacs-bug :-)

bbatsov commented 2 years ago

@monnier Code updated.

monnier commented 2 years ago

@monnier Code updated.

Thanks, pushed!