On Thu, Jun 27, 2013 at 05:31:54PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Noah Misch wrote:
> >> Note that emacs and pgindent remain at odds over interior tabs in comments.
> >> When pgindent finds a double-space (typically after a sentence) ending at a
> >> tab stop, it replaces the double-space with a tab. c-fill-paragraph will
> >> convert that tab to a *single* space, and that can be enough to change many
> >> line break positions.
>
> > We should really stop pgindent from converting those double-spaces to
> > tabs. Those tabs are later changed to three or four spaces when wording
> > of the comment is changed, and things start looking very odd.
>
> +1. That's probably the single most annoying bit of behavior in pgindent.
> Being a two-spaces-after-a-period kind of guy, it might bite me more
> often than other people, but now that somebody else has brought it up...
That might be caused by entab, actually. I think there are two cases
here:
* six-space indented line
* two spaces in text that happen to land on a tab stop
entab doesn't distinguish them, but it certainly could. In fact, it
already has an option for that:
-s Minimum spaces needed to replace with a tab (default = 2).
Should we be using entab -s 3? That would make a six-space indent be a
tab and two spaces, but it would certainly handle the period-space-space
case. I actually don't remember people complaining about this.
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://enterprisedb.com
+ It's impossible for everything to be true. +