Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs (org-mode/helm-google) open links in eww?

I use emacs/ orgmode and helm-google.

When I open a page it opens it in google chrome. I would like it to open in eww. (ideally even have some way to have different hotkeys to open pages in either eww/chrome)

I tried to set var: browse-url-generic to 'eww', but no success.

I tried

(setq browse-url-browser-function 'browse-url-generic
  browse-url-generic-program "eww")

(as per How to make emacs org-mode open links to sites in Google Chrome?) but no success.

I asked the author of helm-google about this in this post, awaiting a reply?

like image 356
Leo Ufimtsev Avatar asked Mar 18 '23 02:03

Leo Ufimtsev


2 Answers

(setq browse-url-browser-function 'eww-browse-url)

should be what you're looking after.

like image 114
fniessen Avatar answered Mar 23 '23 21:03

fniessen


You should be able to just set browse-url-browser-function to 'eww.

My suggestion would be to use the customize group and select eww (it is one of the choices in the menu for the browse-url-function. If that works, you can then look at it in the custom file to see how to set it manually. Once you have that, then you could try writing your own function which allows you to select the browser you want.

like image 40
Tim X Avatar answered Mar 23 '23 19:03

Tim X