{"thread":{"id":"31559","subject":"[PATCH] Documentation: indent-with-non-tab uses tabwidth setting, not just 8","startedAt":"2012-09-16T17:12:28Z","lastAt":"2012-09-17T17:23:08Z","messageCount":7,"participants":["Wesley J. Landaker","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"199174","messageId":"1347815548-19305-1-git-send-email-wjl@icecavern.net","threadId":"31559","inReplyTo":null,"subject":"[PATCH] Documentation: indent-with-non-tab uses tabwidth setting, not just 8","fromName":"Wesley J. Landaker","fromEmail":"wjl@icecavern.net","sentAt":"2012-09-16T17:12:28Z","receivedAt":"2012-09-16T17:12:28Z","isPatch":true,"sender":{"key":"wjl@icecavern.net","avatar":"https://avatars.githubusercontent.com/u/67229?v=4"},"body":"From: \"Wesley J. Landaker\" <wjl@icecavern.net>\n\nUpdate the documentation of the core.whitespace option\n\"indent-with-non-tab\" to correctly reflect that it uses the currently\nset tab width, set by the \"tabwidth\" option, rather than a fixed number.\n\nSigned-off-by: Wesley J. Landaker <wjl@icecavern.net>\n---\n Documentation/config.txt |    4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 6416cae..113a196 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -559,8 +559,8 @@ core.whitespace::\n * `space-before-tab` treats a space character that appears immediately\n   before a tab character in the initial indent part of the line as an\n   error (enabled by default).\n-* `indent-with-non-tab` treats a line that is indented with 8 or more\n-  space characters as an error (not enabled by default).\n+* `indent-with-non-tab` treats a line that is indented with `tabwidth` space\n+  characters or more as an error (not enabled by default).\n * `tab-in-indent` treats a tab character in the initial indent part of\n   the line as an error (not enabled by default).\n * `blank-at-eof` treats blank lines added at the end of file as an error\n-- \n1.7.10.4\n"},{"id":"199185","messageId":"7v392hxm94.fsf@alter.siamese.dyndns.org","threadId":"31559","inReplyTo":"1347815548-19305-1-git-send-email-wjl@icecavern.net","subject":"Re: [PATCH] Documentation: indent-with-non-tab uses tabwidth setting, not just 8","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-17T05:16:07Z","receivedAt":"2012-09-17T05:16:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Wesley J. Landaker\" <wjl@icecavern.net> writes:\n\n> From: \"Wesley J. Landaker\" <wjl@icecavern.net>\n>\n> Update the documentation of the core.whitespace option\n> \"indent-with-non-tab\" to correctly reflect that it uses the currently\n> set tab width, set by the \"tabwidth\" option, rather than a fixed number.\n>\n> Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>\n> ---\n>  Documentation/config.txt |    4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 6416cae..113a196 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -559,8 +559,8 @@ core.whitespace::\n>  * `space-before-tab` treats a space character that appears immediately\n>    before a tab character in the initial indent part of the line as an\n>    error (enabled by default).\n> -* `indent-with-non-tab` treats a line that is indented with 8 or more\n> -  space characters as an error (not enabled by default).\n> +* `indent-with-non-tab` treats a line that is indented with `tabwidth` space\n> +  characters or more as an error (not enabled by default).\n\nI would rather see this part left untouched.\n\nYour new text will force people who are not interested in using\nnon-standard tab width to read through the bulletted list, only to\nfind \"The default tab width is 8\".  I think that is a regression in\nthe documentation for more common readers.\n\nWhen somebody wants to use `indent-with-non-tab` and gets offended\nby the seemingly hardcoded \"8\" in the description, the reader has\nincentive to find out if there is a way to change that 8, and will\nfind `tabwidth=<n>` in the same bulletted list described, with the\neffect it has on both `indent-with-non-tab` and `tab-in-indent`.\n\nI think that should be sufficient for people who do use non-standard\ntab width using tabwidth=<n>.\n"},{"id":"199189","messageId":"5056B826.4030106@icecavern.net","threadId":"31559","inReplyTo":"7v392hxm94.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation: indent-with-non-tab uses tabwidth setting, not just 8","fromName":"Wesley J. Landaker","fromEmail":"wjl@icecavern.net","sentAt":"2012-09-17T05:41:58Z","receivedAt":"2012-09-17T05:41:58Z","isPatch":true,"sender":{"key":"wjl@icecavern.net","avatar":"https://avatars.githubusercontent.com/u/67229?v=4"},"body":"On 09/16/2012 11:16 PM, Junio C Hamano wrote:\n> I would rather see this part left untouched.\n> \n> Your new text will force people who are not interested in using\n> non-standard tab width to read through the bulletted list, only to\n> find \"The default tab width is 8\".  I think that is a regression in\n> the documentation for more common readers.\n> \n> When somebody wants to use `indent-with-non-tab` and gets offended\n> by the seemingly hardcoded \"8\" in the description, the reader has\n> incentive to find out if there is a way to change that 8, and will\n> find `tabwidth=<n>` in the same bulletted list described, with the\n> effect it has on both `indent-with-non-tab` and `tab-in-indent`.\n> \n> I think that should be sufficient for people who do use non-standard\n> tab width using tabwidth=<n>.\n\nWell, I'm not going to push the issue further than this e-mail, but I\nvery much disagree. Please think about this:\n\n  * The whole whitespace section talks generically about \"spaces\" and\n\"tab characters\". All of the options talk about tab in a generic way,\nwith the one single exception of \"indent-with-non-tab\".\n\n  * I know all about the tabwidth setting (I have it set in my\nconfiguration), but when I went looking in the whitespace documentation\nto try to flag a certain error I wanted to avoid, I was confused because\n\"indent-with-non-tab\" didn't do what I wanted ... instead it apparently\nused a hard-coded length of 8 spaces. My first thought was, well, I'd\nbetter fix THAT bug!\n\n  * Of course, I did an experiment, and of course, it DOESN'T ACTUALLY\nDO WHAT THE DOCUMENTATION SAYS, instead it uses the tabwidth. This is\ngood, I'm not complaining about how it works: this *is* what I want it\nto do. But the documentation is still wrong.\n\n  * So, as you say, \"the reader has incentive to find out if there is a\nway to change that 8\". I did get incentive to find that, but it took me\na few minutes of wasted time experimenting around with it, and then\nmotived me to write a patch so that no one else will ever get confused\nabout it again.\n\nIf I've perhaps convinced you that it would be beneficial to make the\ndocumentation for this option precisely correct, but you don't like how\nit's worded (it's the way it is because I tried to make a very minimal\nchange) I'd be happy to revise the patch, perhaps by changing the order\nof presentation of the options (e.g. mentioning tab width earlier in the\nsection, or in some other way that you or someone may want to suggest).\n\nIn any case, please, let's find some way to make the documentation both\neasy to read and also absolutely correct! =)\n"},{"id":"199194","messageId":"7v8vc9w5hq.fsf@alter.siamese.dyndns.org","threadId":"31559","inReplyTo":"7v392hxm94.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation: indent-with-non-tab uses tabwidth setting, not just 8","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-17T06:03:29Z","receivedAt":"2012-09-17T06:03:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>> @@ -559,8 +559,8 @@ core.whitespace::\n>>  * `space-before-tab` treats a space character that appears immediately\n>>    before a tab character in the initial indent part of the line as an\n>>    error (enabled by default).\n>> -* `indent-with-non-tab` treats a line that is indented with 8 or more\n>> -  space characters as an error (not enabled by default).\n>> +* `indent-with-non-tab` treats a line that is indented with `tabwidth` space\n>> +  characters or more as an error (not enabled by default).\n>\n> I would rather see this part left untouched.\n>\n> Your new text will force people who are not interested in using\n> non-standard tab width to read through the bulletted list, only to\n> find \"The default tab width is 8\".  I think that is a regression in\n> the documentation for more common readers.\n>\n> When somebody wants to use `indent-with-non-tab` and gets offended\n> by the seemingly hardcoded \"8\" in the description, the reader has\n> incentive to find out if there is a way to change that 8, and will\n> find `tabwidth=<n>` in the same bulletted list described, with the\n> effect it has on both `indent-with-non-tab` and `tab-in-indent`.\n>\n> I think that should be sufficient for people who do use non-standard\n> tab width using tabwidth=<n>.\n\nAn alternative would be to lose the \"8\" (or `tabwidth`) from that\ndescription.  I've always thought that the description of `tabwidth`\nis clear enough that \"8\" in the patch is not a hardcoded non-overridable\nvalue but is merely a default, but after reading that section a few\nmore times, I no longer think that is the case.\n\nI originally wrote \"8 or more space\" but that wasn't because I\nthought it was important to stress \"8 is the default\", but because I\ndidn't think of a better way to say what I wanted to say, which was\n\"if you are filling the indentation with spaces when you could have\njust typed a tab with a few spaces, this error triggers\", in other\nwords \"use of this is to encourage indenting with tabs\".\n"},{"id":"199231","messageId":"201209170820.28489.wjl@icecavern.net","threadId":"31559","inReplyTo":"7v8vc9w5hq.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation: indent-with-non-tab uses tabwidth setting, not just 8","fromName":"Wesley J. Landaker","fromEmail":"wjl@icecavern.net","sentAt":"2012-09-17T14:20:28Z","receivedAt":"2012-09-17T14:20:28Z","isPatch":true,"sender":{"key":"wjl@icecavern.net","avatar":"https://avatars.githubusercontent.com/u/67229?v=4"},"body":"On Monday, September 17, 2012 00:03:29 Junio C Hamano wrote:\n> An alternative would be to lose the \"8\" (or `tabwidth`) from that\n> description.  I've always thought that the description of `tabwidth`\n> is clear enough that \"8\" in the patch is not a hardcoded non-overridable\n> value but is merely a default, but after reading that section a few\n> more times, I no longer think that is the case.\n> \n> I originally wrote \"8 or more space\" but that wasn't because I\n> thought it was important to stress \"8 is the default\", but because I\n> didn't think of a better way to say what I wanted to say, which was\n> \"if you are filling the indentation with spaces when you could have\n> just typed a tab with a few spaces, this error triggers\", in other\n> words \"use of this is to encourage indenting with tabs\".\n\nOkay, I'm going to generated a new patch that hopefully reads better!\n"},{"id":"199233","messageId":"1347891735-10211-1-git-send-email-wjl@icecavern.net","threadId":"31559","inReplyTo":"201209170820.28489.wjl@icecavern.net","subject":"[PATCH] Documentation: indent-with-non-tab uses \"equivalent tabs\" not 8","fromName":"Wesley J. Landaker","fromEmail":"wjl@icecavern.net","sentAt":"2012-09-17T14:22:15Z","receivedAt":"2012-09-17T14:22:15Z","isPatch":true,"sender":{"key":"wjl@icecavern.net","avatar":"https://avatars.githubusercontent.com/u/67229?v=4"},"body":"From: \"Wesley J. Landaker\" <wjl@icecavern.net>\n\nUpdate the documentation of the core.whitespace option\n\"indent-with-non-tab\" to correctly reflect that it catches the use of\nspaces instead of the equivalent tabs, rather than a fixed number.\n\nSigned-off-by: Wesley J. Landaker <wjl@icecavern.net>\n---\n Documentation/config.txt |    5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 6416cae..11f320b 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -559,8 +559,9 @@ core.whitespace::\n * `space-before-tab` treats a space character that appears immediately\n   before a tab character in the initial indent part of the line as an\n   error (enabled by default).\n-* `indent-with-non-tab` treats a line that is indented with 8 or more\n-  space characters as an error (not enabled by default).\n+* `indent-with-non-tab` treats a line that is indented with space\n+  characters instead of the equivalent tabs as an error (not enabled by\n+  default).\n * `tab-in-indent` treats a tab character in the initial indent part of\n   the line as an error (not enabled by default).\n * `blank-at-eof` treats blank lines added at the end of file as an error\n-- \n1.7.10.4\n"},{"id":"199257","messageId":"7vpq5kva0z.fsf@alter.siamese.dyndns.org","threadId":"31559","inReplyTo":"1347891735-10211-1-git-send-email-wjl@icecavern.net","subject":"Re: [PATCH] Documentation: indent-with-non-tab uses \"equivalent tabs\" not 8","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-17T17:23:08Z","receivedAt":"2012-09-17T17:23:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Wesley J. Landaker\" <wjl@icecavern.net> writes:\n\n> From: \"Wesley J. Landaker\" <wjl@icecavern.net>\n>\n> Update the documentation of the core.whitespace option\n> \"indent-with-non-tab\" to correctly reflect that it catches the use of\n> spaces instead of the equivalent tabs, rather than a fixed number.\n>\n> Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>\n> ---\n>  Documentation/config.txt |    5 +++--\n>  1 file changed, 3 insertions(+), 2 deletions(-)\n>\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 6416cae..11f320b 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -559,8 +559,9 @@ core.whitespace::\n>  * `space-before-tab` treats a space character that appears immediately\n>    before a tab character in the initial indent part of the line as an\n>    error (enabled by default).\n> -* `indent-with-non-tab` treats a line that is indented with 8 or more\n> -  space characters as an error (not enabled by default).\n> +* `indent-with-non-tab` treats a line that is indented with space\n> +  characters instead of the equivalent tabs as an error (not enabled by\n> +  default).\n>  * `tab-in-indent` treats a tab character in the initial indent part of\n>    the line as an error (not enabled by default).\n>  * `blank-at-eof` treats blank lines added at the end of file as an error\n\nThanks, that reads much better.\n"}]}