[ESS] Help pops up in web browser

Naresh Gurbuxani n@re@h_gurbux@n| @end|ng |rom hotm@||@com
Tue Feb 25 11:38:46 CET 2020


This is my solution.  It enables documentation pop up in python.  But in

R, it does not cause documentation to automatically show in inferior

mode.  Actually it does something more.  In R, it now shows documentation

as pop up (just like it does in python).

Thanks everyone for their help.  I have what I need.  If you have any

suggestions for making below code simpler, that would a bonus.


;; Enable company-quickhelp in python only

(defun company-quickhelp-in-python-only ()


(setq company-quickhelp-in-python-hook 'company-quickhelp-in-python-only)

(add-hook 'python-mode-hook (lambda ()

                      (run-hooks 'company-quickhelp-in-python-hook)))

From: Julian M. Burgos <julian.burgos using hafogvatn.is>
Sent: Monday, February 24, 2020 4:29 AM
To: Naresh Gurbuxani <naresh_gurbuxani using hotmail.com>
Cc: ess-help using r-project.org <ess-help using r-project.org>
Subject: Re: [ESS] Help pops up in web browser

Hi Naresh,

But isn't company-quickhelp supposed to show you the help when you are idling on a completion candidate?  You can modify this behaviour.  According to the github page:

"You can adjust the time it takes for the documentation to pop up by changing company-quickhelp-delay.

If you don't want the help popup to appear automatically, but prefer it to the popup help buffer provided by company, you can set company-quickhelp-delay to nil and manually trigger the popup with M-h."

The problem is that for some reason the R help is showing up in a separate buffer and not on a pop-up window as it is supposed to happen with company-quickhelp.  I don't know why this happens.

I don't use python, but in R and ESS you don't need company-quickhelp if you want to call the help file yourself.  In company-mode, you can press F1 and get the help file of the candidate in the company popup window.  And ESS provides ess-display-help-on-object (by default bounded to C-c C-v) to access the help file from any function.

If company-quickhelp is working for you in Python but not in ESS, you could activate it in your Python mode hook so it is only available when working on Python.

My best,


Naresh Gurbuxani writes:

> Julian,
> I was able to solve the second problem.  Now when I type ?library, R help is displayed in an emacs window, not a browser.
> But the first problem remains.  When I type and incomplete command (e.g., "libr"), emacs displays the entire documentation of "library" in inferior ESS window.  So emacs still opens the help file, not in browser but in inferior ESS window.
> I only want help document displayed when specifically asked (e.g., by typing ?library in inferior ESS window).  Otherwise, I only want a "temporary window" which shows possible completions and documentation, but disappears when command is complete.
> Thanks,
> Naresh
> ________________________________
> From: Julian M. Burgos <julian.burgos using hafogvatn.is>
> Sent: Friday, February 21, 2020 5:03 AM
> To: Naresh Gurbuxani <naresh_gurbuxani using hotmail.com>
> Cc: ess-help using r-project.org <ess-help using r-project.org>
> Subject: Re: [ESS] Help pops up in web browser
> Hi Naresh,
> I had a similar issue recently with emacs "automatically" opening the help file from a function when I started to type it.  It took me a lot of head scratching but I figured out that the culprit was one of the company-frontends (probably interacting with some other component of my setup).  I used to have these:
> (setq company-frontends
>            '(company-pseudo-tooltip-unless-just-one-frontend
>                      company-preview-frontend
>                       company-echo-metadata-frontend))
> I replaced them for this:
> (setq company-frontends '(company-pseudo-tooltip-frontend
>                           company-echo-metadata-frontend))
> And the problem went away.  I do not know exactly why.
> I found an old discussion thread where the problem was related to a conflict between the use of autocompletion and the use of html help:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fpipermail%2Fess-help%2F2013-April%2F008868.html&data=02%7C01%7C%7Cba177f5e93a74bb77e1608d7b789820b%7C8e105b94435e4303a61063620dbe162b%7C0%7C0%7C637179673539950023&sdata=bTxbW4BwIJykt0eK%2FR3u%2BL59smgKy5VJzO%2FYpTAN17U%3D&reserved=0
> ... the problem was that help was *supposed* to show up automatically in a pop-up window, but if you had your help file show up as html (instead of plain text), you get a browser with the help file instead.
> I assume that something similar is happening now with company-mode.
> Because I prefer the help in html (because hyperlinks, and as I use EXWM and the browser shows up within an emacs buffer) in my .emacs file I have this:
> (setq inferior-ess-r-help-command "help(\"%s\", help_type=\"html\")\n")
> But if you want (or need) help in plain text you can use
> help_type=text
> to ensure that the help shows up as text.
> I hope this helps.
> Cheers,
> Julian
> Naresh Gurbuxani via ESS-help writes:
>> To display python documentation, I recently installed company-quickhelp.  While it works well for python, my emacs now has an annoying feature in ess-r mode.
>> When I linger on an R function, emacs launches a new web browser window displaying help for that function.  For example on typing �libr�, emacs launches a new browser window displaying documentation for �library�.  Moreover, the browser becomes the active application.
>> How can this feature be turned off?  I want documentation to be displayed only when asked.  Moreover, I want to see documentation in emacs window.

>> Thanks,
>> Naresh
>> Sent from my iPhone
>> ______________________________________________
>> ESS-help using r-project.org mailing list
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fess-help&data=02%7C01%7C%7Cba177f5e93a74bb77e1608d7b789820b%7C8e105b94435e4303a61063620dbe162b%7C0%7C0%7C637179673539950023&sdata=%2FNwl9Ds%2B2CTcsA35sS0yxO9KhNgAkgfLe0XeNdQTEls%3D&reserved=0

Julian Mariano Burgos, PhD
Hafranns�knastofnun, ranns�kna- og r��gjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Botnsj�varsvi�s / Demersal Division
Sk�lagata 4, 121 Reykjav�k, Iceland
S�mi/Telephone : +354-5752037
Br�fs�mi/Telefax:  +354-5752001
Netfang/Email: julian.burgos using hafogvatn.is

	[[alternative HTML version deleted]]

More information about the ESS-help mailing list