E is a brilliant text editor: it's simple, light weight, and has all the features I want from an editor. In fact, most of these were shamelessly stolen from TextMate, which is everyone's preferred editor on the Mac, but that's not the point. The people behind the E text editor have released their source code under a strange, not-quite-open-source license. While it's a shame they didn't really open source this little gem of an application, they did give us Linux users free play:
The editor could not have been build without the support of a lot of open source projects (most notably wxWidgets). So to give back, the Linux version will be totally free (as in beer).
To satisfy my addiction with block-selection in text files, I decided to download the source and try getting it to build.
E depends on quite a bit of packages, most of which are missing from your average Fedora installation. E also uses a slightly modified WebKit, it seems, which in turn has a collection of dependencies you'll have to satisfy. I'm assuming you have all the required build tools installed.
To install all dependencies for E, run this as root:
yum install wxGTK-devel glib2-devel atk-devel libcurl-devel libtomcrypt-devel libtommath-devel
And in order to be able to build WebKit, you'll need to do the following:
yum install libxml2-devel libxslt-devel libsqlite3x-devel libicu-devel libjpeg-devel gperf
You'll also need Bakefile, a system that generates platform-specific makefiles for cross platform projects. Unfortunately, they do not provide Fedora RPMs, nor is the package available in the default repositories. You can however simply download a tarball here, and then unleash rpmbuild on the archive:
rpmbuild -ta bakefile-0.2.6.tar.gz
sudo rpm -i ~/rpmbuild/RPMS/*/bakefile-0.2.6-1.i386.rpm
Now we can finally download the actual E code and start building. To get the code, run:
git clone git://github.com/etexteditor/e.git
Make sure the path to the source code doesn't contain any spaces, since WebKit can't handle those.
First, we need to build all the dependencies that come with E. To download these, move into the externals
and run:
./get_externals_linux.sh
Then you can go ahead and build them:
./build_externals_linux.sh debug
With all that out of the way, we can finally build E itself. Move into the src
folder of the source tree (that's cd ../src
if you're coming from the externals folder). One minor issue with building on Fedora is that we're using the libtomcrypt that's included in the repositories, not the one we built ourselves. Because of this, make is looking in all the wrong places to find the include files, but a small modification to the Makefile
will set that straight. So fire up your favourite editor, open Makefile
and look for a line like this:
INCLUDES = $(WXINCLUDES) $(OURINCLUDES) $(GTKINCLUDES) -I../ecore -I.
and change it to:
INCLUDES = $(WXINCLUDES) $(OURINCLUDES) $(GTKINCLUDES) -I../ecore -I. -I/usr/include/tomcrypt
There's also a bug I found and fixed (details), which stops E from displaying most files in the Project Pane. To fix it just run:
wget http://fixnum.org/public/e/projectpane_icons_fix.patch
patch -p1 projectpane_icons_fix.patch
UPDATE: This is no longer needed, E now builds fine with the libtomcrypt found in the externals directory and this patch (and many more I and other people made) have been merged into the master tree.
And now we're finally ready to start the actual building:
make DEBUG=1
So now you have a fine, shiny E binary that listens to the name e.debug
. It's a healthy little baby, but a little on the chubby side, weighing in at 256MB. To trim it to 25MB, you can use strip
, which removes a bunch of debugging information:
strip e.debug -o e.stripped
Now when you fire E up, it greets you with a nice "assertion failed" dialog window. No big deal, you think, clicking continue to get rid of it. But whenever you type something in the editor area, you get another one. At first, I was a bit startled by this, and thought it was just plain broken. However, it turns out that it's just because E doesn't have any language bundles installed, and the syntax highlighting can't handle not finding any bundles. You'll also need some themes, if you want your code to look all shiny and colourful. I've uploaded a tarball with all themes and bundles available, to install all this, run:
wget http://fixnum.org/public/e/e-bundles-themes.tgz
tar xzf e-bundles-themes.tgz -C ~/.e/
At this point, you should have a nice, semi-working E running on your system. Sure, you'll run into some of those nasty assertion failures from time to time, but isn't that what living on the edge is all about?
If you run into a problem following my instructions, or possibly even a fix for said problem, feel free let me know.