« first day (134 days earlier)      last day (2265 days later) » 

9:30 AM
Yes... I did take a screenshot of it
that's fullscreen in MATE terminal
it looks the same in Konsole (I've installed Konsole along with its many KDE dependencies because it can handle Complex Text Layout and thus renders Tamil readably, although the input isn't perfect because the cursor doesn't move enough for the characters)
 
9:52 AM
@Zanna Oh, yeah. That's nigh unusable. The specific problem seems to be that the escape sequences that tell your terminal to apply "formatting" are not being handled properly, but I'm not sure your terminal is really what is at fault. Hmm... Does the same problem happen if you view perldoc pages in a virtual console? In XTerm?
Some of the perldoc pages have corresponding man pages, which are generated from them and packaged. The screenshot you showed looks like it's perldoc perlrun. Do you get the same problem with man perlrun?
 
man perlrun looks fine and the sections that have junk around them are bold as they should be
In a VC it looks just as bad as my screenshot
same problem in XTerm
 
@Zanna As temporary workaround, you can use man. Most perldoc pages cannot also be viewed as man pages, unless you perform the conversion yourself. But the most popular ones do have corresponding man pages installed. However, that's obviously not an actual solution.
 
yeah :) I wonder what the problem is though...
 
10:10 AM
Can I see the very first screen of perldoc perlrun?
Also, does perldoc -t perlrun look bad, too?
Does what you get from perldoc perlrun look the same as what you get from perldoc -T perlrun | less? Do perldoc perlrun | head and perldoc -T perlrun | head look the same as one another, and do they appear properly formatted?
 
@EliahKagan no! it looks good
 
10:26 AM
That may be a better workaround, then, since you can view any perldoc page that way.
 
@EliahKagan perldoc -T perlrun | less looks bad
in the same way
perldoc perlrun | head and perldoc -T perlrun | head both look the same and appear properly formatted
 
Does perldoc perlrun | less look like perldoc -T perlrun | less? (I expect it to, but I want to check.)
If piping perldoc perlrun or perldoc -T perlrun to head looks right, and piping them to less looks wrong, then piping them to less -R should look right.
 
@EliahKagan yes they looks the same (bad)
@EliahKagan it does indeed look right
 
What's the output of echo "$PAGER" and namei "$(command -v pager)"?
 
zanna@toaster:~$ echo "$PAGER"

zanna@toaster:~$ namei "$(command -v pager)"
f: /usr/bin/pager
 d /
 d usr
 d bin
 l pager -> /etc/alternatives/pager
   d /
   d etc
   d alternatives
   l pager -> /bin/less
     d /
     d bin
     - less
zanna@toaster:~$
 
10:41 AM
What's the output of sensible-pager --version?
 
$ sensible-pager --version
less 481 (GNU regular expressions)
Copyright (C) 1984-2015  Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Homepage: greenwoodsoftware.com/less
 
If you run perldoc perlrun, and then in another terminal run pstree | less and find the part relevant to perldoc, what does that look like? Then, after quitting that second instance of less but before quitting perldoc, what's the output of ps ax | grep -F pager?
 
    |-mate-terminal-+-bash---bash---telegram---12*[{telegram}]
    |               |-2*[bash]
    |               |-bash---perldoc---sh---sensible-pager---pager
    |               |-bash-+-less
    |               |      `-pstree
    |               `-4*[{mate-terminal}]
(parent is init)
$ ps ax | grep -F pager
 2876 pts/4    S+     0:00 sh -c /usr/bin/sensible-pager "/tmp/O2aQa04Y7b"
 2877 pts/4    S+     0:00 /bin/sh /usr/bin/sensible-pager /tmp/O2aQa04Y7b
 2881 pts/4    S+     0:00 pager /tmp/O2aQa04Y7b
 2939 pts/5    S+     0:00 grep --color=auto -F pager
why does it run sh?
 
@Zanna I don't know.
I'm not sure how it works for me or anybody else, actually. If I run the commands shown in the output of ps for me, the escape sequences are not properly interpreted. How could they be? How are they, when it runs correctly? No option is passed to sensible-pager to tell it to behave that way.
 
10:57 AM
strange...
 
11:07 AM
maybe I should ask a question about it
 
I was going to suggest that!
 
:) I don't have time to write one now as I'm about to go to work, but I should be able to do it later today
TTYL!
 
Ttyl!
 
 
1 hour later…
12:38 PM
I think this code in /usr/share/perl/5.22/Pod/Perldoc.pm almost answers all of our questions:
        foreach my $pager (@pagers) {
            $self->aside("About to try calling $pager $output\n");
            if ($self->is_vms) {
                last if system("$pager $output") == 0;
            } else {
                # fix visible escape codes in ToTerm output
                # bugs.debian.org/758689
                local $ENV{LESS} = defined $ENV{LESS} ? "$ENV{LESS} -R" : "-R";
                last if system("$pager \"$output\"") == 0;
            }
        }
The problem you're having resembles Debian Bug #758689, whose URL is given there. Does your /usr/share/perl/5.22/Pod/Perldoc.pm file contain the following line?
                local $ENV{LESS} = defined $ENV{LESS} ? "$ENV{LESS} -R" : "-R";
 
1:16 PM
So, the way commands like man and perldoc tell less how to behave is by placing options in the LESS environment variable, which less supports. They both invoke it as pager. In the case of perldoc, it apparently finds sensible-pager first, but by default that runs pager. Your system does not deviate from that default. If you are running exactly one instance of pager, then this command shows the environment string for the LESS environment variable:
grep -z ^LESS= "/proc/$(pgrep -x pager)/environ"; echo
On my system, when I run that while perldoc is running, I get:
LESS=-R
 
 
2 hours later…
3:18 PM
@EliahKagan my 17.10 system doesn't have that file, but it has /usr/share/perl/5.26.0/Pod/Perldoc.pm and it does not have that line
@EliahKagan empty for me
regression?
 
The corresponding loop in the Perl 5.26 version, on 17.10, is:
        foreach my $pager (@pagers) {
            $self->aside("About to try calling $pager $output\n");
            if ($self->is_vms) {
                last if system("$pager $output") == 0;
            } elsif($self->is_amigaos) {
                last if system($pager, $output) == 0;
            } else {
                my $formatter = $self->{'formatter_class'};
                if ( $formatter->can('pager_configuration') ) {
                  $self->aside("About to call $formatter" . "->pager_configuration(\"$pager\")\n");
What's the output of apt list perl-doc on your system?
(It does not provide that file, but it provides the command that uses it.)
 
3:38 PM
$ apt list perl-doc
Listing... Done
perl-doc/artful,artful,now 5.26.0-8ubuntu1 all [installed]
 
4:01 PM
I'm not totally sure what this is supposed to do. I don't know if it's intended to place -R in the LESS environment variable when necessary, or not. So I don't know if this is due to an oversight, or some other problem.
                my $formatter = $self->{'formatter_class'};
                if ( $formatter->can('pager_configuration') ) {
                  $self->aside("About to call $formatter" . "->pager_configuration(\"$pager\")\n");
                  $formatter->pager_configuration($pager, $self);
                }
I've just updated my Lubuntu 17.10 virtual machine. I'm going to replace my old snapshot of it with a new one, then I'll install perl-doc and see if I can reproduce the problem.
 

« first day (134 days earlier)      last day (2265 days later) »