Fork me on GitHub
#emacs
<
2021-11-05
>
lassemaatta10:11:50

has anyone else had issues with emacs completely freezing sometimes when viewing .cljc files? Happens to me perhaps once or twice a week. Any ideas on how to debug this would be appreciated 🙂

👍 1
lassemaatta10:11:58

GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) of 2021-08-06

lassemaatta10:11:06

CIDER 1.2.0snapshot (package: )

lassemaatta10:11:20

lsp-mode , Emacs 28.0.50, gnu/linux + clojure-lsp 2021.11.02-15.24.47

vemv11:11:35

M-x debug-on-quit and C-g whenever it's freezing? There's also a nice profiler apparently

vemv11:11:48

n.b., afacit there isn't an official doc laying out how cider and clojure-lsp should play together in emacs. It doesn't seem trivial that they overlap here and there, and they keep changing. a cider-nrepl + lsp combo is nicely done/curated in Calva, so it's not something impossible or complex. But if you're gonna roll it yourself... here be dragons 🐉

mpenet11:11:10

It's quite easy to make both play nice

mpenet11:11:38

you get to pick & choose who's doing what

lassemaatta11:11:21

when this problem occurs I can't get emacs to react to anything (well, except for kill -9), even C-g so I'm not sure if debug-on-quit will help. But I'll check it out, thanks

vemv11:11:15

you can send instead kill -USR2 to trigger a quit if you had set debug-on-quit beforehand, you'll get a stacktrace of w/e was keeping emacs busy at that moment

ericdallo11:11:22

debug-on-quit should help understand on what function is stuck

lassemaatta11:11:30

good to know. one thing that might complicate things is that when my emacs freezes it isn't consuming a lot of cpu. so it doesn't look like a typical case of a thread stuck in a loop

Zachary Fontenot16:11:52

I had a very similar thing happen but it was specifically when using ^: for metadata tags. Never figured out why but profiling etc seemed to point to syntax highlighting