Search code examples
browseremacsgoogle-chromeorg-mode

How can I make Emacs Org-mode open links to sites in Google Chrome?


Google Chrome is set as the default browser. However, it opens links in Firefox, which is undesired.

How can I make Org-mode to open links in Google Chrome?


Solution

  • Emacs 23.2 doesn't directly support Google Chrome, but it does support a "generic" browser, and something like this should work:

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

    You don't mention your OS, but if it's Windows or Mac, you can try:

    (setq browse-url-browser-function 'browse-url-default-windows-browser)
    (setq browse-url-browser-function 'browse-url-default-macosx-browser)
    

    And, if that doesn't work, there are other folks who have implemented 'browse-url-chrome. Google turned up the following link: