> Is there a way to disable the effect of `inhibit-quit' in `jit-lock' so > C-g interrupt again in order to get an elisp-backtrace with > `debug-on-quit'. > Otherwise, what's the best way to debug this? Looking closer at > `org-adaptive-fill-function'?
You can try `debug-on-event'. There's jit-lock-debug-mode but it doesn't disable inhibit-quit. So you'll need to additionally use (advice-add 'jit-lock--debug-fontify :around (lambda (fun &rest args) (with-local-quit (apply fun args)))) Of course sometimes this doesn't work because jit-lock-debug-mode changes the way things are executed and the bug may not manifest itself any more, but it's worth a try. Another source of info is to M-x trace-function RET org-adaptive-fill-function RET M-x trace-function RET org-element-at-point RET M-x trace-function RET org-element--cache-sync RET M-x trace-function RET org-element--cache-process-request RET Then reproduce the hang, then break the hang somehow (maybe with the jit-lock-debug hack above, or maybe with debug-on-event, or with C-g C-g C-g, ...), then look at the *trace..* buffer. Stefan