Emacs has eaten my python tabs!!!

Aaron K. Johnson akjmicro at yahoo.com
Mon Jan 27 11:33:38 EST 2003


As an aside to thei whole thread, IMO the simplest, best editor out there for
any *nix platform is Joe, esp when you use the 'pico' emulation mode. Emacs is
powerful, but a bit slow and large, and I hate the interface and complexity of
vi.

Then again, I don't find code highighting, etc. crucial.Although I don't use it
if it does exis, I think it is possible to configure Joe to highlight.

If anyone is interested in using Joe/jpico, it's a simple, easy-to-use editor
editor, but with all the power you need-you can filter commands through
selected blocks for what amounts to 'macros' of sorts. I wrote an 'indent'
script (in Python, of course) for use with Joe that works beautifully on Python
code...it's parameter can be negative as well, for dedenting.

This is mostly what people need to do using Emacs anyway, right?

I strictly use tabs for whitespace, and I set the editor to make a tab worth 4
spaces in its presentation....more fits on the page(it looks better IMHO)

-Aaron.


In message <v39007j7i12ud2 at news.supernews.com>, "John Roth" wrote:
> 
> "Dennis Lee Bieber" <wlfraed at ix.netcom.com> wrote in message
> news:pm7eg-im3.ln1 at beastie.ix.netcom.com...
> > Mongryong fed this fish to the penguins on Sunday 26 January 2003
> 07:37
> > am:
> >
> > > Doesn't python rely on tabs?
> > >
> >         It relies on indentation, and a tab is considered 8 spaces --
> 
> This isn't exactly correct. There's an undocumented hack in the
> python compiler that recognizes the Emacs tab comment, among
> others, and if it finds it, sets tabs to that value. I'm not certain of
> which releases this is in, but it's been commented on a time or three.
> 
> This was, I believe, an attempt at one time to "fix" the mixed
> tab and space problem.
> 
> > the only
> > time mixed spaces and tabs works is when a tab stop is visually 8
> > spaces. If one has an editor configured with 4-space tabs and then
> > mixes lines with tabs and 4-spaces, Python sees two indentation
> levels:
> > 4 and 8 space.
> >
> >         All tabs works fine regardless of editor tab stops. All spaces
> works
> > fine. Mixed spaces and tabs is deadly.
> 
> So is the use of tabs in certain contexts; in particular any attempt
> to e-mail a python source to someone using Outlook Express. OE
> has this nasty habit of ignoring leading tabs.
> 
> John Roth
> >
 






More information about the Python-list mailing list