Browser in GNU Emacs

There are two ways to browse rich web on GNU Emacs - both of them involves xwidget. Notice the different symbols (widget and socket) passed to (xwidget-insert) command. Apart from the technical difference, widget is keyboard oriented and socket is mouse oriented from usability perspective.


Inbuilt webkitgtk2 widget

Since it's inbuilt (runs in same process as Emacs), it is better integrated with Emacs compared to the other option. There are keyboard commands to manage the browsing. Though this flickers a lot to suit my taste. Also, input handling is a bit cumbersome.
 
(setq w (xwidget-insert (point) 'webkit "test" 400 600))

External Surf browser

Surf browser also uses webkitgtk2. It's the only browser which supports XEmbed protocol. This means you can use mouse and keyboard normally as you'd do while browsing web.
 
With my patch , you should be able to invoke surf as below:
 
(setq w (xwidget-insert (point) 'socket "test" 400 600 '(:init "/usr/local/bin/surf -e %lu google.com")))

Be careful with the location of the executable (/usr/local/bin/surf) and the start page (google.com).



Comments

  1. While I appreciate that this blog in on a G**gle property, you are talking about a piece of software committed to use freedom and privacy. Maybe the example should use duckduckgo.com rather than the data-stealing default search

    ReplyDelete

Post a Comment

Popular posts from this blog

GNU Emacs as a Comic Book Reader

Data Visualization with GNU Emacs

Mozilla Readability in GNU Emacs