Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLzK6-00071W-Lo for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jun 2017 22:02:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dLzK6-0005mV-5c for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jun 2017 22:02:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLzK4-0005lG-S0 for pgsql-hackers@postgresql.org; Fri, 16 Jun 2017 22:02:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLzK0-0000Lh-U9 for pgsql-hackers@postgresql.org; Fri, 16 Jun 2017 22:02:32 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v5GM2GkZ012518; Fri, 16 Jun 2017 18:02:16 -0400 From: Tom Lane To: Piotr Stefaniak cc: Bruce Momjian , Andres Freund , Peter Eisentraut , Alvaro Herrera , Robert Haas , "Stephen Frost" , "pgsql-hackers@postgresql.org" Subject: Re: Preliminary results for proposed new pgindent implementation In-reply-to: References: <20170519173111.zp6igkcg53egdy4s@alvherre.pgsql> <29275.1497624664@sss.pgh.pa.us> <8827.1497633050@sss.pgh.pa.us> <20170616171946.qqy5tapovsamkxyg@alap3.anarazel.de> <9900.1497634441@sss.pgh.pa.us> <20170616180534.cdpduuq5a4twxuru@alap3.anarazel.de> <12302.1497637380@sss.pgh.pa.us> <20170616184238.GA5081@momjian.us> <20170616185406.jpwq6o6ghpvprxmi@alap3.anarazel.de> <20170616190441.GB5081@momjian.us> <29590.1497643007@sss.pgh.pa.us> Comments: In-reply-to Piotr Stefaniak message dated "Fri, 16 Jun 2017 20:30:21 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12516.1497650535.1@sss.pgh.pa.us> Date: Fri, 16 Jun 2017 18:02:15 -0400 Message-ID: <12517.1497650535@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Piotr Stefaniak writes: > On 2017-06-16 21:56, Tom Lane wrote: >> Unless Piotr objects, I propose to add another switch to bsdindent >> that selects this behavior, and then we can drop entab, removing >> another impediment to getting pgindent working. > I understand the reasoning, but this is a very specific need and I think > not at all universal for anyone else in the future. One of the bugs > listed in indent's manpage is that it "has more switches than ls(1)". So > currently I'm against pushing an option for the above upstream, to the > FreeBSD repository. > Why not add this to the already non-empty list of custom patches? Umm ... I thought the idea was to get to the point where the list of custom patches *is* empty. Except for carrying our own Makefile of course. I'd be sad if we needed a fork just for this. What I'm testing with right now has just four differences from your repo: 1. This workaround for what I believe you agree is a bug: - ps.in_decl = ps.decl_on_line = ps.last_token != type_def; + ps.in_decl = ps.decl_on_line = true; 2. The long-lines adjustment I just sent you a patch for. 3. The tab-vs-space difference under discussion here. 4. A temporary hack affecting the indentation of comments on the same line (forcing them to a multiple of 8 spaces even though tabsize is 4). I have every intention of dropping that one later; I just don't want to deal with comment reindentation at the same time as these other things. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers