There is a built in emacs web browser (
eww) but it’s text-based. There are a few options for getting an actual browser in emacs.
The EAF (
emacs-application-framework) package integrates a number of apps into emacs. The browser is a full webkit browser that is overlayed onto a buffer.
It works but it’s really janky. If you move the emacs window around the browser window might not move. It doesn’t work in fullscreen.
(use-package eaf :straight (eaf :type git :host github :repo “emacs-eaf/emacs-application-framework” :files (”.el” “.py” “core” “app” “*.json”) :includes (eaf-browser) ; Straight won’t try to search for these packages when we make further use-package invocations for them :pre-build ((“python3” “install-eaf.py” “–install” “browser” “–ignore-sys-deps”) (“npm” “i” “-g” “mac-app-frontmost”))))
(use-package eaf-browser :custom (eaf-browser-continue-where-left-off t) (eaf-browser-enable-adblocker t))
You can compile emacs to include
xwidget and use
I found this to be significantly better than EAF. It works with buffers the way you expect. You can even get to the console by right clicking and selecting ‘Inspect element’.
homebrew formula for emacs is the best way to get xwidget support on a Mac.
brew install emacs-mac --with-natural-title-bar --with-native-comp --with-xwidgets
So far the only downside I can find is that you can’t open more than one browser and it crashes somewhat regularly.