Enable TRAMP mode, and disable C-x C-m for execute-extended-command (it was interfering with the keystroke sequence I use to change buffer encoding).