python.el all of a sudden started acting weird... putting in "real" TABs, and not positioning the cursor properly, so I decided maybe I should finally get off my duff and switch to python-mode.el -- so it doesn't put in "real" TABs, but it also was sometimes not positioning the cursor properly :(

I finally figured out the cause, but not a cure... I had a large block comment string and above that python-mode works, below it does not.

Now in trying to reproduce this to report it, I tried a smaller case, but it works!

"""
A big block comment like this doesn't seem to throw off the indentation
"""


The sad part, then, is that the effect is string content dependent! Maybe it has something to do with single quote stuff inside triple quote stuff? Well, maybe. I had 2.5 such.

So here is a minimal test case:


"""
"
"""

def foo( bar ):
_ # cursor stays at left margin instead of indenting.


Is this something that is fixable? I didn't try triple single quotes containing unbalanced single quotes or mixing the type of quotes, but those are things that should be tested too, given this failure.

It really shouldn't matter what is inside the triple quotes. Before I figured out what the problem was related to, I experienced some bizarre behavior with python.el (but not with python-mode.el, but I don't know what triggered it, to try again), where with the unbalanced strings, it was displaying some code as code, but then after point somewhere (next line) was displaying a block in brown as if it were a string. I thought I had accidentally hit a key I didn't know what it did and changed some setting in python.el that I didn't know about (which is most of them).... it was probably related to this issue, however.

And, sorry, I don't know yet how to search for preexisting problems and reported bugs yet, or where to report them, but I found this list and joined it, thinking I'd be asking for help changing configuration settings from "goofy" to "normal", but in making a test case to report, came to a better understanding of the bug, enough to think it is one.

Glenn




_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to