This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-26
Channels
- # announcements (6)
- # beginners (328)
- # boot (2)
- # cider (72)
- # clara (6)
- # cljdoc (4)
- # cljsrn (5)
- # clojure (78)
- # clojure-europe (3)
- # clojure-italy (22)
- # clojure-nl (4)
- # clojure-spec (3)
- # clojure-uk (114)
- # clojurescript (22)
- # clojurex (54)
- # copenhagen-clojurians (1)
- # core-async (20)
- # cursive (8)
- # data-science (1)
- # datomic (22)
- # duct (11)
- # emacs (32)
- # events (1)
- # figwheel (2)
- # fulcro (18)
- # graalvm (53)
- # graphql (39)
- # luminus (6)
- # nrepl (6)
- # off-topic (53)
- # om (1)
- # re-frame (8)
- # reagent (19)
- # reitit (3)
- # shadow-cljs (28)
- # spacemacs (10)
- # sql (37)
- # tools-deps (33)
- # vim (9)
- # xtdb (6)
When I start my emacs every time it uncompresses a bunch of files and this shows up in my messages. It extends the load time of emacs by quite a few seconds:
uncompressing comint.el.gz...done
uncompressing subr.el.gz...done
uncompressing tooltip.el.gz...done
uncompressing syntax.el.gz...done
uncompressing cl-lib.el.gz...done
uncompressing macroexp.el.gz...done
uncompressing eldoc.el.gz...done
uncompressing uniquify.el.gz...done
uncompressing ediff-hook.el.gz...done
uncompressing vc-hooks.el.gz...done
uncompressing float-sup.el.gz...done
uncompressing mwheel.el.gz...done
uncompressing custom.el.gz...done
uncompressing widget.el.gz...done
uncompressing timer.el.gz...done
uncompressing x-win.el.gz...done
uncompressing common-win.el.gz...done
uncompressing frame.el.gz...done
uncompressing mouse.el.gz...done
uncompressing scroll-bar.el.gz...done
uncompressing faces.el.gz...done
By any chance are you using company mode and semantic mode? I haven't ever used either, but Google found this: https://github.com/company-mode/company-mode/issues/525
I use company, didn't know what semantic was, going to look through this but looks like it's it.
what do you mean @quieterkali? There's M-;
which is comment-dwim
where dwim (do what i mean) will try to comment the current line in whatever comment form your language should use. Not clear if you want to comment clj code, elisp code, or just random code in a buffer
just type ;
then? I'm not sure i'm following. If you want to write a code comment you can just type ;
and then your comment after it
I don't know what you mean by comment all the function. Do you want to comment it out so that it won't get evaluated? If so highlight the form and hit M-;
that i talked about before
you could put a #_
reader macro before a form or highlight and hit M-;
@quieterkali putting your function inside (comment )
or putting the reader comment macro #_
before your function, or any expression in Clojure will tell Clojure not to read that expression and therefore it does not get evaluated when you evaluate the buffer or run the code. Move the cursor (in your source code buffer) to after the closing bracket of the function that is commented and you can manually evaluate that function, even though it is commented (with a recent version of CIDER).
I tend to do something like this
#_
(swap! app-state assoc {:my-map "another value"})
The #_
doesnt need to be on the same line, but needs to be the characters before the expression
specially this: The
#_ doesnt need to be on the same line, but needs to be the characters before the expression
`
Note that when using #_
or comment
it must still be a syntactically valid expression so e.g. the following doesn't compile:
#_(reduce + [1 2 3)
I also love #_ because you can still manually evaluate the expression with cider at least. A comment will just evaluate to null
you can also set the variable clojure-toplevel-inside-comment-form
to enable cider-eval-defun inside comment
forms