* [gentoo-dev] Tabs and spaces
@ 2001-10-19 10:56 Aron Griffis
2001-10-19 11:08 ` Chris Houser
2001-10-19 11:27 ` [gentoo-dev] The official answer on tabs " Daniel Robbins
0 siblings, 2 replies; 9+ messages in thread
From: Aron Griffis @ 2001-10-19 10:56 UTC (permalink / raw
To: gentoo-dev
Hello,
There is apparently a difference of opinion among Gentoo developers
concerning the use of tabs and spaces. I realize this is a topic as
dear to the hearts of developers as Gnome vs. KDE, and Vim vs. Emacs.
So I approach it with some trepidation. Nevertheless, I've been
frustrated by the current practice, so I'm going to propose my opinion
and hope that this thread won't persist long on gentoo-dev.
The current practice appears to be to set tab stops at 4 characters.
The alternative I suggest is to leave tab stops at 8 characters, but use
4-character indentation (or allow developers to choose their own
preferred indentation).
Here are my reasons:
1. 8 characters is the default tab stop for ALL mono-spaced
applications. That includes all editors, viewers, and printing
programs. To use a different tab width requires reconfiguration of
every program.
Note: You can't reconfigure "cat". And no, I don't want to alias cat
to "expand -t 4".
2. Modern editors supply users with the ability to use an indentation
that differs from the current tabstop setting, in case you want to
use something other than 8 characters. For example, Vi has the
"shiftwidth" setting. Vim offers the "smarttab" setting, which makes
things even more comfortable.
I am certain that Emacs offers similar settings, though as a Vi(m)
user, I can't cite them.
3. If you use this method, then your ebuilds/code will always look
right, regardless of what method you use to view them. You can edit
an ebuild by any developer, and you don't have to wonder... "Did they
use spaces instead of tabs? Did they mix them? What was their
intended tabstop (which can drastically affect the appearance of text
tables)?" Instead, it JUST WORKS.
I'm not trying to settle on an indentation scheme here. Sure, that
might provide even more comfort and consistency in the ebuilds, but it
infringes on the developer's personal preferences more than I would
wish. I simply would like tab characters to be the standard 8 so that
editing/viewing/printing programs can work without needing to tweak each
one.
What do you think?
Thanks,
Aron
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Tabs and spaces
2001-10-19 10:56 [gentoo-dev] Tabs and spaces Aron Griffis
@ 2001-10-19 11:08 ` Chris Houser
2001-10-19 11:35 ` Aron Griffis
2001-10-19 11:27 ` [gentoo-dev] The official answer on tabs " Daniel Robbins
1 sibling, 1 reply; 9+ messages in thread
From: Chris Houser @ 2001-10-19 11:08 UTC (permalink / raw
To: gentoo-dev
Aron Griffis wrote: [Fri Oct 19 2001, 12:55:12PM EDT]
> What do you think?
I think you should be ashamed for bringing it up. ;-)
I disagree with your suggestion in this context, regardless of how much
I may agree with it in other contexts. I think there is no clear-cut
'correct' answer to this question that everyone can agree is the best
possible answer, at least that has been my experience on every other
project where this has come up.
Therefore, I think we should defer to the ebuilds as they currently
exist, and to the original and well-documented wishes of the Progenitor
of Gentoo Linux and use nothing but tabs for indenting. If you want
things to look right, set up your editor to have 4-space tab stops.
In other words, let's all suck it up. :-) Let's get back to work on the
software itself, and to spend as little time as possible discussing this
issue with the whole community of Gentoo developers.
--Chouser
PS. Yes, I'm a little embarrassed that I just spent 5 minutes writing
this. I promise I won't do it again.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-dev] The official answer on tabs and spaces
2001-10-19 10:56 [gentoo-dev] Tabs and spaces Aron Griffis
2001-10-19 11:08 ` Chris Houser
@ 2001-10-19 11:27 ` Daniel Robbins
2001-10-19 12:24 ` Aron Griffis
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Daniel Robbins @ 2001-10-19 11:27 UTC (permalink / raw
To: gentoo-dev
On Fri, Oct 19, 2001 at 11:55:12AM -0500, Aron Griffis wrote:
> Hello,
>
> There is apparently a difference of opinion among Gentoo developers
> concerning the use of tabs and spaces. I realize this is a topic as
> dear to the hearts of developers as Gnome vs. KDE, and Vim vs. Emacs.
> So I approach it with some trepidation. Nevertheless, I've been
> frustrated by the current practice, so I'm going to propose my opinion
> and hope that this thread won't persist long on gentoo-dev.
The correct, official way is to use a single tab per indent. Tabs should not
be converted to spaces, and multiple spaces should not be used in place of
tabs. This way, people can use any tabstop they like and everything still
is correctly indented.
*All developers now need to adhere by these guidelines; many haven't in the
past*
Best Regards,
--
Daniel Robbins <drobbins@gentoo.org>
Chief Architect/President http://www.gentoo.org
Gentoo Technologies, Inc.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Tabs and spaces
2001-10-19 11:08 ` Chris Houser
@ 2001-10-19 11:35 ` Aron Griffis
2001-10-19 11:58 ` Chris Houser
0 siblings, 1 reply; 9+ messages in thread
From: Aron Griffis @ 2001-10-19 11:35 UTC (permalink / raw
To: gentoo-dev
Chouser wrote: [Fri Oct 19 2001, 12:06:59PM EST]
> I think you should be ashamed for bringing it up. ;-)
Well, I am. (Ashamed, that is.) :-|
> Therefore, I think we should defer to the ebuilds as they currently
> exist, and to the original and well-documented wishes of the Progenitor
> of Gentoo Linux and use nothing but tabs for indenting.
Actually, I didn't realize that was the case. If 4-char tabs are
Daniel's preferred method of indenting, then so be it. Mind pointing me
to that doc?
Thanks,
Aron
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Tabs and spaces
2001-10-19 11:35 ` Aron Griffis
@ 2001-10-19 11:58 ` Chris Houser
0 siblings, 0 replies; 9+ messages in thread
From: Chris Houser @ 2001-10-19 11:58 UTC (permalink / raw
To: gentoo-dev
Aron Griffis wrote: [Fri Oct 19 2001, 1:19:40PM EDT]
> Chouser wrote: [Fri Oct 19 2001, 12:06:59PM EST]
> > Therefore, I think we should defer to the ebuilds as they currently
> > exist, and to the original and well-documented wishes of the Progenitor
> > of Gentoo Linux and use nothing but tabs for indenting.
>
> Actually, I didn't realize that was the case. If 4-char tabs are
> Daniel's preferred method of indenting, then so be it. Mind pointing me
> to that doc?
Yeah, sorry. The 'documentation' I was referring to is in the Gentoo
Development How-to (http://gentoo.org/doc/gentoo-howto.html) under
"Rules for writing an ebuild File", about 1/3 of the way down the page.
Not exactly emblazoned on a billboard or anything, so don't feel too
bad. ;-)
--Chris
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] The official answer on tabs and spaces
2001-10-19 11:27 ` [gentoo-dev] The official answer on tabs " Daniel Robbins
@ 2001-10-19 12:24 ` Aron Griffis
2001-10-19 18:26 ` Karl Trygve Kalleberg
2001-10-22 4:52 ` Djamil ESSAISSI
2 siblings, 0 replies; 9+ messages in thread
From: Aron Griffis @ 2001-10-19 12:24 UTC (permalink / raw
To: gentoo-dev
Daniel Robbins wrote: [Fri Oct 19 2001, 12:26:30PM EST]
> The correct, official way is to use a single tab per indent. Tabs
> should not be converted to spaces, and multiple spaces should not be
> used in place of tabs. This way, people can use any tabstop they like
> and everything still is correctly indented.
Thanks Daniel. Sorry I wasn't aware that you had an official policy.
In support of this, here's something Vim users can put in their .vimrc
to make sure it's done correctly for ebuilds. Of course, you can use
whatever value you like in place of 4.
augroup gentoo
au!
au BufRead *.ebuild set tabstop=4 shiftwidth=4 noexpandtab
augroup END
Alternatively, you could do the following, which would affect not only
ebuilds but anything you would edit that pertains to Gentoo.
if (getcwd() =~ 'gentoo-x86\|gentoo-src\|portage')
set tabstop=4 shiftwidth=4 noexpandtab
endif
Aron
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] The official answer on tabs and spaces
2001-10-19 11:27 ` [gentoo-dev] The official answer on tabs " Daniel Robbins
2001-10-19 12:24 ` Aron Griffis
@ 2001-10-19 18:26 ` Karl Trygve Kalleberg
2001-10-22 4:52 ` Djamil ESSAISSI
2 siblings, 0 replies; 9+ messages in thread
From: Karl Trygve Kalleberg @ 2001-10-19 18:26 UTC (permalink / raw
To: gentoo-dev
On Fri, Oct 19, 2001 at 11:26:30AM -0600, Daniel Robbins wrote:
> The correct, official way is to use a single tab per indent. Tabs should not
> be converted to spaces, and multiple spaces should not be used in place of
> tabs. This way, people can use any tabstop they like and everything still
> is correctly indented.
>
> *All developers now need to adhere by these guidelines; many haven't in the
> past*
I will hack up a normalize script that everybody of a different religion
can run on their ebuilds before checking in ;)
Should also be nice to have when working through the existing ebuild-base.
regards,
Karl "Hackmeister-ohne-zeit" T
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] The official answer on tabs and spaces
2001-10-19 11:27 ` [gentoo-dev] The official answer on tabs " Daniel Robbins
2001-10-19 12:24 ` Aron Griffis
2001-10-19 18:26 ` Karl Trygve Kalleberg
@ 2001-10-22 4:52 ` Djamil ESSAISSI
2001-10-22 5:17 ` Mikael Hallendal
2 siblings, 1 reply; 9+ messages in thread
From: Djamil ESSAISSI @ 2001-10-22 4:52 UTC (permalink / raw
To: gentoo-dev
:)The correct, official way is to use a single tab per indent. Tabs
:)should not
:)be converted to spaces, and multiple spaces should not be used in place
:)of
:)tabs. This way, people can use any tabstop they like and everything
:)still
:)is correctly indented.
i was just trying to make a sentence saying the same thing.
Djamil
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] The official answer on tabs and spaces
2001-10-22 4:52 ` Djamil ESSAISSI
@ 2001-10-22 5:17 ` Mikael Hallendal
0 siblings, 0 replies; 9+ messages in thread
From: Mikael Hallendal @ 2001-10-22 5:17 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 815 bytes --]
mån 2001-10-22 klockan 13.01 skrev Djamil ESSAISSI:
> :)The correct, official way is to use a single tab per indent. Tabs
> :)should not
> :)be converted to spaces, and multiple spaces should not be used in place
> :)of
> :)tabs. This way, people can use any tabstop they like and everything
> :)still
> :)is correctly indented.
>
> i was just trying to make a sentence saying the same thing.
Almost anyway, there are situation when this is not true though. For
example I think that all ebuilds should be readable without linewrapping
in 80 chars width.
If someone makes this look ok with 4 chars tabs that might not be true
for me with 8 chars tabs.
Regards,
Mikael Hallendal
--
Mikael Hallendal
Gentoo Linux Developer, Desktop Team Leader
CodeFactory AB, Stockholm, Sweden
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-10-22 11:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-19 10:56 [gentoo-dev] Tabs and spaces Aron Griffis
2001-10-19 11:08 ` Chris Houser
2001-10-19 11:35 ` Aron Griffis
2001-10-19 11:58 ` Chris Houser
2001-10-19 11:27 ` [gentoo-dev] The official answer on tabs " Daniel Robbins
2001-10-19 12:24 ` Aron Griffis
2001-10-19 18:26 ` Karl Trygve Kalleberg
2001-10-22 4:52 ` Djamil ESSAISSI
2001-10-22 5:17 ` Mikael Hallendal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox