[rfc-i] tabs [was: sourcecode indentation]
Brian E Carpenter
brian.e.carpenter at gmail.com
Sun Feb 14 17:12:32 PST 2016
On 15/02/2016 11:34, HANSEN, TONY L wrote:
> On 2/14/16, 5:07 PM, "Brian E Carpenter" <brian.e.carpenter at gmail.com> wrote:
>> On 15/02/2016 08:53, HANSEN, TONY L wrote:
>>> On 2/13/16, 5:00 PM, "rfc-interest on behalf of Paul Kyzivat" <rfc-interest-bounces at rfc-editor.org on behalf of pkyzivat at alum.mit.edu> wrote:
>>>> But what does negative indent do if there are tabs at the beginning of
>>>> the text?
>>> This question is broader than indent and outdent, as we don't currently allow tabs anywhere in the XML source.
>> Which seems to me to be the only safe choice, since what a tab means other
>> than some unspecified amount of whitespace is unknowable.
> I actually mis-spoke earlier. Tabs are not allowed anywhere within figures and source code. Elsewhere within the XML, tabs have always been considered fine (unless a change got slipped in that I missed).
Fair enough - because elsewhere in XML, all whitespace is equivalent anyway.
> If there were demand for tab to be allowed within figures and source code, the obvious choice is to let the user specify what that amount of whitespace was.
> I note that python allows tabs (and assumes it's equal to 8 spaces when used), but a number of Python style guides recommend only allowing spaces.
The Python rule is "Note that each line within a basic block must be indented by the same amount."
The style guide recommends 4 spaces and doesn't like tabs.
> Makefiles insist on tab characters.
> The XML files I send to xml2rfc today often have a mixture of tabs and spaces, because that's what my editor generates on indenting and re-indenting. It's only within figures and now source code blocks that tabs become troublesome.
> Tony Hansen
> rfc-interest mailing list
> rfc-interest at rfc-editor.org
More information about the rfc-interest