mogmios at mlug.missouri.edu
Wed Mar 31 07:15:09 CEST 2004
>Not if that's what I asked it to do. I have python-mode in Emacs set to use
>4-space indents and only insert SPACE characters, not TAB characters.
>Pressing the TAB key while the cursor is at the beginning of line inserts or
>deletes enough SPACEs to put the cursor at the correct indentation for the
>current line (based upon the indentation and content of the previous line).
If you tell it to do that then that's fine. But then if you can do that
then why can't you just tell the editor to handle tabs as tabs? The
whole discussion being about why tabs should be removed because some
editors are to stupid to handle them correctly, or maybe just some
programmers are to stupid to tell their editor how to handle tabs. If
you can tell the editor to not allow mixing of spaces and tabs then the
entire issue would be moot.
>not if I placed my editor in e.e. cummings mode...
That'd be rather funny. It reminds me of the time I wrote a projects
documentation in Suess-like language.
>It has nothing to do with the editors considered in isolation. By in large
>they are doing exactly what the programmers ask them to do. The problem is
>with the interchange of program files between unlike systems (via whatever
>means: email, CVS checkins, grabbing from a web page, etc) which have tools
>(editors in particular) which interpret TAB characters differently based
>upon how the programmers have configured them. To the best of my knowledge
>no systems interpret SPACE characters in weird ways, so using them to
>indicate indentation is the only foolproof solution.
I have experienced the problem of cutting and pasting from some apps
where tabs are replaced as spaces. Annoying, but still an error in those
apps and not in Python. On the rare occassion that happens I just fix
the code. I would like if Python could spit out warnings where tabs and
spaces were mixed. That'd be a handy alert in cases where I might forget
to fix a line.
I can see that the mishandling of tabs by certain apps is annoying. I
just don't see how adding Python to that list will be any less annoying.
More information about the Python-list