Issue #278 new

Input method can not be toggled on in isearch mode

Xin Wang
created an issue

Input method can not be toggled on in isearch mode when evil is enabled. It works if evil is disabled.

In evil 1.0.1, emacs 24.3.

Comments (1)

  1. Anonymous

    Hey, I'm the one who posted the question that this issue mostly likely came from (http://stackoverflow.com/questions/15169428/). The problem is that evil's incremental searches are performed in normal mode, which, to my knowledge, cannot be used with an input method. This is a quick hack I came up with that switches to insert-state just before performing a search. Since it switches to normal-state directly after the search is finished, the only indicator that you temporarily switch to insert-state is a different cursor while you are performing the search.

     (evil-define-motion evil-search-forward ()
      (format "Search forward for user-entered text.
    Searches for regular expression if `evil-regexp-search' is t.%s"
              (if (and (fboundp 'isearch-forward)
                       (documentation 'isearch-forward))
                  (format "\n\nBelow is the documentation string \
    for `isearch-forward',\nwhich lists available keys:\n\n%s"
                          (documentation 'isearch-forward)) ""))
      :jump t
      :type exclusive
      :repeat evil-repeat-search
        (progn                 ;MADE CHANGES HERE
          (evil-insert-state)
          (evil-search-incrementally t evil-regexp-search)
          (evil-normal-state)
        ))
    
    (evil-define-motion evil-search-backward ()
      (format "Search forward for user-entered text.
    Searches for regular expression if `evil-regexp-search' is t.%s"
              (if (and (fboundp 'isearch-forward)
                       (documentation 'isearch-forward))
                  (format "\n\nBelow is the documentation string \
    for `isearch-forward',\nwhich lists available keys:\n\n%s"
                          (documentation 'isearch-forward)) ""))
      :jump t
      :type exclusive
      :repeat evil-repeat-search
        (progn                 ;MADE CHANGES HERE
          (evil-insert-state)
          (evil-search-incrementally nil evil-regexp-search)
          (evil-normal-state)
        ))
    

    I'm not sure if this is where I shoud be posting 'contributions' like this, but I figured it was a good place to start. :)

  2. Log in to comment