unix-conf/.emacs.d/elpa/ess-20160208.453/etc/R-pager.R
2016-02-18 14:53:30 +01:00

19 lines
459 B
R

mypager <- function(files, header, title, delete.file) {
tfile <- tempfile(paste(basename(files[1]),"__", sep=""))
Tf <- file(tfile, open="w+")
stopifnot(file.append(tfile, files))
system(paste("emacsclient -n", tfile))
}
file.show(file.path(R.home("doc"), "COPYRIGHTS"),
pager = mypager)
options(pager = mypager)
## test :
file.show(file.path(R.home("doc"), "COPYRIGHTS"))
## or
RShowDoc('NEWS')
## using a suboptimal file name