groff
[Top][All Lists]
Advanced

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

Re: [BUG] italics run past where they should


From: G. Branden Robinson
Subject: Re: [BUG] italics run past where they should
Date: Wed, 17 Aug 2022 06:58:13 -0500

Hi Alex,

Is the subject line still accurate?  I thought the problem we were
chasing at this point was that all character attributes got shut off
after the end of a highlighted match when using the pager to search for
text in a man page.

Regardless, I'm not able to reproduce _any_ misrendering.

At 2022-08-17T13:24:17+0200, Alejandro Colomar wrote:
> Reproduced:
> 
>  1986  <$(man -w membarrier) groff -Tutf8 -man > grotty.out
>  1987  less grotty.out
>  1988  less -R grotty.out
>  1989  batcat grotty.out
> 
> The page I used is not compressed, since it's installed from source.
> zcatting Debian's page should produce the same.

Yeah, I'm not too worried about that part of the procedure.

> Both less and batcat reproduce the bug.  I attached the page so that
> you can inspect it (it would be interesting to know if your less(1)
> with my grotty.out reproduces the bug).

It does not reproduce the issue for me.  Your grotty.out file works fine
with both less 551 and less 581.2 (self-compiled), and with batcat
0.12.1, on my system.

I didn't mess with running less without its `-R` flag.  That is known
and documented to not handle SGR escape sequences on input.

> I;ll also show inline here the relevant part of the file:

> $ grep SYS_membarrier <grotty.out | hd
> 00000000  20 20 20 20 20 20 20 1b  5b 31 6d 69 6e 74 20 73  | .[1mint s|
> 00000010  79 73 63 61 6c 6c 28 53  59 53 5f 6d 65 6d 62 61  |yscall(SYS_memba|
> 00000020  72 72 69 65 72 2c 20 69  6e 74 20 1b 5b 34 6d 1b  |rrier, int .[4m.|
> 00000030  5b 32 32 6d 63 6d 64 1b  5b 32 34 6d 1b 5b 31 6d  |[22mcmd.[24m.[1m|
> 00000040  2c 20 75 6e 73 69 67 6e  65 64 20 69 6e 74 20 1b  |, unsigned int .|
> 00000050  5b 34 6d 1b 5b 32 32 6d  66 6c 61 67 73 1b 5b 32  |[4m.[22mflags.[2|
> 00000060  34 6d 1b 5b 31 6d 2c 20  69 6e 74 20 1b 5b 34 6d  |4m.[1m, int .[4m|
> 00000070  1b 5b 32 32 6d 63 70 75  5f 69 64 1b 5b 32 34 6d  |.[22mcpu_id.[24m|
> 00000080  1b 5b 31 6d 29 3b 1b 5b  30 6d 0a                 |.[1m);.[0m.|
> 0000008b

I'm afraid this doesn't illuminate much; it looks congruent with my
dissection of similar output earlier in the thread[1][2], and moreover,
I thought the problem only manifested when you performed a search in the
pagers?  Any successful match in a pager that highlights matches will
(1) certainly change the series of escape sequences sent to the terminal
and (2) not be reflected in the grotty.out file.

I guess it is time to script(1) your pager session now.  Use grotty.out
since it is known to be sane.  We are, however, at this point, not
troubleshooting groff, but the pagers and/or terminal emulators.

Regards,
Branden

[1] https://lists.gnu.org/archive/html/groff/2022-08/msg00132.html
[2] We can observe one "new" sequence (due to more input context), a
    parameter of zero to the CSI "m" sequence.  This is also known as
    "SGR 0" and it turns off all graphic renditions that the terminal
    regards as non-default.

Attachment: signature.asc
Description: PGP signature


reply via email to

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