This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-01
Channels
- # aleph (4)
- # arachne (24)
- # beginners (231)
- # boot (4)
- # cider (63)
- # clara (36)
- # cljs-dev (57)
- # clojure (195)
- # clojure-dev (12)
- # clojure-gamedev (2)
- # clojure-greece (1)
- # clojure-italy (10)
- # clojure-poland (4)
- # clojure-spec (36)
- # clojure-uk (65)
- # clojurescript (133)
- # core-async (8)
- # core-logic (2)
- # cursive (18)
- # data-science (3)
- # datomic (58)
- # defnpodcast (3)
- # duct (2)
- # emacs (2)
- # fulcro (27)
- # graphql (3)
- # hoplon (18)
- # jobs (2)
- # jobs-discuss (10)
- # jobs-rus (1)
- # lumo (1)
- # mount (6)
- # nyc (2)
- # off-topic (27)
- # pedestal (13)
- # re-frame (71)
- # reagent (105)
- # reitit (4)
- # ring (2)
- # ring-swagger (1)
- # rum (10)
- # shadow-cljs (172)
- # spacemacs (24)
- # sql (26)
- # tools-deps (1)
- # uncomplicate (4)
- # unrepl (51)
- # vim (3)
- # yada (11)
Do you mean like expected
vs. actual
collections are different, and you want the test failure output to show more clearly where they're different? If so, that seems like less of a spacemacs thing and more of a test library thing. I think speclj might do this, and midje might too. (Lots of people don't like midje; on the other hand, I've been enjoying speclj lately.)
I’m looking for clearer test output. Need to stick with clojure.test
really. https://github.com/venantius/ultra seems good, will have to see how well it plays with cider/spacemacs
Is there a possibility to eval a defn in spacemacs and save the output somewhere, like inserting it after the defn?
@timok - You can do it manually of course: send an expression to the connected cider repl (with , s e
I think), then switch to the REPL buffer, copy the result, and paste it into your source buffer. (Though that might not be as interesting on a defn
form since IIRC it just returns the var.)
I think there may be a cider function to do those steps for you, too. I'd poke around in the helm buffer for SPC SPC cider-
and see if anything looks like what you want. If you find something you like, you can create a keybinding for it.
if you give an universal argument to cider-eval-last-sexp
it inserts the result in the current buffer
and I know , e f
but searching for something that inserts the result into repl or current buffer. I read that this exists in clojureverse but couldn't find it
@timok that's what I said: if you do SPC u , e f
- it will put the result back into current buffer
although I would suggest to rebind C-u
to 'universal-argument
, that's Emacs's default and it used a lot
Yeah, I'm an old vimmer, so I don't want to unbind C-u
(scroll a half-page up).
Nice tip about the SPC u
prefix for that command, @ag. 👍
> And why is C-u better than SPC u? because it's accessible not just in NORMAL mode. Once you realize that universal-argument is used a lot in Emacs - you would want to have a simple binding for it. Value of universal argument is far more than simply scrolling up half a page
yeah, there are many, many cases where universal argument makes a difference. simple examples:
- in magit-diff - RET - visits file in other-window
- in org mode - TAB - collapses/expands things differently
- ag - SPC s f
- supplied with an argument, lets you search only in specific kind of files
- org-clock-in - with an argument lets you choose a task from the latest ones
etc, etc.