[Pythonmac-SIG] Problem with SpaceTranslationPatch
Mon, 01 Nov 1999 06:15:24 -0500
If you open a file with mixed tab and space indentation with
SpaceTranslationPatch.py installed, the patch will silently change the
indentation so that the indentation no longer works. (It does this in the
buffer, and then if you save the buffer the file is messed up too.) This
happens because some lines are indented one level with ' ' and others are
indented two levels with '\t', and it changes the ' ' lines to '\t' so
that they read the same to the interpreter.
(I posted that SpaceTranslationPatch didn't handle mixed spaces and tabs,
but I didn't think through the failure mode.)
This shows up with the recent platform.py module posted to python-announce.
I recommend you remove the patch until I have a chance to update it, so it
won't bite you. If you won't be editing any files with a different pedigree
than what you've been using the patch with, it's still harmless on those, of