Emacs python mode indent levels

J

John Fouhy

Since Python has no explcit ends to blocks, emacs doesn't always know
the right indentation level to use. And <del> doesn't seem to be very
consistent (it always seems to go back 8 characters, which doesn't
help when the indent level is 4).

Another language where indentation is significant is Haskell. The
emacs Haskell mode has an excellent solution to the problem: Pushing
<tab> cycles through the various possible indentations.

Does anyone know if anything like this is possible with Python mode?
Or are there any other popular solutions?

(I am not an elipser)
 
S

Skip Montanaro

John> Another language where indentation is significant is Haskell. The
John> emacs Haskell mode has an excellent solution to the problem:
John> Pushing <tab> cycles through the various possible indentations.

John> Does anyone know if anything like this is possible with Python
John> mode? Or are there any other popular solutions?

Probably. <wink>...

Feel free to file a feature request with the python-mode project on
SourceForge. If we get to it, we get to it.

Speaking of which, if you find reviewing and responding to bug/patch reports
for Python beneath you, perhaps you'd like to hone your ELisp chops a bit:

http://sf.net/projects/python-mode

Feel free to review submissions, fix bugs, etc. Operators are standing
by...

Skip
 
J

John Lenton

Since Python has no explcit ends to blocks, emacs doesn't always know
the right indentation level to use. And <del> doesn't seem to be very
consistent (it always seems to go back 8 characters, which doesn't
help when the indent level is 4).

are you using python-mode.el? It works fine here...
Another language where indentation is significant is Haskell. The
emacs Haskell mode has an excellent solution to the problem: Pushing
<tab> cycles through the various possible indentations.

I'd say go talk to the python-mode people [1]
Does anyone know if anything like this is possible with Python mode?
Or are there any other popular solutions?

(I am not an elipser)

does that mean you don't fit ellipses [2]? :p


References:

1) http://python-mode.sf.net
2) http://groups.google.com/[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top