default pager is more
On Wed, 17 Jul 2024 at 11:33, Ian Malone <ibmalone at gmail.com> wrote:
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 was dropped as part of an effort to minimize dependencies of R-core, with e.g. containers in mind.
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
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.
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'}
This is probably because "less" still is part of the default image in EPEL8, but the spec is exactly the same.
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.
As said, it is not a regression, but a conscious decision.
I?aki ?car [[alternative HTML version deleted]]