bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25540: notice issue in expand -- doesn't allow for expressing tabsiz


From: Pádraig Brady
Subject: bug#25540: notice issue in expand -- doesn't allow for expressing tabsize value in tabstop(s)
Date: Sun, 26 Feb 2017 15:44:18 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 26/01/17 03:27, Reuti wrote:
> 
>> Am 26.01.2017 um 12:04 schrieb Pádraig Brady <address@hidden>:
>>
>> On 26/01/17 10:26, Reuti wrote:
>>>
>>>> Am 26.01.2017 um 05:29 schrieb L A Walsh <address@hidden>:
>>>>
>>>>
>>>> In programs that take tabstops, as an alternative to a tabsize, I've always
>>>> seen tabs beyond the end of the list taken as equal to the highest tab-stop
>>>> difference.  So for a tabsize=8, a tabset of 1,9 would be equivalent -- 
>>>> with
>>>> tabs above "9" being "9-1" or every 8th column above 9.
>>>>
>>>> Otherwise you have no way of expression all tabs on a line that stretches 
>>>> out to
>>>> "???" 160? 240? what? other than to enumerate tabstops to infinity.
>>>>
>>>> If they want to limit tabstops above the last to size "1", they can use 
>>>> something like 1,9,10.  How else can one specify tabs beyond the last
>>>> for a size other than "1"?
>>>>
>>>> Could this be changed/fixed?
>>>
>>> For now the behavior is like specified on the info page: "[…] and replace 
>>> any tabs beyond the last tab stop given with single spaces." To avoid that 
>>> this gets broken, I would suggest to use a modified syntax like 
>>> 1,9,30,34,/4 for using a width of 4 beyond 34.
>>>
>>
>> I like that. Explicit and extensible.
>> An alternative could be: --tabs=1,9,30,34,+4 ?
> 
> Sure, this works too. In fact: I had this also in mind first, but with the 
> extension to specify a multiplicator for the width I found "2+4" misleading 
> and a slash more appropriate.
> 

Even without the multiplier a '+' would be misleading
since we wouldn't be necessarily adding that to the last value.

The attached uses your suggestion of '/' but only allowed in the last position.

thanks,
Pádraig.

Attachment: expand-trailing-tabsize.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]