|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Is html help configurable now?Hello,
Looking for a workaround that activates html help instead of the help in xemacs/ESS and I found this: https://stat.ethz.ch/pipermail/ess-help/2003-December/001657.html Is the this setting still hard-wired? If not, can it be configured in a host specific or user specific way? Thanks Georg ______________________________________________ ESS-help@... mailing list https://stat.ethz.ch/mailman/listinfo/ess-help |
|
|
Re: Is html help configurable now?>>>>> "GM" == Georg Mainik <gmainik@...>
>>>>> on Fri, 02 Oct 2009 13:25:29 +0200 writes: GM> Hello, Looking for a workaround that activates html help GM> instead of the help in xemacs/ESS and I found this: GM> https://stat.ethz.ch/pipermail/ess-help/2003-December/001657.html which is basically >> ------------------------------ >> ;; To run R from the *R* buffer and also use html help. >> ;; rmh 2003 Dec 17 >> ;; >> ;; Start R with M-x R, then from the *R* buffer, either >> ;; a. load this file >> ;; b. eval the next two lines with M-: >> (setq inferior-ess-help-command "help(\"%s\", htmlhelp=TRUE)\n") >> (setq ess-help-kill-bogus-buffers t) >> ------------------------------ >> >> At the moment, this file must be loaded each time after the *R* buffer >> is started. It can't be run from either the .emacs or site-start.el file. GM> Is the this setting still hard-wired? Well, I think I would not have recommended that solution even back in 2003, because the inferior-ess-help-command variable has always been "customizable" [Emacs: Menu "Options" --> (at botton) "Customize Emacs"] *BUT* as I now find when I try it: It does *not* work to customize the variable, as "later", in essd-r.el, we explicitly set its value to help(*, htmlhelp=FALSE) which completely counterfeys the whole customization... .... aargh... {ESS-core should work on this; but I can't for the next few weeks ..} GM> If not, can it be configured in a host specific or user GM> specific way? Yes, in theory: The R developers have for a long time provided this customization via R startup settings, since till and including R 2.9.2, the 'htmlhelp' argument of help has had the default htmlhelp = getOption("htmlhelp") and the user or site (or host) specific R startup options could set options(htmlhelp = TRUE) e.g. {(*) Note that from R 2.10.0 on, htmlhelp=TRUE/FALSE is deprecated and help_type = "html" (or "text" or ..) should be used instead.} *HOWEVER* As I said above, mostly for historical reasons I think (when sites had htmlhelp=TRUE default, but the ESS aficionados wanted help buffers in ESS, i.e., htmlhelp=FALSE) we've more or less hardwired inferior-ess-help-command to htmlhelp=FALSE. And as said, I think we (ESS core) should change this ASAP, not the least because the upcoming R version 2.10.0 comes with it's own little https server and builds html pages on the fly... Martin Maechler, ETH Zurich ______________________________________________ ESS-help@... mailing list https://stat.ethz.ch/mailman/listinfo/ess-help |
|
|
Re: Is html help configurable now?>
> And as said, I think we (ESS core) should change this ASAP, > not the least because the upcoming R version 2.10.0 comes with > it's own little https server and builds html pages on the fly... hi Martin, if it is relevant, could you or someone else on Rcore say something more about this feature -- is R moving towards building help pages on the fly? If so, will ESS get 'left behind' if the dynamic help pages are rendered only in html, and we don't have a way of reading them? Or is this building of html pages for other purposes? (I've recently started using w3m under Emacs, and it is great for limited browsing, so I could investigate getting ESS and w3m to co-operate.) Stephen ______________________________________________ ESS-help@... mailing list https://stat.ethz.ch/mailman/listinfo/ess-help |
|
|
Re: Is html help configurable now?Stephen Eglen wrote:
> hi Martin, > > if it is relevant, could you or someone else on Rcore say something more > about this feature -- is R moving towards building help pages on the > fly? If so, will ESS get 'left behind' if the dynamic help pages are > rendered only in html, and we don't have a way of reading them? Or is > this building of html pages for other purposes? > > (I've recently started using w3m under Emacs, and it is great for > limited browsing, so I could investigate getting ESS and w3m to > co-operate.) > > Stephen > > Hi Stephen: FWIW I've pretty much given up on w3m. Instead I use ffap: (require 'ffap) (global-set-key [button3] 'find-file-at-point) (setq browse-url-mozilla-program "firefox") Rodney ______________________________________________ ESS-help@... mailing list https://stat.ethz.ch/mailman/listinfo/ess-help |
|
|
Re: Is html help configurable now?>>>>> "StEgl" == Stephen Eglen <S.J.Eglen@...>
>>>>> on Mon, 05 Oct 2009 09:51:47 +0100 writes: >> >> And as said, I think we (ESS core) should change this >> ASAP, not the least because the upcoming R version 2.10.0 >> comes with it's own little https server and builds html >> pages on the fly... StEgl> hi Martin, StEgl> if it is relevant, could you or someone else on Rcore StEgl> say something more about this feature -- is R moving StEgl> towards building help pages on the fly? Short answer: yes. StEgl> If so, will ESS get 'left behind' if the dynamic help StEgl> pages are rendered only in html, and we don't have a StEgl> way of reading them? Or is this building of html StEgl> pages for other purposes? the main benefit currently has been the building of cross package hyperlinks (from the original Rd \link[pkg]{...}), and as 'text' output has no links, that was not considered. But note that also text output is (or can be?) produced "on the fly". One of my main reasons for not (yet?) wanting to leave emacs-buffer help is the nice emacs-like help-buffer navigation *AND* the simple one-key ("l") evaluation of examples' in the help. StEgl> (I've recently started using w3m under Emacs, and it StEgl> is great for limited browsing, so I could investigate StEgl> getting ESS and w3m to co-operate.) ideally, by using an emacs html renderer, we'd get the best of both worlds: - Fast emacs-like help buffer navigation - send R example code from the help buffer to *R* - hyperlinks between help pages (and "to outside URSs") working nicely Martin ______________________________________________ ESS-help@... mailing list https://stat.ethz.ch/mailman/listinfo/ess-help |
|
|
Re: Is html help configurable now?> StEgl> (I've recently started using w3m under Emacs, and it
> StEgl> is great for limited browsing, so I could investigate > StEgl> getting ESS and w3m to co-operate.) > > ideally, by using an emacs html renderer, we'd get the best of > both worlds: > - Fast emacs-like help buffer navigation > - send R example code from the help buffer to *R* > - hyperlinks between help pages (and "to outside URSs") > working nicely Whatever the solution will be, it would be nice to have a config parameter deactivating the redirection of help pages into an emacs buffer. Giving R courses for beginners, I observe that most students are rather familiar with web browsers than with the emacs editor. Many thanks Georg ______________________________________________ ESS-help@... mailing list https://stat.ethz.ch/mailman/listinfo/ess-help |
|
|
Re: Is html help configurable now?>>>>> "GM" == Georg Mainik <gmainik@...>
>>>>> on Mon, 05 Oct 2009 23:18:28 +0200 writes: StEgl> (I've recently started using w3m under Emacs, and it StEgl> is great for limited browsing, so I could investigate StEgl> getting ESS and w3m to co-operate.) >> >> ideally, by using an emacs html renderer, we'd get the best of >> both worlds: >> - Fast emacs-like help buffer navigation >> - send R example code from the help buffer to *R* >> - hyperlinks between help pages (and "to outside URSs") >> working nicely GM> Whatever the solution will be, it would be nice to have a config GM> parameter deactivating the redirection of help pages into an emacs buffer. Definitely! I entirely agree. Martin GM> Giving R courses for beginners, I observe that most students are rather GM> familiar with web browsers than with the emacs editor. GM> Many thanks GM> Georg ______________________________________________ ESS-help@... mailing list https://stat.ethz.ch/mailman/listinfo/ess-help |
|
|
Re: Is html help configurable now?On Mon, 05 Oct 2009 09:51:47 +0100,
Stephen Eglen <S.J.Eglen@...> wrote: [...] > (I've recently started using w3m under Emacs, and it is great for > limited browsing, so I could investigate getting ESS and w3m to > co-operate.) I've also been an asiduous user of w3m (via its Debian w3m-el Emacs interface in Debian). Since the new help system, however, the function I was using to display the html broke. I was able to get back the functionality with this: o A function in ~/.Rprofile: ---<--------------------cut here---------------start------------------->--- .rutils.help.start <- function (update=FALSE, gui="irrelevant", browser=getOption("browser"), remote=NULL) { if (!is.function(browser) && (length(browser) != 1 || !is.character(browser) || !nzchar(browser))) stop("invalid browser name, check options(\"browser\").") home <- if (is.null(remote)) { if (tools:::httpdPort == 0L) tools::startDynamicHelp() if (tools:::httpdPort > 0L) { if (update) make.packages.html() paste("http://127.0.0.1:", tools:::httpdPort, sep="") } else stop("help.start() requires the HTTP server to be running", call.=FALSE) } else remote paste(home, "/doc/html/index.html", sep="") } ---<--------------------cut here---------------end--------------------->--- that's just a hacked help.start() to return only the URL that R's http server produced. o A simple Emacs Lisp function to parse and display in w3m: ---<--------------------cut here---------------start------------------->--- (defun r-utils-htmldocs () "Use w3m to navigate R html documentation. Documentation is produced by a hacked help.start()." (interactive) (let ((rhtml ".rutils.help.start()\n") (tmpbuf (get-buffer-create "**r-utils-mode**"))) (ess-command rhtml tmpbuf) (set-buffer tmpbuf) (let* ((begurl (search-backward "http://")) (endurl (search-forward "index.html")) (url (buffer-substring-no-properties begurl endurl))) (w3m-goto-url-new-session url)) (kill-buffer tmpbuf))) ---<--------------------cut here---------------end--------------------->--- The `r-utils-mode' comes from r-utils.el, but could be set to anything else. There might be better/more efficient ways to do it, but this works well for me in GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.3) of 2009-10-23 on elegiac, modified by Debian and ESS 5.5. BTW, can I give you an updated r-utils.el (I see that the one on the website is rather old)? -- Seb ______________________________________________ ESS-help@... mailing list https://stat.ethz.ch/mailman/listinfo/ess-help |
|
|
Re: Is html help configurable now?Seb wrote:
> BTW, can I give you an updated r-utils.el (I see that the one on the > website is rather old)? > That would just be the dog chasing it's tail. Is there a link that we can provide where the latest stable version can always be found? Rodney ______________________________________________ ESS-help@... mailing list https://stat.ethz.ch/mailman/listinfo/ess-help |
| Free embeddable forum powered by Nabble | Forum Help |