diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-04-01 08:07:15 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-04-01 08:07:15 +0200 |
| commit | 87e30394e2434df63275464f4405ca8770968b97 (patch) | |
| tree | bf3fbcbbca9fb3e38a6867bebe5929f78aef6f85 | |
| parent | 12b9712f546fc7b6229e56336bfa375fa3165406 (diff) | |
README: Add paragraph about debugging Corfu
| -rw-r--r-- | README.org | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -529,6 +529,26 @@ enhance your setup. your completions in the minibuffer ~consult-completion-in-region~ is your best option. +* Debugging Corfu + +When you observe an error in the =corfu--post-command= post command hook, you +should install an advice to enforce debugging. This allows you to obtain a stack +trace in order to narrow down the location of the error. The reason is that post +command hooks are automatically disabled (and not debugged) by Emacs. Otherwise +Emacs would become unusable, given that the hooks are executed after every +command. + +#+begin_src emacs-lisp + (setq debug-on-error t) + + (defun force-debug (func &rest args) + (condition-case e + (apply func args) + ((debug error) (signal (car e) (cdr e))))) + + (advice-add #'corfu--post-command :around #'force-debug) +#+end_src + * Contributions Since this package is part of [[https://elpa.gnu.org/packages/corfu.html][GNU ELPA]] contributions require a copyright |
