im wondering why doesn't cider-quit and sesman-quit also does a kill-window, since cider-jack-in-clj creates a new window for the REPL?
it's not very symmetrical.
eg. if i open a help window (eg. with C-h m) and press q in it, it kills that help window (and buries the buffer OR kills the buffer if i used C-u q).
i was expecting a similar symmetry.
of course i can advise them, but i don't want to introduce unnecessary complications, if there is a good reason for the current behaviour or if there are other, more emacs-y solutions, like some universal args, config options or similar trickery as C-x 4 4, which modifies the behaviour of a subsequent command.
I've solved it for myself by displaying a repl buffer in a side window, but I think just using dedicated window will also work. Not ideal, but it works for me 🙂
(setopt display-buffer-alist
`((,(rx (| "*cider-doc*"
"*cider-clojuredocs*"
"*cider-macroexpansion*"
(: "*cider-repl" (* any) "*")
"*cider-spec-browser*"
"*cljr-find-usages*"))
(display-buffer-in-side-window)
(side . bottom)
(slot . 1)
(dedicated . t)
(window-height . 0.3))))yeah, that bakes in the assumption of where that side-window should appear, which might differ between users or even just the currently used display ratios. but thanks for the idea!
you can use any other rule, just (dedicated . t) should do the trick
I think default action is (display-buffer-in-some-window) or something like that
(setopt display-buffer-alist
`((,(rx "*cider-repl" (* any) "*")
(display-buffer-in-some-window)
(dedicated . t))))There is also a function set-window-dedicated-p which probably can be used in some CIDER hook
thx, this seems to work for my setup:
(display-buffer-pop-up-window)
(dedicated . t)
display-buffer-use-some-window reused my source code window 🙂👍