Input-method during isearch

Nikolai Weibull now at disu.se
Sun Mar 1 16:06:40 CET 2015


Hi!

I’m trying to get input-method to work during isearch.  It works if,
for example, isearch-forward-regexp is started in insert mode, as evil
doesn’t disable input-method then.  However, when started in normal
mode, it won’t work, as evil disables input-method in that state.
I’ve tried

(defun now-evil--isearch-forward-regexp-around (fn &rest args)
  (let ((s evil-state))
    (if (or (not evil-local-mode) (evil-state-property s :input-method))
        (apply fn args)
      (evil-change-state 'insert)
      (unwind-protect
          (apply fn args)
        (evil-change-state s)))))
(advice-add 'isearch-forward-regexp :around
'now-evil--isearch-forward-regexp-around)

to get around this limitation, but it doesn’t work.  It seems that
evil is entering normal state somewhere between here and when isearch
is started.

What am I doing wrong?

Thanks!



More information about the implementations-list mailing list