Re: [fossil-users] Tab stop width

2014-10-03 Thread Martijn Coppoolse

Stephan Beal schreef op 1-10-2014 19:48:

More info, for those interested:

http://www.w3schools.com/cssref/css3_pr_tab-size.asp

apparently MSIE doesn't support it, but that table might simply be out
of date.


http://caniuse.com/#feat=css3-tabsize

(CanIUse.com is usually better up to date than w3schools).
--
Martijn Coppoolse
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-10-01 Thread Stephan Beal
On Wed, Oct 1, 2014 at 10:49 AM, Stephan Beal  wrote:

> On Wed, Oct 1, 2014 at 10:10 AM, Zoltán Kócsi 
> wrote:
>
>> pre {
>>   -o-tab-width: 4;
>>   -moz-tab-width: 4;
>>   tab-width: 4;
>> }
>>
>
> Oh - didn't know about that.
>

More info, for those interested:

http://www.w3schools.com/cssref/css3_pr_tab-size.asp

apparently MSIE doesn't support it, but that table might simply be out of
date.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-10-01 Thread Stephan Beal
On Wed, Oct 1, 2014 at 10:10 AM, Zoltán Kócsi  wrote:

> pre {
>   -o-tab-width: 4;
>   -moz-tab-width: 4;
>   tab-width: 4;
> }
>

Oh - didn't know about that.


> Of course, I really don't know how Fossil is organised internally, so
> it's very easy for me to say 'just add a hook for a filter' even if in
> reality it would be a major undertaking,


Yes, fossil doesn't have a mechanism for that, so it would be an
undertaking.


> so I think it's better if I
> just shut up.
>

Please don't - in my experience the best enhancement ideas often come from
people who have not been using fossil as long, and are therefore not as set
in their ways as "some of us" (==me) are!

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-10-01 Thread Zoltán Kócsi
> HTML does not (AFAIK) distinguish between tabs and other whitespace.
> It will (by default) collapse all such characters into a single one
> or (with the right css) display them as-is, but css provides no way
> to say "treat tabs as N spaces" (or no way i have wver seen). My
> point being - in the web ui, i don't think this is possible without
> filtering the text.

A quick and dirty solution was adding this to the CSS config:

pre {
  -o-tab-width: 4;
  -moz-tab-width: 4;
  tab-width: 4;
}

However, providing a hook to allow filtering the text before displaying
it (well, sending to the browser) may be a good idea and actually
better than adding any flag or config variable for tab stops. With a
filter anyone can implement whatever eye candy they want for displaying
content in the web UI (line numbers or syntax colouring would come to
mind for program sources), it has no effect on the actual revision
control functionality of Fossil, and with an empty filter being the
default it is completely backward compatible.

Of course, I really don't know how Fossil is organised internally, so
it's very easy for me to say 'just add a hook for a filter' even if in
reality it would be a major undertaking, so I think it's better if I
just shut up.

Zoltan
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Stephan Beal
HTML does not (AFAIK) distinguish between tabs and other whitespace. It
will (by default) collapse all such characters into a single one or (with
the right css) display them as-is, but css provides no way to say "treat
tabs as N spaces" (or no way i have wver seen). My point being - in the web
ui, i don't think this is possible without filtering the text.

(sent from a mobile device - please excuse brevity, typos, and top-posting)
- stephan beal
http://wanderinghorse.net
On Oct 1, 2014 12:49 AM, "Dömötör Gulyás"  wrote:

> Wether you like tabs or spaces, both are widely enough used to
> consider a setting for display purposes in the Web UI.
>
> On 30 September 2014 23:01, Zoltán Kócsi  wrote:
> > On Tue, 30 Sep 2014 12:12:11 -0400
> > Ron W  wrote:
> >
> >> On Tue, Sep 30, 2014 at 10:01 AM, Zoltán Kócsi 
> >> wrote:
> >>
> >> [...]
> >> Are you referring to the  web UI display of files?
> >
> > Yes. Not what is stored, but the way it is displayed in the HTML
> > output. I expect a revision control system never to alter the content.
> > But for display purposes, some flexibility in formatting can not hurt.
> >
> >> If Fossil were to not convert TAB to spaces, then I think the CSS
> >> could be adjusted.
> >
> > I know next to nothing about CSS (or HTML, for that matter), so if you
> > can tell me how to adjust CSS to use tab stops at every N-th character,
> > I'd be most obliged.
> >
> > Thanks,
> >
> > Zoltan
> > ___
> > fossil-users mailing list
> > fossil-users@lists.fossil-scm.org
> > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Dömötör Gulyás
Wether you like tabs or spaces, both are widely enough used to
consider a setting for display purposes in the Web UI.

On 30 September 2014 23:01, Zoltán Kócsi  wrote:
> On Tue, 30 Sep 2014 12:12:11 -0400
> Ron W  wrote:
>
>> On Tue, Sep 30, 2014 at 10:01 AM, Zoltán Kócsi 
>> wrote:
>>
>> [...]
>> Are you referring to the  web UI display of files?
>
> Yes. Not what is stored, but the way it is displayed in the HTML
> output. I expect a revision control system never to alter the content.
> But for display purposes, some flexibility in formatting can not hurt.
>
>> If Fossil were to not convert TAB to spaces, then I think the CSS
>> could be adjusted.
>
> I know next to nothing about CSS (or HTML, for that matter), so if you
> can tell me how to adjust CSS to use tab stops at every N-th character,
> I'd be most obliged.
>
> Thanks,
>
> Zoltan
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Zoltán Kócsi
On Tue, 30 Sep 2014 12:12:11 -0400
Ron W  wrote:

> On Tue, Sep 30, 2014 at 10:01 AM, Zoltán Kócsi 
> wrote:
> 
> [...]
> Are you referring to the  web UI display of files?

Yes. Not what is stored, but the way it is displayed in the HTML
output. I expect a revision control system never to alter the content.
But for display purposes, some flexibility in formatting can not hurt.

> If Fossil were to not convert TAB to spaces, then I think the CSS
> could be adjusted.

I know next to nothing about CSS (or HTML, for that matter), so if you
can tell me how to adjust CSS to use tab stops at every N-th character,
I'd be most obliged.

Thanks,

Zoltan
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Ron W
On Tue, Sep 30, 2014 at 2:27 PM, Stephan Beal  wrote:

> On Tue, Sep 30, 2014 at 6:26 PM, Ron W  wrote:
>
>> On the command line, I typically pipe command (including fossil) output
>> to less, which has its own settings for filtering tabs.
>>
>
> Which highlights the major problem with tabs: they were (25+ years ago)
> useful for saving a bit of space, but every program is free to interpret
> them differently, and thus their utility suffers. In ~20 years in the I.T.
> field i have _never_ worked on a project (professional nor open source)
> which preferred hard tabs over spaces, and projects which have debated the
> topic have always ended up choosing spaces over tabs, primarily because
> they are 100% predictable, whereas tabs are 100% unpredictable. i am aware
> of a small handful of projects which prefer/require them, but... i think
> they're crazy for doing so ;).
>

Every place I've worked has at least strongly discouraged tabs. And since
the rise of indentation sensitive "languages" (eg, YAML, Python and
others), tabs are officially banned.

I do know of an open source project that requires only tabs for
indentation. The stated rational being to allow contributors to set their
editors' tab to whatever indentation increment desired. The project also
discourages use of code formatting tools "to avoid introducing extraneous
differences".
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread dave
...
> don't and at
> >> those places the 4 character tab setting is not that rare.
> >> 
> >> Zoltan
> > ...
> > I second the request.  Every place I worked at uses hard 
> tabs, at 4 chars.
> > -dave
> 
> Are you sure you're talking about hard tabs?  Or indentation?  It's
> pretty common to want code indented at 4 chars., but setting the
> display of  to anything other than its historical value of 8
> characters is a curse to anyone who will have maintain the code in the
> future (and is the reason why people shouldn't be inserting 's for
> purposes of indentation).
...

I think I am, but I've been known to not know what I'm talking about
>From time-to-time.  At any rate, I think my point was that the rendering
in the UI be able to treat the tab as 'x chars', rather than any
Transformation of actual data goin in or coming out of the repo, so just
A UI presentation setting.

-dave


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Will Parsons
Stephan Beal wrote:
> --===1471853227==
> Content-Type: multipart/alternative; boundary=089e0139fcda1d63f205044c8930
>
> --089e0139fcda1d63f205044c8930
> Content-Type: text/plain; charset=UTF-8
>
> On Tue, Sep 30, 2014 at 6:26 PM, Ron W  wrote:
>
>> On the command line, I typically pipe command (including fossil) output to
>> less, which has its own settings for filtering tabs.
>>
>
> Which highlights the major problem with tabs: they were (25+ years ago)
> useful for saving a bit of space, but every program is free to interpret
> them differently, and thus their utility suffers. In ~20 years in the I.T.
> field i have _never_ worked on a project (professional nor open source)
> which preferred hard tabs over spaces, and projects which have debated the
> topic have always ended up choosing spaces over tabs, primarily because
> they are 100% predictable, whereas tabs are 100% unpredictable. i am aware
> of a small handful of projects which prefer/require them, but... i think
> they're crazy for doing so ;).

Matches my experience too.  By all means configure your editor to
indent to whatever degree you (or the project) prefers, but have it
use spaces, not hard tabs, to do so.

-- 
Will

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Will Parsons
dave wrote:
>>...
>> 
>> 
>> > > When Fossil displays a file in the repository, is it possible to
>> > > tell it the width of the tab characters in the file? I could not
>> > > find any setting to do that.
>> > >
>> > 
>> > Tab stops are hard-coded to every 8th character.  There is 
>> no setting
>> > to change that.
>> 
>> Would it be worthwhile to add such a setting? I know that many
>> organisations shun tabs, but there are quite a few that don't and at
>> those places the 4 character tab setting is not that rare.
>> 
>> Zoltan
> ...
> I second the request.  Every place I worked at uses hard tabs, at 4 chars.
> -dave

Are you sure you're talking about hard tabs?  Or indentation?  It's
pretty common to want code indented at 4 chars., but setting the
display of  to anything other than its historical value of 8
characters is a curse to anyone who will have maintain the code in the
future (and is the reason why people shouldn't be inserting 's for
purposes of indentation).

-- 
Will

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Stephan Beal
On Tue, Sep 30, 2014 at 6:26 PM, Ron W  wrote:

> On the command line, I typically pipe command (including fossil) output to
> less, which has its own settings for filtering tabs.
>

Which highlights the major problem with tabs: they were (25+ years ago)
useful for saving a bit of space, but every program is free to interpret
them differently, and thus their utility suffers. In ~20 years in the I.T.
field i have _never_ worked on a project (professional nor open source)
which preferred hard tabs over spaces, and projects which have debated the
topic have always ended up choosing spaces over tabs, primarily because
they are 100% predictable, whereas tabs are 100% unpredictable. i am aware
of a small handful of projects which prefer/require them, but... i think
they're crazy for doing so ;).


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Ron W
On Tue, Sep 30, 2014 at 9:58 AM, Richard Hipp  wrote:

>
>
> On Tue, Sep 30, 2014 at 9:44 AM, Zoltán Kócsi 
> wrote:
>
>> When Fossil displays a file in the repository, is it possible to tell
>> it the width of the tab characters in the file? I could not find any
>> setting to do that.
>>
>
> Tab stops are hard-coded to every 8th character.  There is no setting to
> change that.
>

Seems to me that even when "displaying" file content, converting tabs to
spaces violates Fossil's promise to retrieve exactly what was committed.

On the command line, I typically pipe command (including fossil) output to
less, which has its own settings for filtering tabs.

In the web UI, I think CSS can handle tab preferences.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Ron W
On Tue, Sep 30, 2014 at 10:01 AM, Zoltán Kócsi  wrote:

> > > When Fossil displays a file in the repository, is it possible to
> > > tell it the width of the tab characters in the file? I could not
> > > find any setting to do that.
> > >
> >
> > Tab stops are hard-coded to every 8th character.  There is no setting
> > to change that.
>
> Would it be worthwhile to add such a setting? I know that many
> organisations shun tabs, but there are quite a few that don't and at
> those places the 4 character tab setting is not that rare.


Are you referring to the  web UI display of files?

If Fossil were to not convert TAB to spaces, then I think the CSS could be
adjusted.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread dave
>...
> 
> 
> > > When Fossil displays a file in the repository, is it possible to
> > > tell it the width of the tab characters in the file? I could not
> > > find any setting to do that.
> > >
> > 
> > Tab stops are hard-coded to every 8th character.  There is 
> no setting
> > to change that.
> 
> Would it be worthwhile to add such a setting? I know that many
> organisations shun tabs, but there are quite a few that don't and at
> those places the 4 character tab setting is not that rare.
> 
> Zoltan
...
I second the request.  Every place I worked at uses hard tabs, at 4 chars.
-dave


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Zoltán Kócsi
> > When Fossil displays a file in the repository, is it possible to
> > tell it the width of the tab characters in the file? I could not
> > find any setting to do that.
> >
> 
> Tab stops are hard-coded to every 8th character.  There is no setting
> to change that.

Would it be worthwhile to add such a setting? I know that many
organisations shun tabs, but there are quite a few that don't and at
those places the 4 character tab setting is not that rare.

Zoltan
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Tab stop width

2014-09-30 Thread Richard Hipp
On Tue, Sep 30, 2014 at 9:44 AM, Zoltán Kócsi  wrote:

> When Fossil displays a file in the repository, is it possible to tell
> it the width of the tab characters in the file? I could not find any
> setting to do that.
>

Tab stops are hard-coded to every 8th character.  There is no setting to
change that.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Tab stop width

2014-09-30 Thread Zoltán Kócsi
When Fossil displays a file in the repository, is it possible to tell
it the width of the tab characters in the file? I could not find any
setting to do that.

Thanks,

Zoltan
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users