tab stop in README

Started by Nonameover 14 years ago6 messages
#1Noname
yamt@mwd.biglobe.ne.jp

hi,

i know that postgresql uses ts=4 for C source code.
but how about documatation?

src/backend/access/transam/README seems to have both of
ts=4 and ts=8 mixed.

YAMAMOTO Takashi

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Noname (#1)
Re: tab stop in README

On mån, 2011-08-22 at 04:09 +0000, YAMAMOTO Takashi wrote:

i know that postgresql uses ts=4 for C source code.
but how about documatation?

I'd say ideally don't use any tabs at all.

src/backend/access/transam/README seems to have both of
ts=4 and ts=8 mixed.

It appears to be geared for ts=4. Could you send a patch or other
indication for what you think needs changing?

#3Noname
yamt@mwd.biglobe.ne.jp
In reply to: Peter Eisentraut (#2)
1 attachment(s)
Re: tab stop in README

hi,

On men, 2011-08-22 at 04:09 +0000, YAMAMOTO Takashi wrote:

i know that postgresql uses ts=4 for C source code.
but how about documatation?

I'd say ideally don't use any tabs at all.

i agree.

src/backend/access/transam/README seems to have both of
ts=4 and ts=8 mixed.

It appears to be geared for ts=4. Could you send a patch or other
indication for what you think needs changing?

attached.

YAMAMOTO Takashi

Show quoted text

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

ts4.difftext/plain; charset=us-asciiDownload
diff --git a/src/backend/access/transam/README b/src/backend/access/transam/README
index eaac139..e866d9e 100644
--- a/src/backend/access/transam/README
+++ b/src/backend/access/transam/README
@@ -61,23 +61,23 @@ sequence:
 
 	 /	StartTransactionCommand;
 	/		StartTransaction;
-1) <		ProcessUtility;				<< BEGIN
+1) <	ProcessUtility;				<< BEGIN
 	\		BeginTransactionBlock;
 	 \	CommitTransactionCommand;
 
 	/	StartTransactionCommand;
-2) /		ProcessQuery;				<< SELECT ...
-   \		CommitTransactionCommand;
+2) /	ProcessQuery;				<< SELECT ...
+   \	CommitTransactionCommand;
 	\		CommandCounterIncrement;
 
 	/	StartTransactionCommand;
-3) /		ProcessQuery;				<< INSERT ...
-   \		CommitTransactionCommand;
+3) /	ProcessQuery;				<< INSERT ...
+   \	CommitTransactionCommand;
 	\		CommandCounterIncrement;
 
 	 /	StartTransactionCommand;
 	/	ProcessUtility;				<< COMMIT
-4) <			EndTransactionBlock;
+4) <		EndTransactionBlock;
 	\	CommitTransactionCommand;
 	 \		CommitTransaction;
 
@@ -100,9 +100,9 @@ Transaction aborts can occur in two ways:
 The reason we have to distinguish them is illustrated by the following two
 situations:
 
-	case 1					case 2
-	------					------
-1) user types BEGIN			1) user types BEGIN
+	case 1						case 2
+	------						------
+1) user types BEGIN				1) user types BEGIN
 2) user does something			2) user does something
 3) user does not like what		3) system aborts for some reason
    she sees and types ABORT		   (syntax error, etc)
#4Robert Haas
robertmhaas@gmail.com
In reply to: Noname (#3)
Re: tab stop in README

On Sun, Aug 28, 2011 at 8:28 PM, YAMAMOTO Takashi
<yamt@mwd.biglobe.ne.jp> wrote:

On men, 2011-08-22 at 04:09 +0000, YAMAMOTO Takashi wrote:

i know that postgresql uses ts=4 for C source code.
but how about documatation?

I'd say ideally don't use any tabs at all.

i agree.

It appears to be geared for ts=4.  Could you send a patch or other
indication for what you think needs changing?

attached.

I'm confused by this patch, because it doesn't seem to get rid of all
the tabs in the file. Nor does it seem to replace tabs with spaces.
It looks like it's just randomly removing and adding tabs in various
places.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#5Noname
yamt@mwd.biglobe.ne.jp
In reply to: Robert Haas (#4)
Re: tab stop in README

On Sun, Aug 28, 2011 at 8:28 PM, YAMAMOTO Takashi
<yamt@mwd.biglobe.ne.jp> wrote:

On men, 2011-08-22 at 04:09 +0000, YAMAMOTO Takashi wrote:

i know that postgresql uses ts=4 for C source code.
but how about documatation?

I'd say ideally don't use any tabs at all.

i agree.

It appears to be geared for ts=4. Could you send a patch or other
indication for what you think needs changing?

attached.

I'm confused by this patch, because it doesn't seem to get rid of all
the tabs in the file. Nor does it seem to replace tabs with spaces.
It looks like it's just randomly removing and adding tabs in various
places.

the patch just fixes indent for ts=4, keep using tabs.

should i run "expand -t4" and send the result?

YAMAMOTO Takashi

Show quoted text

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#6Robert Haas
robertmhaas@gmail.com
In reply to: Noname (#5)
Re: tab stop in README

On Mon, Aug 29, 2011 at 8:44 PM, YAMAMOTO Takashi
<yamt@mwd.biglobe.ne.jp> wrote:

On Sun, Aug 28, 2011 at 8:28 PM, YAMAMOTO Takashi
<yamt@mwd.biglobe.ne.jp> wrote:

On men, 2011-08-22 at 04:09 +0000, YAMAMOTO Takashi wrote:

i know that postgresql uses ts=4 for C source code.
but how about documatation?

I'd say ideally don't use any tabs at all.

i agree.

It appears to be geared for ts=4.  Could you send a patch or other
indication for what you think needs changing?

attached.

I'm confused by this patch, because it doesn't seem to get rid of all
the tabs in the file.  Nor does it seem to replace tabs with spaces.
It looks like it's just randomly removing and adding tabs in various
places.

the patch just fixes indent for ts=4, keep using tabs.

I've applied what I believe to be an appropriate fix. I expanded the
tabs in the ASCII art but left the code examples alone.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company