I work on an open source project where the creator sets his tab-indents to 2 spaces.
I\'d like to just enable it on the fly for the one file I work on and not other fil
Create a file ".dir-locals.el" in the project's directory and fill it like this:
((nil . ((tab-width . 2))))
This will take care of setting tab-width automatically and you don't have to modify the actual file (which is likely version-controlled.)
See the manual for more information about the format. I believe this requires Emacs 23.