Fork me on GitHub
#emacs
<
2022-04-01
>
borkdude20:04:44

Hi. I'm able to hang emacs in clojure-mode by typing: (def ^{:macro_}) with the underscore being my cursor. On debug I see this:

Debugger entered--entering a function:
* #f(compiled-function () #<bytecode 0x1fe4d41470e9>)()
  imenu--generic-function(((nil clojure-match-next-def 0)))
  imenu-default-create-index-function()
  imenu--make-index-alist(t)
  which-function()
  which-func-update-1(#<window 3 on foo.clj>)
  which-func-update()
  apply(which-func-update nil)
  timer-event-handler([t 0 0 500000 t which-func-update nil idle 0])
  recursive-edit()
  debug(lambda)
* thing-at-point--end-of-sexp()
  bounds-of-thing-at-point(sexp)
  clojure-match-next-def()
  imenu--generic-function(((nil clojure-match-next-def 0)))
  imenu-default-create-index-function()
  imenu--make-index-alist(t)
  which-function()
  which-func-update-1(#<window 3 on foo.clj>)
  which-func-update()
  apply(which-func-update nil)
  timer-event-handler([t 0 0 500000 t which-func-update nil idle 0])

borkdude20:04:47

I was able to retrieve the debug with:

pkill -USR2 Emacs

ericdallo20:04:51

Can't repro on doom-emacs

borkdude20:04:21

clojure-mode version 5.13.0

borkdude20:04:13

The above text is the only thing in the buffer

borkdude20:04:17

no other code

ericdallo20:04:01

does it freezes always? or is it flaky?

borkdude20:04:49

always freeze

ericdallo20:04:33

So, I repro if I write that code and then try to M-x eval-expression (clojure-match-next-def)

ericdallo20:04:49

so it does seems something to be fixed either on clojure-mode or imenu that call that function

ericdallo20:04:53

probably clojure-mode itself