This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-06
Channels
- # announcements (1)
- # babashka (7)
- # beginners (93)
- # bristol-clojurians (1)
- # cider (7)
- # clj-kondo (42)
- # cljs-dev (9)
- # clojure (67)
- # clojure-europe (4)
- # clojure-france (4)
- # clojure-germany (2)
- # clojure-italy (3)
- # clojure-nl (10)
- # clojure-uk (62)
- # clojurescript (11)
- # clojurex (3)
- # conjure (77)
- # cursive (16)
- # datomic (105)
- # docker (4)
- # editors (3)
- # events (5)
- # fulcro (34)
- # jobs (1)
- # juxt (7)
- # kaocha (7)
- # lambdaisland (3)
- # lein-figwheel (2)
- # leiningen (19)
- # malli (14)
- # meander (6)
- # mid-cities-meetup (6)
- # off-topic (20)
- # pedestal (2)
- # reagent (17)
- # reitit (7)
- # remote-jobs (1)
- # shadow-cljs (17)
- # spacemacs (23)
- # specter (2)
- # tools-deps (34)
I used to just call define-key over the same keymap and it would work, but with today's update, it seems it no longer does. So I'm thinking maybe I wasn't doing it the proper way
@didibus could you share what you want to switch the keybinding to and why you find that a useful alternative? Thanks.
Ya, I want to change s L for clojure major leader so that instead of clearing the repl output, it clears the REPL buffer
s l
right now runs cider-repl-clear-buffer, which only clears the repl buffer if you are inside the repl buffer. And s L
does cider-find-and-clear-repl-output
clearing output and clearing buffer is different. Output clears the last output, not the whole buffer. While clearing buffer clears the whole buffer
My thought was to make: s l
clear the buffer no matter where you are, and s L
clear the output no matter where you are
People don't like changes to their keybinding... but usually only tell you about it afterwards. I almost never use the REPL buffer, although it seems people do and also push a lot of text through it as well, like logs which seems a recipe for slowing down Emacs.
Rather than changing existing keybindings, there are a few other options.
1) config to use SPC u with each if the existing keybindings to clear the whole buffer
2) create 2 other keybindings to clear the whole buffer
Saying that, the change to SPC m s l would have no impact and seems to make sense. Capital letters typically represent a destructive action, so changing SPC m s L
to clear the whole buffer makes sense.
So yes, a PR for changing the commands for the existing keybindings seems okay. However, I do share any changes with this channel and on the Spacemacs Gitter chat, just so people know it's coming.
If you want, I can do a PR for this tomorrow.
I have the code already, I can make a PR. I needed to write a new util function, because to find buffer and clear buffer you need to call cider-find-buffer-and-clear-output with the universal arg set
I might just change s l to be that. Like you said, it wouldn't break anyone, just allow them to also use it if they are not currently on the REPL buffer. Though I haven't tried it with multiple repl open. I don't know how it "finds" the right one in that case