Emacs tip: revert-buffer will reset a buffer as if you've just opened it. Handy if you've just chmod'd a shell script: switches to sh-mode.