public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] About how many spaces a tab represents
@ 2013-04-14 21:22 Pacho Ramos
  2013-04-14 21:25 ` Ciaran McCreesh
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Pacho Ramos @ 2013-04-14 21:22 UTC (permalink / raw
  To: gentoo-dev

I noticed this problem now that joe was modified to comply with this
rule set in devmanual:
http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace

It stated a tab represents 4 spaces. Where does this rule come from? Why
8 spaces wasn't chosen instead? I say that because looks like 8 spaces
equivalence is used by tools like "cat", "less", even CVS reports in
gentoo-commits show tabs as 8 spaces instead of 4. 

Thanks for the info



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] About how many spaces a tab represents
  2013-04-14 21:22 [gentoo-dev] About how many spaces a tab represents Pacho Ramos
@ 2013-04-14 21:25 ` Ciaran McCreesh
  2013-04-14 22:04   ` Ulrich Mueller
  2013-04-15  5:21 ` Michał Górny
  2013-04-17 18:26 ` Mike Frysinger
  2 siblings, 1 reply; 9+ messages in thread
From: Ciaran McCreesh @ 2013-04-14 21:25 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

On Sun, 14 Apr 2013 23:22:04 +0200
Pacho Ramos <pacho@gentoo.org> wrote:
> I noticed this problem now that joe was modified to comply with this
> rule set in devmanual:
> http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace
> 
> It stated a tab represents 4 spaces. Where does this rule come from?
> Why 8 spaces wasn't chosen instead? I say that because looks like 8
> spaces equivalence is used by tools like "cat", "less", even CVS
> reports in gentoo-commits show tabs as 8 spaces instead of 4. 

Hysterical raisins. Unfortunately drobbins mandated it that way early
on, because he didn't use a proper text editor.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] About how many spaces a tab represents
  2013-04-14 21:25 ` Ciaran McCreesh
@ 2013-04-14 22:04   ` Ulrich Mueller
  0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller @ 2013-04-14 22:04 UTC (permalink / raw
  To: gentoo-dev

>>>>> On Sun, 14 Apr 2013, Ciaran McCreesh wrote:

> On Sun, 14 Apr 2013 23:22:04 +0200
> Pacho Ramos <pacho@gentoo.org> wrote:
>> It stated a tab represents 4 spaces. Where does this rule come from?
>> Why 8 spaces wasn't chosen instead? I say that because looks like 8
>> spaces equivalence is used by tools like "cat", "less", even CVS
>> reports in gentoo-commits show tabs as 8 spaces instead of 4. 

> Hysterical raisins. Unfortunately drobbins mandated it that way early
> on, because he didn't use a proper text editor.

AFAIK, there's no standard that specifies the positions of tab stops,
so multiples of 4 are as good as anything else. Different text editors
have different defaults (Emacs uses multiples of 8, but it's easy to
change).

Of course, once you have a convention that is widely followed, it's
wise not to change it ...

Ulrich


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] About how many spaces a tab represents
  2013-04-14 21:22 [gentoo-dev] About how many spaces a tab represents Pacho Ramos
  2013-04-14 21:25 ` Ciaran McCreesh
@ 2013-04-15  5:21 ` Michał Górny
  2013-04-15  6:15   ` Pacho Ramos
  2013-04-17 18:26 ` Mike Frysinger
  2 siblings, 1 reply; 9+ messages in thread
From: Michał Górny @ 2013-04-15  5:21 UTC (permalink / raw
  To: gentoo-dev; +Cc: pacho

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

On Sun, 14 Apr 2013 23:22:04 +0200
Pacho Ramos <pacho@gentoo.org> wrote:

> I noticed this problem now that joe was modified to comply with this
> rule set in devmanual:
> http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace
> 
> It stated a tab represents 4 spaces. Where does this rule come from? Why
> 8 spaces wasn't chosen instead? I say that because looks like 8 spaces
> equivalence is used by tools like "cat", "less", even CVS reports in
> gentoo-commits show tabs as 8 spaces instead of 4. 

Hmm, does that have implications on anything else but counting line
width?

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] About how many spaces a tab represents
  2013-04-15  5:21 ` Michał Górny
@ 2013-04-15  6:15   ` Pacho Ramos
  2013-04-15 11:10     ` Aaron W. Swenson
  0 siblings, 1 reply; 9+ messages in thread
From: Pacho Ramos @ 2013-04-15  6:15 UTC (permalink / raw
  To: gentoo-dev

El lun, 15-04-2013 a las 07:21 +0200, Michał Górny escribió:
> On Sun, 14 Apr 2013 23:22:04 +0200
> Pacho Ramos <pacho@gentoo.org> wrote:
> 
> > I noticed this problem now that joe was modified to comply with this
> > rule set in devmanual:
> > http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace
> > 
> > It stated a tab represents 4 spaces. Where does this rule come from? Why
> > 8 spaces wasn't chosen instead? I say that because looks like 8 spaces
> > equivalence is used by tools like "cat", "less", even CVS reports in
> > gentoo-commits show tabs as 8 spaces instead of 4. 
> 
> Hmm, does that have implications on anything else but counting line
> width?
> 

Well, I was a bit surprised an ebuild I was thinking was looking in a
way, was really shown a bit different when, for example, simply running
less over it :/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] About how many spaces a tab represents
  2013-04-15  6:15   ` Pacho Ramos
@ 2013-04-15 11:10     ` Aaron W. Swenson
  2013-04-15 19:06       ` Alec Warner
  2013-04-15 20:05       ` Andreas K. Huettel
  0 siblings, 2 replies; 9+ messages in thread
From: Aaron W. Swenson @ 2013-04-15 11:10 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]

On Mon, Apr 15, 2013 at 08:15:08AM +0200, Pacho Ramos wrote:
> El lun, 15-04-2013 a las 07:21 +0200, Michał Górny escribió:
> > On Sun, 14 Apr 2013 23:22:04 +0200
> > Pacho Ramos <pacho@gentoo.org> wrote:
> > 
> > > I noticed this problem now that joe was modified to comply with this
> > > rule set in devmanual:
> > > http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace
> > > 
> > > It stated a tab represents 4 spaces. Where does this rule come from? Why
> > > 8 spaces wasn't chosen instead? I say that because looks like 8 spaces
> > > equivalence is used by tools like "cat", "less", even CVS reports in
> > > gentoo-commits show tabs as 8 spaces instead of 4. 
> > 
> > Hmm, does that have implications on anything else but counting line
> > width?
> > 
> 
> Well, I was a bit surprised an ebuild I was thinking was looking in a
> way, was really shown a bit different when, for example, simply running
> less over it :/
> 

A tab is a tab. How wide it is, is up to you. The convention is that
four spaces should be replace by a tab. You can configure tab width
for your terminal with:

    setterm -regtabs 4

If you want to, that is.

-- 
Mr. Aaron W. Swenson
Gentoo Linux Developer
Email : titanofold@gentoo.org
GnuPG FP : 2C00 7719 4F85 FB07 A49C 0E31 5713 AA03 D1BB FDA0
GnuPG ID : D1BBFDA0

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] About how many spaces a tab represents
  2013-04-15 11:10     ` Aaron W. Swenson
@ 2013-04-15 19:06       ` Alec Warner
  2013-04-15 20:05       ` Andreas K. Huettel
  1 sibling, 0 replies; 9+ messages in thread
From: Alec Warner @ 2013-04-15 19:06 UTC (permalink / raw
  To: Gentoo Dev

[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]

How many avocados does a tab represent?

-A


On Mon, Apr 15, 2013 at 4:10 AM, Aaron W. Swenson <titanofold@gentoo.org>wrote:

> On Mon, Apr 15, 2013 at 08:15:08AM +0200, Pacho Ramos wrote:
> > El lun, 15-04-2013 a las 07:21 +0200, Michał Górny escribió:
> > > On Sun, 14 Apr 2013 23:22:04 +0200
> > > Pacho Ramos <pacho@gentoo.org> wrote:
> > >
> > > > I noticed this problem now that joe was modified to comply with this
> > > > rule set in devmanual:
> > > >
> http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace
> > > >
> > > > It stated a tab represents 4 spaces. Where does this rule come from?
> Why
> > > > 8 spaces wasn't chosen instead? I say that because looks like 8
> spaces
> > > > equivalence is used by tools like "cat", "less", even CVS reports in
> > > > gentoo-commits show tabs as 8 spaces instead of 4.
> > >
> > > Hmm, does that have implications on anything else but counting line
> > > width?
> > >
> >
> > Well, I was a bit surprised an ebuild I was thinking was looking in a
> > way, was really shown a bit different when, for example, simply running
> > less over it :/
> >
>
> A tab is a tab. How wide it is, is up to you. The convention is that
> four spaces should be replace by a tab. You can configure tab width
> for your terminal with:
>
>     setterm -regtabs 4
>
> If you want to, that is.
>
> --
> Mr. Aaron W. Swenson
> Gentoo Linux Developer
> Email : titanofold@gentoo.org
> GnuPG FP : 2C00 7719 4F85 FB07 A49C 0E31 5713 AA03 D1BB FDA0
> GnuPG ID : D1BBFDA0
>

[-- Attachment #2: Type: text/html, Size: 2456 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] About how many spaces a tab represents
  2013-04-15 11:10     ` Aaron W. Swenson
  2013-04-15 19:06       ` Alec Warner
@ 2013-04-15 20:05       ` Andreas K. Huettel
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas K. Huettel @ 2013-04-15 20:05 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 431 bytes --]

Am Montag, 15. April 2013, 13:10:48 schrieb Aaron W. Swenson:
> 
> A tab is a tab. How wide it is, is up to you. The convention is that
> four spaces should be replace by a tab. You can configure tab width
> for your terminal with:
> 
>     setterm -regtabs 4
> 
> If you want to, that is.

I suggest 1/100 furlong.

-- 

Andreas K. Huettel
Gentoo Linux developer 
dilfridge@gentoo.org
http://www.akhuettel.de/


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] About how many spaces a tab represents
  2013-04-14 21:22 [gentoo-dev] About how many spaces a tab represents Pacho Ramos
  2013-04-14 21:25 ` Ciaran McCreesh
  2013-04-15  5:21 ` Michał Górny
@ 2013-04-17 18:26 ` Mike Frysinger
  2 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2013-04-17 18:26 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 566 bytes --]

On Sunday 14 April 2013 17:22:04 Pacho Ramos wrote:
> I noticed this problem now that joe was modified to comply with this
> rule set in devmanual:
> http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting
> -and-whitespace
> 
> It stated a tab represents 4 spaces. Where does this rule come from? Why
> 8 spaces wasn't chosen instead? I say that because looks like 8 spaces
> equivalence is used by tools like "cat", "less", even CVS reports in
> gentoo-commits show tabs as 8 spaces instead of 4.

add --tabs=4 to your $LESS
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-04-17 18:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-14 21:22 [gentoo-dev] About how many spaces a tab represents Pacho Ramos
2013-04-14 21:25 ` Ciaran McCreesh
2013-04-14 22:04   ` Ulrich Mueller
2013-04-15  5:21 ` Michał Górny
2013-04-15  6:15   ` Pacho Ramos
2013-04-15 11:10     ` Aaron W. Swenson
2013-04-15 19:06       ` Alec Warner
2013-04-15 20:05       ` Andreas K. Huettel
2013-04-17 18:26 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox