In Emacs, the command
replace-string will replace all occurrences in the buffer. If you want Emacs to ask you each time it is about to replace a string, you need to use the so-called “query replace.” This can be invoked by M-%.
set-input-method sets the current input method in Emacs. There is a TeX input method for entering many TeX symbols (says \alpha, \le, \leftarrow) as Unicode characters. There is also a Vietnamese-telex input method for entering Vietnamese characters. Very useful. Now I don’t need Vietkey when I work in Emacs.
To toggle (turn on/off) input method, use C-\. When it is off, you can use the keyboard as usual.