This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-06
Channels
- # adventofcode (112)
- # announcements (6)
- # beginners (197)
- # boot (3)
- # calva (52)
- # cider (25)
- # clara (14)
- # cljdoc (6)
- # clojure (147)
- # clojure-austin (6)
- # clojure-berlin (7)
- # clojure-brasil (2)
- # clojure-europe (3)
- # clojure-india (4)
- # clojure-italy (8)
- # clojure-new-zealand (2)
- # clojure-nl (7)
- # clojure-russia (7)
- # clojure-spec (29)
- # clojure-uk (63)
- # clojurescript (103)
- # core-async (5)
- # cursive (11)
- # datomic (16)
- # devcards (1)
- # emacs (28)
- # figwheel-main (3)
- # fulcro (97)
- # graphql (4)
- # hyperfiddle (1)
- # jobs (1)
- # kaocha (3)
- # lumo (9)
- # nrepl (4)
- # off-topic (29)
- # onyx (1)
- # pathom (4)
- # pedestal (8)
- # re-frame (24)
- # reagent (1)
- # reitit (13)
- # ring-swagger (7)
- # rum (11)
- # shadow-cljs (79)
- # sql (46)
- # tools-deps (67)
- # yada (8)
does anyone remember or know offhand of an updated brave and true emacs setup? We got an issue on CIDER and I thought someone had updated the for people following the book. ring a bell with anyone?
I remember some discussion a month ago but I don’t see any related issues or pull requests about it.
Does this help? https://github.com/flyingmachine/emacs-for-clojure
Many functions return stuff like:
({:month 1, :day 1, :human 5.3, :critter 2.3} {:month 1, :day 2, :human 5.1, :critter 2.0} {:month 2, :day 1, :human 4.9, :critter 2.1} {:month 2, :day 2, :human 5.0, :critter 2.5})
Is there a little command I'm missing that turns that into something like:
({:month 1, :day 1, :human 5.3, :critter 2.3}
{:month 1, :day 2, :human 5.1, :critter 2.0}
{:month 2, :day 1, :human 4.9, :critter 2.1}
{:month 2, :day 2, :human 5.0, :critter 2.5})
That is, besides using multiple-cursors or macroing, of course. Tried cider-format-buffer
but it doesn't interfere with situations like these since I guess it would be tricky to detect what was intentional or not.Besides pprint
There's also a slew of cider-pprint-*
; perhaps one of those will do what you're looking for?
Yeah, just found those cider-pprint-*
functions, and they solve my problem documenting code snippets I try, but both in buffer and at the repl they are returned without pretty printing.
I don't have that variable it seems...
Oh, I have cider-repl-use-pretty-printing
and cider-repl-toggle-pretty-printing
, nice 😄
Thanks
Oh, the incantation to pprint to comment in a buffer: C-c C-v C-f C-c C-d
gotta love Emacs 🙂
@dpsutton Oh, nice, I must check those options more carefully.
,toggle-pretty
yeah
perfect
Hm, aren't those the default repl utils like dir
, source
, etc?
At least with my setup those are loaded by default
In Cider at least
I know they aren't in a plain repl
C-u C-c C-p
also works just the same as C-c C-v C-f C-c C-d
and is much more accessible.