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
    (Incremental search does not actually use the minibuffer - it just seems like it does.) – Drew Jun 29 '16 at 14:44
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).

  • 1
    evil has no difference – chen bin Jun 30 '16 at 12:38
  • 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 Mar 30 '17 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 Mar 30 '17 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 Mar 31 '17 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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