Hi Tyler:

Almost!  That code has a stray comment in the last line.  But I�ve tested
this and it works on both macOS and Linux�.


(defun ess-eww ()
  (interactive)
  (let ((BUF (generate-new-buffer "URL"))
        (PORT))
    (ess-command "print(tools::startDynamicHelp(NA))" BUF)
    (with-current-buffer BUF
      (setq PORT (buffer-substring (search-forward-regexp "\\[1\\] ")
(point-max)))
      (message (buffer-substring (point-min) (point-max))))
    (kill-buffer BUF)
    (eww (concat "http://127.0.0.1:"; PORT "/doc/html/index.html"))))

N.B. the second to last string might be transformed into a URL rather than text.
So, here I am escaping it by substituting all-CAPS for those who need that...
"HTTP://127.0.0.1:"


--

Rodney Sparapani, Associate Professor of Biostatistics

Director, Wisconsin Chapter of the American Statistical Association

Division of Biostatistics, Data Science Institute

Medical College of Wisconsin, Milwaukee Campus



        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help

Reply via email to