Re: [dev] [ubase] pager

2017-02-04 Thread Mattias Andrée
On Sat, 4 Feb 2017 12:13:03 +0100
Josuah Demangeon  wrote:

> On February 4, 2017 10:49:52 AM GMT+01:00, "Mattias
> Andrée"  wrote:
> > On Sat, 4 Feb 2017 10:22:24 +0100
> > Josuah Demangeon  wrote:
> >   
> > > On February 4, 2017 2:03:16 AM GMT+01:00, "Mattias
> > > Andrée"  wrote:  
> > > > 
> > > > Well, this is embarrassing, I forgot to check you
> > > > program before starting on ul(1). However, I just
> > > > ran
> > > >
> > > > MAN_KEEP_FORMATTING=y man man | ./iode
> > > 
> > > I made escape sequences tooglable with flags, maybe
> > > that is the reason.
> > > 
> > > You can try enabling colour interpreting with +R (or
> > > disabling it with -R).  Either as command-line flag
> > > or as keybinding.  
> > 
> > Silly me, I thought it was -R.  
> 
> It is what is written on the man page and what less
> does.  I should update it.
> 
> Maybe -R is a better idea.  Maybe it is what sbase used
> to have.
> 
> >It works, but if you place
> > util-linux's ul(1) between man(1) and iode you will see
> > a problem.  
> 
> I see ^O (shift-in) characters at the end of bold
> sequences.  Is that what you mean?  Less does not handle
> these neither, but I can, I could just set it to ignore
> them.

For some reason ul(1) produces ESC ( B, which means switch
to US ASCII character set. These can be ignored, and less(1)
does ignore them.

> 
> > I'm working on libgraffiti which ul(1) will use, it will
> > support all escape sequences (I have read long lists of
> > escape sequences to find a pattern that recognise all
> > of them) along will things like combining marks. This
> > library will also be useful for pagers, terminals, and
> > similar programs.
> >
> > iode seem to be able to do everything needed to view
> > man pages, but unlike ul(1) and most(1) it doesn't
> > support e.g. `printf 'aaa\r___'`, but it doesn't have
> > to as ul(1) can be used.  
> 
> This will be very convenient, I was not aware of such a
> diversity
> 
> > I would recommend making +R the default, what would
> > probably reduce confusion for users.  
> 
> Yes, I will change it after line folding.
> 
> Do not hesitate to ask for explanation if something is
> unclear in the source.
> 



pgpSnEcgZaRwu.pgp
Description: OpenPGP digital signature


Re: [dev] [ubase] pager

2017-02-04 Thread Josuah Demangeon


On February 4, 2017 10:49:52 AM GMT+01:00, "Mattias Andrée"  
wrote:
> On Sat, 4 Feb 2017 10:22:24 +0100
> Josuah Demangeon  wrote:
> 
> > On February 4, 2017 2:03:16 AM GMT+01:00, "Mattias
> > Andrée"  wrote:
> > > 
> > > Well, this is embarrassing, I forgot to check you
> > > program before starting on ul(1). However, I just ran
> > >
> > >   MAN_KEEP_FORMATTING=y man man | ./iode  
> > 
> > I made escape sequences tooglable with flags, maybe that
> > is the reason.
> > 
> > You can try enabling colour interpreting with +R (or
> > disabling it with -R).  Either as command-line flag or as
> > keybinding.
> 
> Silly me, I thought it was -R.

It is what is written on the man page and what less does.  I should update it.

Maybe -R is a better idea.  Maybe it is what sbase used to have.

>It works, but if you place
> util-linux's ul(1) between man(1) and iode you will see
> a problem.

I see ^O (shift-in) characters at the end of bold sequences.  Is that what you 
mean?  Less does not handle these neither, but I can, I could just set it to 
ignore them.

> I'm working on libgraffiti which ul(1) will use, it will
> support all escape sequences (I have
 read long lists of
> escape sequences to find a pattern that recognise all
> of them) along will things like combining marks. This
> library will also be useful for pagers, terminals, and
> similar programs.
>
> iode seem to be able to do everything needed to view
> man pages, but unlike ul(1) and most(1) it doesn't
> support e.g. `printf 'aaa\r___'`, but it doesn't have
> to as ul(1) can be used.

This will be very convenient, I was not aware of such a diversity

> I would recommend making +R the default, what would
> probably reduce confusion for users.

Yes, I will change it after line folding.

Do not hesitate to ask for explanation if something is unclear in the source.



Re: [dev] [ubase] pager

2017-02-04 Thread Mattias Andrée
On Sat, 4 Feb 2017 10:22:24 +0100
Josuah Demangeon  wrote:

> On February 4, 2017 2:03:16 AM GMT+01:00, "Mattias
> Andrée"  wrote:
> > 
> > Well, this is embarrassing, I forgot to check you
> > program before starting on ul(1). However, I just ran
> >
> > MAN_KEEP_FORMATTING=y man man | ./iode  
> 
> I made escape sequences tooglable with flags, maybe that
> is the reason.
> 
> You can try enabling colour interpreting with +R (or
> disabling it with -R).  Either as command-line flag or as
> keybinding.

Silly me, I thought it was -R. I works, but if you place
util-linux's ul(1) between man(1) and iode you will see
a problem.

I'm working on libgraffiti which ul(1) will use, it will
support all escape sequences (I have read long lists of
escape sequences to find a pattern that recognise all
of them) along will things like combining marks. This
library will also be useful for pagers, terminals, and
similar programs.

iode seem to be able to do everything needed to view
man pages, but unlike ul(1) and most(1) it doesn't
support e.g. `printf 'aaa\r___'`, but it doesn't have
to as ul(1) can be used.

I would recommend making +R the default, what would
probably reduce confusion for users.

> 
> > and it is not able to display it properly, which is the
> > only thing I have implemented in ul(1) so far. But I'll
> > see if there are parts that can be reused.
> > 
> > maandree  
> 
> There is also +/-N for line number, and I am trying line
> wrapping / stripping with +/-S in a "folding" branch.
> 
> I will iddle in #suckless if that helps.
> 



pgpe7VuQ7lsib.pgp
Description: OpenPGP digital signature


Re: [dev] [ubase] pager

2017-02-04 Thread Josuah Demangeon


On February 4, 2017 2:03:16 AM GMT+01:00, "Mattias Andrée"  
wrote:
> 
> Well, this is embarrassing, I forgot to check you program
> before starting on ul(1). However, I just ran
>
>   MAN_KEEP_FORMATTING=y man man | ./iode

I made escape sequences tooglable with flags, maybe that is the reason.

You can try enabling colour interpreting with +R (or disabling it with -R).  
Either as command-line flag or as keybinding.

> and it is not able to display it properly, which is the
> only thing I have implemented in ul(1) so far. But I'll
> see if there are parts that can be reused.
> 
> maandree

There is also +/-N for line number, and I am trying line wrapping / stripping 
with +/-S in a "folding" branch.

I will iddle in #suckless if that helps.