unix-conf/.emacs.d/elpa/ess-20160208.453/etc/R-pager.R

19 lines
459 B
R
Raw Normal View History

2016-02-18 13:53:30 +00:00
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