Incremental search doesn't allow me to switch between different input sources, e.g. US English to French, when I'm typing my search string into the minibuffer. Is there a way to fix this?

It happens only when I try to switch input sources with keyboard shortcuts. It doesn't happen with switching by clicking the input source icon in the menu bar.

24.5 OSX desktop version

  • 2
    How did you try changing input methods during an isearch? For me both C-\\ (toggle-input-method) and C-x RET C-\\ (set-input-method) works just fine during isearch. Have you tried without your configuration (i.e., run emacs -Q and try there)? – Omar Aug 5 '18 at 15:56
  1. If you use Isearch+ then you can use C-x o during Isearch to open a recursive editing session, where you can do anything you like (including search for something different). Using C-M-c closes the recursive editing session and resumes the search (from the current position where you hit C-M-c).

    Non-nil option isearchp-resume-with-last-when-empty-flag means that if Isearch is resumed with an empty search string, after being suspended, the previous search string is used. (Non-nil is the default.) If nil, Isearch is resumed with an empty search string, as if starting over from the resumed location.

  2. From Lisp, you can use macro with-isearch-suspended to interrupt Isearch to perform some action, such as read something from the minibuffer. (You do not need Isearch+ for this; the macro is included in vanilla Emacs.)

  • @Omar: Which part of (the manual's text) "C-\ (toggle-input-method) used twice" is unclear? – Drew Jul 19 '18 at 20:34
  • @Omar: Please post your answer separately, instead of rewriting this answer. Feel free to downvote this answer if you think it is misleading or unhelpful. But please don't make it say something quite different from what I intended. Thx. – Drew Aug 4 '18 at 22:46
  • I apologize, I really did think you'd appreciate someone correcting the mistake for you since you hadn't gotten around to doing it yourself. I am sorry. Also, I'll delete my above comments since they refer to part of the answer that has been deleted and make no sense now. – Omar Aug 4 '18 at 23:54
  • @Omar: No need to apologize. And please do post what you've said in another answer. It's quite possible that my answer is incomplete or incorrect. It's important that you add your answer, to help users. I didn't mean to shut you up at all. I think it will be clearer and help folks more, if we each express what we think separately, rather than edit each other's statements. Apologies if my comment came across as negative. – Drew Aug 5 '18 at 15:43

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.