A recent update must have slipped my testing afterwords and now this hook mu4e-compose-mode-hook
does not work anymore.
On every new email I must set the input-method manually again.
Any ideas about how to fix this behaviour?
(add-hook 'mu4e-compose-mode-hook
(lambda () (set-input-method "german-postfix")))
tried this snippet as well without success
(add-hook 'mu4e-compose-mode-hook 'my-mu4e-mode-hook)
(defun my-mu4e-mode-hook ()
"Custom behaviours for `mu4e-compose-mode'."
(activate-input-method "german-postfix"))
Notes
C-h v major-mode
major-mode is a variable defined in ‘C source code’.
Its value is ‘mu4e-compose-mode’
Original value was ‘fundamental-mode’
Local in buffer *draft*; global value is fundamental-mode
C-h v mu4e-compose-mode-hook
mu4e-compose-mode-hook is a variable defined in ‘mu4e-compose.el’.
Its value is
((lambda nil
(use-hard-newlines t 'guess))
my-mu4e-mode-hook)
M-x trace-function RET activate-input-method RET
======================================================================
1 -> (activate-input-method "german-postfix")
1 <- activate-input-method: nil
The moment I start composing the message / typing:
======================================================================
1 -> (activate-input-method nil)
1 <- activate-input-method: nil
======================================================================
M-x debug-on-entry RET activate-input-method RET
Initially:
Debugger entered--entering a function:
* activate-input-method("german-postfix")
my-mu4e-mode-hook()
run-hooks(change-major-mode-after-body-hook text-mode-hook message-mode-hook mu4e-compose-mode-hook)
apply(run-hooks (change-major-mode-after-body-hook text-mode-hook message-mode-hook mu4e-compose-mode-hook))
run-mode-hooks(mu4e-compose-mode-hook)
mu4e-compose-mode()
mu4e~compose-handler(new)
mu4e-compose(new)
mu4e-compose-new()
funcall-interactively(mu4e-compose-new)
call-interactively(mu4e-compose-new nil nil)
command-execute(mu4e-compose-new)
Upon hitting i
to insert text / compose message:
* activate-input-method(nil)
evil-insert-state(1)
evil-insert(1 nil nil)
evil-append(1 nil)
funcall-interactively(evil-append 1 nil)
call-interactively(evil-append nil nil)
command-execute(evil-append)
C-h v mu4e-compose-mode-hook
show anything unexpected?M-x trace-function RET activate-input-method RET
and then composing a new message (untrace-function
to remove). If there's an unexpected call, then useM-x debug-on-entry RET activate-input-method RET
and find out where it's coming from (cancel-debug-on-entry
to remove). SeeC-h i g (elisp)Debugger Commands
for driving the debugger. Edit any relevant details into your question.(activate-input-method nil)
you want the debugger to tell you about. Check the debugger command documentation again, and usec
to continue execution until you trigger the second call, and then show the backtrace for that.evil-insert-state
which is disabling the active input method. Why? I have no idea -- I don't useevil
, so I'll leave it to someone who has that installed to provide an Answer for you -- but I think that's a very clear question now.