Thursday evening I felt smart and decided to clear some space in my boot partition on my Linux Mint computer with apt autopurge. What this does is to clear the old kernels and clear space along with any libraries apt figures we don’t need.

The issue with this is that apt didn’t know I needed certain libraries that came with Emacs. That’s because I didn’t install Emacs with apt, but built it directly from source - to get a later version. The next day, Emacs didn’t launch and complain some essential library was missing.

The solution was to follow my instructions and install Emacs from source, but here I encountered a catch-22: the instructions were in org-mode inside Emacs, which wouldn’t launch.

Instead of taking out my laptop or switching to the Mac, I decided to deal with it sleep deprived, which is something that happens to me often. This, in turn, led to more frustration as I forgot the steps. Eventually, I gave up and went to sleep (which was the smartest thing I had done up to that point).

The next day I looked for help in Emacs IRC. The folks there helped me enough to fix the issue. Now that I have my notes again, I’m putting those here in my blog (as well as on my wiki), so I always have it handy for myself and for you, if you happen to be that sort of geek.

Here are my original instructions based on xahlee’s blog with some additional notes to help.

One last thing regarding Emacs chat on IRC: When going there using the web interface, use the UI to connect to the Emacs channel. Typing “Emacs” directly will open a new Emacs channel with you as the only person in there.

The Process:

  1. Download the gz file from the GNU at savannah.gnu.org/projects/emacs.
  2. Untar using your file manager or tar -xvf path/to/file
  3. In the Mint menu, look for Software Sources, under Optional Sources turn on Source code repositories.
  4. Install essential build tools in the terminal: sudo apt-get install build-essential
  5. Get the dependencies using alt: sudo apt-get build-dep emacs

You can now build emacs:

  1. cd to Emacs download dir, run ./configure
  2. run make
  3. now run sudo make install
  4. launch Emacs from terminal