Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] python indent acme proportional fonts ah joy

48 views
Skip to first unread message

ron minnich

unread,
Jan 4, 2007, 10:41:40 PM1/4/07
to
reminiscent of the 'free your mind Luke' discussion a few years ago on
indents in code and Acme and fonts and ...

I'm finding that I am counting spaces in acme when I get the
occasional python 'unindent' error. You may think those columns are
aligned, but that's just the proportional font showing.

Guess I gotta find a fixed font for editing in acme.

:-=)

ron

Russ Cox

unread,
Jan 5, 2007, 12:27:05 AM1/5/07
to

You can toggle a window into and out of fixed width mode
by typing Font in the tag and then executing it (middle click).

Also, as long as the lines only contain leading spaces you should see
alignment the same in the variable-width font -- the width of a space
is still constant. It is just a smaller constant in the variable-width font,
so sometimes it is hard to see whether you are looking at six spaces or seven.

Also, try acme -a. It really helps in cases like these.
It takes about a day to get used to, but then you won't go anywhere without it.

Russ

Skip Tavakkolian

unread,
Jan 5, 2007, 1:45:00 AM1/5/07
to
> I'm finding that I am counting spaces in acme when I get the
> occasional python 'unindent' error.

does python require a character in the 6th column for line
continuation? perhaps somebody could write ratpy (by analogy to
ratfor) to work around these limitations.

Bruce Ellis

unread,
Jan 5, 2007, 2:00:11 AM1/5/07
to
i certainly hope it does. otherwise they have to make up another
reason for such insanity.

brucee

Gorka guardiola

unread,
Jan 5, 2007, 5:43:27 AM1/5/07
to
¿Isn't cut & paste fun in python?, specially if you have half of the
files with code
indented with tabs and the other half with spaces like the Xen stuff did
the last time I looked into it. Invisible syntax rocks!!.

--
- curiosity sKilled the cat

Darrell Stitt

unread,
Jan 5, 2007, 5:58:58 AM1/5/07
to
mixing tabs and spaces is kind of like hitting your head against the
wall: causes unnecessary headaches.

the solution? don't do that.

You either chase semicolons and {} in C or just make the whitespace neat
in python.

Gorka guardiola wrote:
> żIsn't cut & paste fun in python?, specially if you have half of the


> files with code
> indented with tabs and the other half with spaces like the Xen stuff did
> the last time I looked into it. Invisible syntax rocks!!.
>
>
> On 1/5/07, ron minnich <rmin...@gmail.com> wrote:

Brantley Coile

unread,
Jan 5, 2007, 9:31:26 AM1/5/07
to
I use /lib/font/bit/pelm/unicode.8.font for -f and -F.

What retrograde reasoning led to abandoning free form input
to a parser.

(That's not meant to be demeaning to thee Python folks, but
what else can you call being column aware in a parser but
retrograde.)

Brantley Coile

unread,
Jan 5, 2007, 9:35:22 AM1/5/07
to
> You could edit the font file to have visible spaces & tabs.

Is this the first purposal for `dark-space.' :)

ge...@plan9.bell-labs.com

unread,
Jan 5, 2007, 12:48:24 PM1/5/07
to
I believe the intent was to force indentation to match block
structure, in reaction to badly-formatted code in other languages.

Paul Lalonde

unread,
Jan 5, 2007, 12:52:48 PM1/5/07
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It certainly is reactionary.
"Hateful in the eyes of God" is how I've come to see it.

On 5-Jan-07, at 9:44 AM, ge...@plan9.bell-labs.com wrote:

> I believe the intent was to force indentation to match block
> structure, in reaction to badly-formatted code in other languages.
>

- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFnpAypJeHo/Fbu1wRAol7AJ95r0JwEFfKK2YrJopkBk1foauVqACfVHou
ysP1fnE5OgC0gj+psET++z4=
=8dtu
- -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFnpBFpJeHo/Fbu1wRAoCLAJ9VopepIB4qQh5sFHUmn7KpCuviHwCbBE7x
Z2U/3p+lQoqzUqyXbNQi2k4=
=Qds1
-----END PGP SIGNATURE-----

Gorka guardiola

unread,
Jan 5, 2007, 12:54:53 PM1/5/07
to
On 1/5/07, ge...@plan9.bell-labs.com <ge...@plan9.bell-labs.com> wrote:
> I believe the intent was to force indentation to match block
> structure, in reaction to badly-formatted code in other languages.
>

The way to hell is paved with good intentions :-). Anyway, at least they
should have chosen tabs OR spaces. I agree in indenting right, but
syntax should be visible.

0 new messages