default pager is more
On Thu, 18 Jul 2024 at 10:12, I?aki Ucar <iucar at fedoraproject.org> wrote:
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.
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 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.
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?
Also these days most people don't read R docs in the console.
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.
If you do and do have a preferred pager, then you can do e.g. $ echo "PAGER=less" >> ~/.Renviron
Yes, I can set an environment variable.
and you're good to go.
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>
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.
This is certainly a point of view. -- imalone