From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: updated emacs configuration |
Date: | 2014-01-28 21:28:51 |
Message-ID: | 20140128212851.GS20898@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 27, 2013 at 05:31:54PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)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...
Sorry I am just getting to this. I actually have an easy fix for this,
and it is a feature of entab:
$ entab -h
USAGE: entab [ -cdqst ] [file ...]
-c (clip trailing whitespace)
-d (delete tabs)
-q (protect quotes)
-s minimum_spaces
-t tab_width
-s minimum_spaces defaults to 2, and pgindent doesn't change the
default. If we change the entab call in pgindent from
$entab -t4 -qc
to
$entab -t4 -qc -s3
we will no longer place a tab in this string, "friend. Hopefully"
--
even if there is a tab stop before the 'H'. It will use a 3-space
break. Does that help? Other ideas? How about requiring 4?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-01-28 21:31:59 | Re: Suspicion of a compiler bug in clang: using ternary operator in ereport() |
Previous Message | Robert Haas | 2014-01-28 21:28:24 | Re: WIP patch (v2) for updatable security barrier views |