Showing posts with label ezbl. Show all posts
Showing posts with label ezbl. Show all posts

Thursday, December 31, 2009

Chomping in Emacs

While working on Ezbl, I came to the terrifying realization that Emacs doesn't have a chomp-like function to strip leading and trailing whitespace from a string. After some searching, I found a solution, but it was kind of ugly (specifying the whitespace characters exactly rather than using a character class), so I modified it a bit. Here is my result:

Saturday, December 19, 2009

Yo dawg

Yo dawg, I herd u liek Emacs, so I put an Emacs in ur Emacs so u can Emacs while u Emacs. For more information, check out my older Ezbl post. EDIT: See new Special Edition Emacs browser meme: Yo dawg, I herd u like Emacs in a browser, so I put a browser in ur Emacs so u can Emacs in ur browser in ur Emacs while u browse ur Emacs in ur browser.

Thursday, December 3, 2009

Ezbl updates

It has been a while since I last talked about Ezbl, my Emacs interface for the excellent Uzbl browser.

Monday, August 24, 2009

It's Alive!!!

Update: With version 0.1.2, opening up a page is much easier, so I have edited the instructions below.

After nearly a month of (very sporadic) work on it, I have finally done the impossible: embedded a fully-featured web browser in Emacs. Behold:



I am calling my creation "Ezbl," pronounced "ease-able." It is a combination of Uzbl and Emacs. Right now, Ezbl is still in the early stages, but it can display a Uzbl window and receive commands from Emacs (over Uzbl's STDIN).

Currently, it requires a patched version of Emacs (available here) which supports embedding widgets and windows, such as Uzbl. It is still in an early state, and any of the drawing-related problems will be caused by the xwidget code. Joakim Verona is the genius behind the xwidget code, so talk to him if you have suggestions about that aspect.

Right now, I'm using the following code to start an instance of Uzbl (which can be called interactively):


(ezbl-open "www.google.com")


You will notice that it creates a buffer called "*ezbl-display-xxxx*", where "xxxx" is the pid of the Uzbl process. To browse to a different page, execute:


(ezbl-command-uri 1234 "www.yahoo.com")


Where "1234" is the pid of the Uzbl process. This will be cleaned up in the future with an "Ezbl" major mode and interactive commands.

Just recently, I've added a live(ish) updating display of the current page title and URL to the mode-line, shown here:



The interface still needs quite a bit of work, and it is not yet possible to type into text areas of the browser window. If you are interested in helping out, I have a GitHub project here to which I regularly push.

Eventually, I plan to have Emacs manage history and cookies, as well as multiple "tabs," which will be done by having one Uzbl window per buffer. It has a long way to go, and is not at all useful for real browsing at this point, so help is greatly appreciated.

Enjoy!