This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-10
Channels
- # adventofcode (3)
- # aws (2)
- # beginners (85)
- # boot (8)
- # boot-dev (4)
- # cider (36)
- # clara (3)
- # cljs-dev (87)
- # cljsrn (3)
- # clojure (87)
- # clojure-austin (12)
- # clojure-brasil (1)
- # clojure-dev (8)
- # clojure-dusseldorf (5)
- # clojure-estonia (5)
- # clojure-greece (4)
- # clojure-italy (3)
- # clojure-spec (17)
- # clojure-uk (55)
- # clojurescript (70)
- # core-logic (2)
- # cursive (6)
- # data-science (18)
- # datomic (13)
- # emacs (34)
- # fulcro (347)
- # graphql (12)
- # hoplon (6)
- # jobs (3)
- # jobs-discuss (43)
- # juxt (2)
- # keechma (31)
- # leiningen (29)
- # lumo (2)
- # midje (2)
- # off-topic (118)
- # om-next (4)
- # onyx (39)
- # pedestal (6)
- # re-frame (85)
- # reagent (21)
- # remote-jobs (3)
- # ring (5)
- # rum (2)
- # shadow-cljs (126)
- # spacemacs (1)
- # sql (6)
Hi there! I’d like to be able to reformat (empty? [ ])
to (empty? [])
(remove unnecessary spaces). I may be blind but I haven’t found yet the proper command to use in Emacs. Is it possible?
Neither cider-format-buffer
nor cider-format-region
do what I described. I’ve just got a mostly empty emacs init.el
with bare minimum for Clojure (paredit, cider, expand-region) so I guess it doesn’t come from a setting problem, does it?
fill-region
has almost the expected behaviour
for me, cider-format-*
removes the spaces between the [ ]
, is that not what you're seeing?
Ha! yes indeed, cider-format-*
removes the spaces between the [ ]
. I didn’t notice it 😕, sorry for that. But the space useless spaces between empty?
and [
are still present.
@piotr2b Guess you should report this as a cljfmt
bug, as this is what CIDER users internally for this command.
I've dug into the shutdown hooks issue some more and figured out some interesting stuff
- the elisp documentation for kill-buffer
(which I think is how cider is killing the jvm) states that it issues SIGHUP
to any dependent processes
- I've confirmed from many directions that a jvm runs shutdown hooks on SIGHUP -- they run if you signal the jvm directly, they run if you signal the lein jvm that spawned it, they run if you signal the bash process that created the lein vm that created the real vm
- I've even tried running kill-buffer
from the cider nrepl buffer, and even that runs the shutdown hooks
- but when I run cider-quit
from the cider repl buffer, they get skipped
if (! (EQ (symbol, Qsignal) || EQ (symbol, Qexit)))
pset_status (p, list2 (Qsignal, make_number (SIGKILL)));
so it's not kill-buffer
then?
got it
any guesses on whether this is by design or could be improved?
no idea. my guess is that this delete process and then kill the buffer felt more responsible but it seems to do it improperly
and the commit from @malabarba is just > Don't try to close a dead connection
what's the standard practice in this situation? send a weaker signal and wait a few seconds and then kill it forcibly?
this reminds me of issues that come up when running a child jvm under windows (probably not the same issue though)
I’ll back burner this and let you know if I remember something important, but honestly I backed away from emacs because it introduces too many interesting problems and almost useful utilities - it was constantly nerd sniping me and I’ve had more free time since I stopped using it
you just trolled 700 people at once
it seems my tact is running on a 5 minute delay
but a and almost useful utilities -
slipped in there, which is definitely true 😉
you probably wanted to say "myriad of useful utilities"