?

Log in

No account? Create an account
CVS commit to the 3.1 branch, including: - removal of GNOME… - LogJam [entries|archive|friends|userinfo]
LogJam

[ website | LogJam ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Jan. 22nd, 2002|11:55 pm]
LogJam
logjam
[evan]
CVS commit to the 3.1 branch, including:
- removal of GNOME dependency (GTK 2.0 does enough for me)
- removal of libhalfgnome (hopefully fixing the Solaris compile problems, too!)
- non-modal dialogs where appropriate, friends dialog now sorta works (needs a lot more time to get anywhere)
- beginning of change from tab to four spaces (!)
LinkReply

Comments:
[User Picture]From: midendian
2002-01-22 11:57 pm (UTC)

- beginning of change from tab to four spaces (!)


Boooo :)
(Reply) (Thread)
From: evan
2002-01-23 12:04 am (UTC)
It's not too late to change my mind...

It seems any reasonable editor (emacs, vi) will be able to make the 4 spaces <-> tab translation internally, and for everybody else it'll format right too.
(Reply) (Parent) (Thread)
[User Picture]From: bradfitz
2002-01-23 12:05 am (UTC)
YES!

Spaces are da bomb.
(Reply) (Parent) (Thread)
From: evan
2002-01-23 12:09 am (UTC)

(I finally figured out how to make vim smart about it.)
(Reply) (Parent) (Thread)
[User Picture]From: bradfitz
2002-01-23 12:12 am (UTC)
Remember you laughed at me when I did C-x i in emacs to insert a whole file?

You said you didn't think vim had that, or you didn't know how.

It's like, :F or something. xb95 looked it up the other day.
(Reply) (Parent) (Thread)
[User Picture]From: midendian
2002-01-23 12:22 am (UTC)

You mean ":r filename"? (or more fun, ":r!command" to insert output from a command)
(Reply) (Parent) (Thread)
From: compwiz
2002-01-23 06:23 am (UTC)
yuck.
(Reply) (Parent) (Thread)
[User Picture]From: decklin
2002-01-23 07:43 am (UTC)
I agree with mid here. Tabs are for logical indentation levels, spaces are for physically lining things up.

It's easy enough to have vim play nice with 4-space indents, but if i want to *display* them as 2 or 8 and (a) still have things look ok (b) be able to submit patches, I'm SOL. I display tabs as 4 in all "code" filetypes, so this is somewhat moot for me, but still.
(Reply) (Parent) (Thread)
[User Picture]From: midendian
2002-01-23 09:23 am (UTC)

Exactly.

(I spent days arguing with coworkers about this so that we could standardize. We finally did settle on real tabs, displayed at 4 spaces. But I always use 8 anyway because that's Right. I then spent a week reformatting about forty thousand lines of C and C++.)
(Reply) (Parent) (Thread)
From: evan
2002-01-23 12:25 pm (UTC)
perl -npi 's/ /\t/g;' *.c *.h
(Reply) (Parent) (Thread)
From: piman
2002-01-23 10:04 am (UTC)
GNU Indent was designed to stop debates like this. :P
(Reply) (Thread)
[User Picture]From: jope
2002-01-23 10:48 am (UTC)
Except that indent is an inconvenient fix in a multi-user project under CVS, because CVS regards whitespace changes as line changes and bloats the diffs. Worse, I remember having problems passing in some of standalone diff's options to "cvs diff", and I think it was the whitespace-ignoring options. Bleh. Of course, Evan's the only one committing changes, so I guess it doesn't matter much. =)
(Reply) (Parent) (Thread)
From: piman
2002-01-23 04:17 pm (UTC)
The solution, of course, is to indent it to your style when you check it out, and indent it back to some "standard" style (which can be even uglier than GNU style, since no one needs to use it) before you check it back in.
(Reply) (Parent) (Thread)
[User Picture]From: jope
2002-01-23 05:15 pm (UTC)
An inconvenient solution is not a solution. Manually keeping staight all these runs of indent would be a royal PITA for anything other than light usage, and severely prone to error.

I know CVS has commit triggers, but can it automatically do behind-the-scenes translation to/from the "standard" format for all updates/commits/diffs, _and_ keep your local workspace in your personalized format at all times? I'm not declaring authoritatively that it's not possible, just that I'd be surprised if it is. I would love a pointer to some instructions if it is indeed possible.
(Reply) (Parent) (Thread)
From: billemon
2002-01-24 02:25 pm (UTC)
Can I weigh in on the side of "tab" == "logical indent" here? I always use 4-column display tabs, but I'm happy for folks to use 8 for viewing. Having tabs means that we can all set the tab-width to what we're comfortable with. Use spaces for block comments, laying out tabular stuff etc., so it won't look weird for folks with different tab size preferences, and use tab for all code-indenting.

One day perhaps we'll get real structure-based editing tools (I believe there are such beasts, but not with much market penetration to say the least).

Of course, just like in every other field of life, it's pretty hard to get the "best" solution adopted, because the benefits are not always obvious ...

Please, stick with tabs. You can put a note in the README or a CodingStyle doc or something about preferences, but I think actual layout, documentation style and stuff like that are more important that arguing over how big the indents are.

(Reply) (Thread)