Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax ^: causes Emacs to freeze. #595

Closed
ZachFontenot opened this issue May 16, 2021 · 3 comments · Fixed by #624
Closed

Syntax ^: causes Emacs to freeze. #595

ZachFontenot opened this issue May 16, 2021 · 3 comments · Fixed by #624

Comments

@ZachFontenot
Copy link

ZachFontenot commented May 16, 2021

This happened to me about a half a year ago on Arch Linux with obviously older Emacs and older clojure-mode. Both using Prelude. I wasn't able to reproduce merely with clojure-mode, so steps include downloading prelude.

Expected behavior

Adding ^: to def and defn don't freeze emacs

Actual behavior

^: freezes emacs

Steps to reproduce the problem

Download Prelude Emacs. Open either a clj or cljs file. Type (def ^:something) or (defn ^:something) or even just (def ^:)/(defn ^:). I've reliably been able to reproduce if it doesn't happen initially by typing (defn ^:something) and then M-backspace to delete back to the colon. Will include a screen shot of cpu profiler.

Screen Shot 2021-05-16 at 2 20 43 PM

I know a screenshot is not necessarily the best, but I'm having trouble logging it otherwise.

Environment & Version information

clojure-mode version

clojure-mode (version 5.13.0)

Emacs version

GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H114))
of 2021-04-24

Operating system

MacOSX 10.15.7 Catalina

@ZachFontenot
Copy link
Author

Also, it seems that after this happens and I quit via ctrl-g Emacs still consumes high cpu

@vemv
Copy link
Member

vemv commented Aug 9, 2021

It might be interesting to try reproducing this on CI.

For example one could have unit tests for these inputs. Having the build green would be a pretty good signal. Then if possible one could check if CPU was increased in said CI environment

If the issue can't be reproduced, perhaps flycheck or company-mode (per your screenshot) are making an assumption that isn't true. Maybe a race condtion? Given there's a timer involved.

@vemv
Copy link
Member

vemv commented Jul 19, 2022

Released as clojure-mode 5.15.0, which will be available within a couple hours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants