Fork me on GitHub
#emacs
<
2021-07-26
>
Kenneth Gitere09:07:13

Hi I have this weird issue using Emacs. When my cursor is in a (comment) form, Emacs will just freeze and have CPU usage just skyrocket so I end up having to write sample code directly in the repl. Has anyone experienced similar

hindol09:07:57

One option is to start the profiler, reproduce the issue, hit CTRL-G and then generate the profiler report. What does it show?

Kenneth Gitere10:07:44

Well I can't press Ctrl-G since all of Emacs becomes unresponsive

Kenneth Gitere10:07:12

I actually have to kill emacs from the terminal rather than using C-x C-c

javahippie15:07:06

I’d try disabling some packages until the issue goes away. When did it first occur, were there some packages installed in that timeframe?

Kenneth Gitere18:07:36

I haven't added any new Emacs packages in a really long time (months) so I don't think that's it. I only started using (comment) forms this month so maybe that's the closest I can come to seeing this happen

felipebarros14:07:32

Still @U01S2SZG5B7, the best workflow is to disable packages to try and isolate which (if any) is triggering the issue. In your previous comment you state that you have only recently began to use (comment), so even if your setup has been working fine, that bug may have been laying dormant all along.

Kenneth Gitere15:07:23

alright. I'll probably try it out on a clean instance of Emacs with only LSP and Clojure packages

👍 2
vemv16:07:21

kill -USR2 $your_emacs_pid should enable the debugger when emacs is frozen. It will display stacktrace of whatever emacs was doing at that point

👍 3
💯 2
michieljoris00:07:39

I've had the same issue. Actually only when cursor was on the comment word. Everything freezes for a while, but returns to normal after a bit, while bashing Ctrl-G. I was using doom-emacs with inf-clojure (not cider) and lsp-mode. Now using eglot instead and issue seems to have gone away. It might be the clojure-lsp server returning lots of messages for some reason in response to the hover on comment and locking up single process emacs.

Kenneth Gitere08:07:18

Good to know someone else has faced the same issue. I had been considering just moving to VSCode with Calva actually.