1

I am writing some xelatex code with both English and Farsi (right to left direction) characters in it. Also I am using Emacs' input method (changing with key Ctrl + \) for changing between English and Farsi keyboards. It is great being able to use Emacs movement shortcuts and typing Farsi at the same time.

However I would like to be able to use Farsi input method in minibuffers, like the one opened by searching, too. The (Ctrl + \) key is not available there, and it is very inconvenient to have to change the system level input method two times whenever I want to type some Farsi character in some minibuffer (The whole point of Emacs' input method is to avoid scenarios like this).

So is this possible? If yes, I would like to know if it is possible to use Farsi characters with evil-mode commands (like f) or not. Thank you very much.

1
  • 2
    (Incremental search does not actually use the minibuffer - it just seems like it does.)
    – Drew
    Commented Jun 29, 2016 at 14:44

1 Answer 1

1

In general you can toggle the input method in the minibuffer exactly like you can in any other buffer. However, as Drew points out in the comments, isearch doesn't use the minibuffer (it is actually just using the echo area to display information).

To isearch in a different input method you must enable the input method before you start searching.

Alternatively, if you have already entered isearch mode, you can type M-e to edit the pattern in the minibuffer, at which point you can toggle the input method with C-\ as usual.

I don't use Evil, but chen bin confirms that it makes no difference (although the key bindings I've mentioned may be different under Evil).

4
  • 1
    evil has no difference
    – chen bin
    Commented Jun 30, 2016 at 12:38
  • 1
    But how do you enable input method for isearch? This answer is marked as a solution but I can't find any way of toggling input method in minibuffer.
    – lonelyelk
    Commented Mar 30, 2017 at 20:40
  • @lonelyelk, in the minibuffer you can toggle input methods using the normal key binding, but note Drew's comment on the question -- isearch doesn't use the minibuffer. So as I've said in this answer, you should toggle the input method before starting to isearch. Or (and for some reason I didn't suggest this the first time), start isearching, then type M-e to edit the pattern in the minibuffer (at which point you can toggle the input method).
    – phils
    Commented Mar 30, 2017 at 21:29
  • @phils Oh! I see! So I would go M-s w M-e C-\ wordinput RET For a search. Thank you!
    – lonelyelk
    Commented Mar 31, 2017 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.