mypager <- function(files, header, title, delete.file) {1tfile <- tempfile(paste(basename(files[1]),"__", sep=""))2Tf <- file(tfile, open="w+")3stopifnot(file.append(tfile, files))4system(paste("emacsclient -n", tfile))5}6file.show(file.path(R.home("doc"), "COPYRIGHTS"),7pager = mypager)89options(pager = mypager)101112## test :13file.show(file.path(R.home("doc"), "COPYRIGHTS"))1415## or16RShowDoc('NEWS')17## using a suboptimal file name181920