This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-26
Channels
- # aws (7)
- # beginners (109)
- # boot (5)
- # carry (2)
- # cider (25)
- # clara (6)
- # cljs-dev (86)
- # cljs-experience (19)
- # cljsrn (1)
- # clojure (183)
- # clojure-dev (7)
- # clojure-dusseldorf (7)
- # clojure-gamedev (2)
- # clojure-greece (32)
- # clojure-italy (2)
- # clojure-norway (1)
- # clojure-russia (228)
- # clojure-sg (3)
- # clojure-spec (38)
- # clojure-uk (104)
- # clojurebridge (1)
- # clojurescript (29)
- # community-development (9)
- # core-async (118)
- # core-matrix (20)
- # cursive (5)
- # datomic (140)
- # emacs (25)
- # figwheel (1)
- # hoplon (21)
- # jobs (4)
- # lein-figwheel (2)
- # luminus (10)
- # lumo (35)
- # off-topic (137)
- # om (31)
- # onyx (62)
- # pedestal (6)
- # reagent (25)
- # remote-jobs (1)
- # ring-swagger (11)
- # spacemacs (2)
- # test-check (17)
- # uncomplicate (10)
- # unrepl (1)
- # untangled (20)
- # vim (4)
- # yada (3)
When I C-c C-f in cider (cider-pprint-eval-defun-at-point) It opens a popup buffer without selecting it.
If I’m only editing a clojure file, the popup buffer appears to the side and I can just C-x 1 to make my edit buffer on top
However, if I have a clojure file and (for example) a repl open and my emacs is very big then the clojure window will split in two leaving me with three emacs sections
editor and popup buffer on top, repl on bottom. To close the popup buffer, I have to C-x o and then q
Obviously I can trivially macro that and bind it to a key, but I’m wondering if there’s a more emacs way to say “close to the most recently opened thing, even if it’s not selected”
so i don't think that there is anything for this, but i think we could easily make it
(mapc #'kill-buffer (seq-filter #(lambda (b) (derived-mode b 'cider-popup-buffer-mode)) (buffer-list))
obviously this syntax is wrong but that's the general idea. loop over all buffers and kill the ones which have cider-popup-buffer-mode
Thanks - I’ll look at that later when I’m back on on the big monitor and it hits me again
I guess maybe I could also see if cider could just make sure that buffer is selected so I could just exit with “q”
(defun cider-popup-buffer (name &optional select mode ancillary)
"Create new popup buffer called NAME.
If SELECT is non-nil, select the newly created window.
If major MODE is non-nil, enable it for the popup buffer.
If ANCILLARY is non-nil, the buffer is added to `cider-ancillary-buffers'
and automatically removed when killed."
(thread-first (cider-make-popup-buffer name mode ancillary)
(cider-popup-buffer-display select)))
but you could change (cider-popup-buffer-display select)
to (cider-popup-buffer-display (or select cider-always-focus-popup-buffers))
In clojure-mode, the indentation under extend-protocol is all messed up
never mind
I just updated from package-list-packages
it must have been fixed since whenever I set this up first 🙂