Open ghost opened 8 years ago
It can't be made async because it has the side-effect of editing the buffer. Emacs-async runs on an entirely separate process, so that's not viable.
OTOH, it really shouldn't freeze up your Emacs. aggressive-indent takes a series of measures to avoid blocking input. Maybe it's a conflict with somw other package?
I know how to trigger input blocking and managed to get a stack trace of it before I filed this bug. It's aggressive-indent-mode and garbage collection:
command-execute 43389 39%
+ aggressive-indent--indent-if-changed 35783 32%
+ ... 18723 16%
+ indent-guide-post-command-hook 5236 4%
+ company-post-command 4075 3%
+ redisplay_internal (C function) 2298 2%
+ timer-event-handler 952 0%
+ xterm-mouse-translate-extended 56 0%
+ global-hl-line-highlight 33 0%
+ winner-save-old-configurations 21 0%
+ nrepl-client-filter 18 0%
+ yas--post-command-handler 15 0%
+ compilation-filter 10 0%
tooltip-hide 6 0%
+ indent-guide-pre-command-hook 5 0%
+ delete-selection-pre-hook 5 0%
+ cua--post-command-handler 4 0%
+ isearch-pre-command-hook 1 0%
That's a performance report, not a stacktrace. Indeed, aggressive-indent does a lot of work , but it does so inside a while-no-input
block, which should prevent input blocking.
Try the following:
M-x toggle-debug-on-quit
.C-g
a couple of times.You'll get a backtrace you can paste here.
Hi Brian, did you have time to produce a stack trace?
Also, see my comment here, it might fix your problem: https://github.com/Malabarba/aggressive-indent-mode/issues/73#issuecomment-253313534
This is freezing up my emacs.. can we use emacs-async to run the indenter?
https://github.com/jwiegley/emacs-async