[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: debugging post command hook max-lisp-eval-depth
From: |
John Shahid |
Subject: |
Re: debugging post command hook max-lisp-eval-depth |
Date: |
Sun, 17 Jun 2018 23:27:40 +0000 |
User-agent: |
mu4e 1.1.0; emacs 27.0.50 |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Hmm... post-command-hook is run via `safe_run_hooks` which is supposed
> to try and catch errors such that when an error is caught the
> corresponding function is removed from post-command-hook.
I don't think there is a specific hook that is recursing infinitely. The
two I noticed in the error message were both global minor modes
(magit-file-mode & display-line-numbers).
>
> Of course, this is a just a mitigating factor, but it should prevent the
> problem you describe, except in those cases where the offending function
> is constantly re-added (e.g. by a pre-command-hook).
I think that's the case, `define-globalized-minor-mode' will add the
post-command-hook in MODE-cmhh.
>
> Another approach is something like:
>
> (advice-add 'debug :around
> (lambda (&rest args)
> (let ((post-command-hook nil))
> (apply args))))
That's a great idea. Thanks!
- debugging post command hook max-lisp-eval-depth, John Shahid, 2018/06/17
- Re: debugging post command hook max-lisp-eval-depth, Stefan Monnier, 2018/06/17
- Re: debugging post command hook max-lisp-eval-depth,
John Shahid <=
- Re: debugging post command hook max-lisp-eval-depth, Stefan Monnier, 2018/06/18
- Re: debugging post command hook max-lisp-eval-depth, John Shahid, 2018/06/18
- Re: debugging post command hook max-lisp-eval-depth, Stefan Monnier, 2018/06/18
- Re: debugging post command hook max-lisp-eval-depth, John Shahid, 2018/06/18
- Re: debugging post command hook max-lisp-eval-depth, John Shahid, 2018/06/20
- Re: debugging post command hook max-lisp-eval-depth, Stefan Monnier, 2018/06/20
- Re: debugging post command hook max-lisp-eval-depth, Leo Liu, 2018/06/22
- Re: debugging post command hook max-lisp-eval-depth, John Shahid, 2018/06/23