Skip to content

default pager is more

5 messages · Iñaki Ucar, Ian Malone

#
Was wondering why R help in recent Fedora only provided --More--
prompt for viewing, rather than allowing arrow key navigation as on
RHEL. It turns out it uses a system command for paging and the current
default pager is more:
grep PAGER /usr/lib64/R/etc/Renviron
PAGER=${PAGER-'/usr/bin/more'}

rpm -qf /usr/lib64/R/etc/Renviron
R-core-4.4.1-3.fc41.x86_64

This primarily affects function help, where less is much more capable
for navigation and searching.

Back in 2011 there was some discussion on this list, it it seems the
intention is the default should be less:
https://stat.ethz.ch/pipermail/r-sig-fedora/2011-August/000194.html

I hadn't noticed an issue until recently upgrading to fc41 testing,
however it appears to be the case in FC39 and EL9, while the EL8
package is still less:

For R-core-4.3.3-2.fc39.x86_64:
PAGER=${PAGER-'/usr/bin/more'}

R-core-4.4.1-3.el9.x86_64:
PAGER=${PAGER-'/usr/bin/more'}

R-core-4.4.1-3.el8.x86_64
PAGER=${PAGER-'/usr/bin/less'}

configure for R still prefers less if available:
$ grep "ac_prog.*PAGER" /tmp/R-4.4.1-3.fc41.src/R-4.4.1/configure
for ac_prog in ${PAGER} less more page pg

I suspect this was fixed (certainly don't remember it from Fedora <39,
but I'd have to hunt down packages to check) and has regressed
relatively recently.
#
On Wed, 17 Jul 2024 at 11:33, Ian Malone <ibmalone at gmail.com> wrote:

            
This was dropped as part of an effort to minimize dependencies of R-core,
with e.g. containers in mind.
These days there are other utilities more capable than less. Also these
days most people don't read R docs in the console.
If you do and do have a preferred pager, then you can do e.g.

$ echo "PAGER=less" >> ~/.Renviron

and you're good to go.
This is probably because "less" still is part of the default image in
EPEL8, but the spec is exactly the same.
As said, it is not a regression, but a conscious decision.
#
On Thu, 18 Jul 2024 at 10:12, I?aki Ucar <iucar at fedoraproject.org> wrote:
R-core is > 100MB not including dependencies.
"R" additionally pulls R-devel and another 167MB of installed dependencies.
less is ~370kB (and incidentally a dependency of git)
This is not really the issue, although if there are any that can be
expected to be well supported and are in fact included in Fedora then
please do consider making one the default. "most" installs at about
130kB, although R will not autoconfigure to use it. Maybe suggest it
to upstream?
Ah, I'm "holding it wrong".
Installing Rstudio to read documentation is 580MB and only useful
locally. Additionally these are R docs, not R Studio docs.
Yes, I can set an environment variable.
I was aware of that before writing. However this represents a lot of
wasted effort for every person who encounters this; it is not obvious
where in the documentation to look,
https://www.r-project.org/help.html or help(help) do not make any
mention of file.show().

<snip>
This is certainly a point of view.


--
imalone
3 days later
#
FYI I added less back to the buildroot. Updates will be published soon.

I?aki
On Thu, 18 Jul 2024 at 18:59, Ian Malone <ibmalone at gmail.com> wrote:

            

  
    
#
On Mon, 22 Jul 2024, 16:46 I?aki Ucar, <iucar at fedoraproject.org> wrote:

            
Much appreciated, thank you.