Fork me on GitHub
#emacs
<
2019-06-26
>
theeternalpulse01:06:33

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

andy.fingerhut04:06:40

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

theeternalpulse04:06:45

I use company, didn't know what semantic was, going to look through this but looks like it's it.

Daouda11:06:29

hey Folks, please can you tell me how to comment in emacs?

dpsutton12:06:59

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

Daouda12:06:26

I want to comment an expression

Daouda12:06:39

let say a function

dpsutton12:06:02

elisp or clojure?

dpsutton12:06:37

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

dpsutton12:06:23

(defn foo [x]
  ;; you can just type random comments
  (+ 1 x))

Daouda12:06:14

Need something to comment all the function. the entire form

(defn func []
        (body))

dpsutton12:06:53

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

Daouda12:06:11

take off a part of my code

dpsutton12:06:01

you could put a #_ reader macro before a form or highlight and hit M-;

โœ”๏ธ 8
๐Ÿ‘ 4
๐ŸŽ‰ 4
Daouda12:06:15

not make comment, but a way to turn off a piece of code

Daouda12:06:22

#_ did the trick ๐Ÿ˜„

Daouda12:06:30

thank you very much

dpsutton12:06:53

absolutely!

practicalli-johnny12:06:48

@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"})

practicalli-johnny12:06:11

The #_ doesnt need to be on the same line, but needs to be the characters before the expression

๐Ÿ‘ 8
Daouda12:06:25

very helpful what you said

Daouda12:06:45

specially this: The #_ doesnt need to be on the same line, but needs to be the characters before the expression`

Daouda12:06:38

and how to evaluate comment code ๐Ÿ™‚

Daouda12:06:47

thank you very much

๐Ÿ‘ 4
jumar13:06:28

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)

Daouda13:06:15

good observation, Iโ€™ve fallen in this trap ๐Ÿ˜„

jumar13:06:36

That doesn't apply to ;-style comments of course

theeternalpulse15:06:44

I also love #_ because you can still manually evaluate the expression with cider at least. A comment will just evaluate to null

yuhan15:06:46

you can also set the variable clojure-toplevel-inside-comment-form to enable cider-eval-defun inside comment forms

yuhan15:06:22

the docstring says it's experimental but I haven't encountered problems with it so far ๐Ÿ™‚

Mattias15:06:48

Whatโ€™s the difference? Honest question, Iโ€™ve always used stock Emacs because Iโ€™m lazy.