I recently switched to typing on Dvorak layout. But after some time, I decided to use Dvorak only in Emacs - so all other key bindings on my system would not be screwed.
So, I took the following from some question on StackOverflow.com:
(defadvice switch-to-buffer (after activate-input-method activate)
(activate-input-method "english-dvorak"))
It switches the input method in all new buffers to dvorak. It works fine, but the there is the problem - the scratch buffer keeps it's default english layout, and all file choosing "dialogs" (C-x C-f) also keep it - which is kinda annoying, because it requires me to switch "typing mindsets" several times a minute.
Is there a way to enable the dvorak layout globally in emacs - and still keep the default shortcuts (like that C-x on default english)?
EDIT:
The answer to my problems:
(defadvice switch-to-buffer (after activate-input-method activate)
(activate-input-method "english-dvorak"))
(add-hook 'minibuffer-setup-hook (lambda () (set-input-method "english-dvorak")))