reverse-im-read-char-advice-function doesn't work with native compilation
It always triggered when reverse-im-read-char-advice-function option is set, even if mu4e excluded/not included.
Mu4e don't have to be configured with more than one mail context, one will trigger the error too:
- open mu4e
- press C to compose email, then cancel with C-c C-k
- press ; to switch context, choosing any context results in the error
Wrong type argument: symbolp, #[0 "\300 \210\301 \207" [mu4e-context-switch revert-buffer] 1 nil nil]
Debugger entered--Lisp error: (wrong-type-argument symbolp #f(compiled-function () (interactive nil) #<bytecode 0x1c91369eb390d40>))
reverse-im--this-command-p(org-capture)
#f(compiled-function (elt) #<bytecode -0x41b2b6d3cfcdd5e>)(org-capture)
mapc(#f(compiled-function (elt) #<bytecode -0x41b2b6d3cfcdd5e>) (org-capture org-export-dispatch))
seq-do(#f(compiled-function (elt) #<bytecode -0x41b2b6d3cfcdd5e>) (org-capture org-export-dispatch))
seq-some(reverse-im--this-command-p (org-capture org-export-dispatch))
reverse-im-read-char-include(#<subr read-char-exclusive> #("[mu4e] Switch to context: [m]ain [C-g to cancel]" 1 5 (face mu4e-title-face) 27 28 (face mu4e-highlight-face) 34 37 (face mu4e-highlight-face)) nil nil)
apply(reverse-im-read-char-include #<subr read-char-exclusive> (#("[mu4e] Switch to context: [m]ain [C-g to cancel]" 1 5 (face mu4e-title-face) 27 28 (face mu4e-highlight-face) 34 37 (face mu4e-highlight-face)) nil nil))
read-char-exclusive(#("[mu4e] Switch to context: [m]ain [C-g to cancel]" 1 5 (face mu4e-title-face) 27 28 (face mu4e-highlight-face) 34 37 (face mu4e-highlight-face)) nil nil)
mu4e--read-char-choice(#("[mu4e] Switch to context: [m]ain [C-g to cancel]" 1 5 (face mu4e-title-face) 27 28 (face mu4e-highlight-face) 34 37 (face mu4e-highlight-face)) (109))
mu4e-read-option("Switch to context: " (("main" . #s(mu4e-context :name "main" :enter-func nil :leave-func nil :match-func (lambda (msg) (if msg (progn (or ... ...)))) :vars ((user-full-name . snip) (mu4e-compose-signature))))))
mu4e--context-ask-user("Switch to context: ")
mu4e-context-switch()
#f(compiled-function () (interactive nil) #<bytecode 0x1c91369eb390d40>)()
funcall-interactively(#f(compiled-function () (interactive nil) #<bytecode 0x1c91369eb390d40>))
command-execute(#f(compiled-function () (interactive nil) #<bytecode 0x1c91369eb390d40>))
GNU Emacs 29.0.60 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6) of 2022-12-11
is native compilation enabled?
Yes.
@ceed0 I've added a workaround (not a fix) to skip native compiled functions. Unfortunately, I can't test it now, feel free to do it yourself.
This workaround works, thank you.