1

I want to try out and compare both the Cocoa- and X11-based versions of Emacs.

In general, I try to install all such packages through Homebrew, but in this case it looks like I Homebrew requires me to choose one of the two versions.

Is there a way for Homebrew to install and simultaneously manage two parallel installations of Emacs?

If not, I suppose that I'd install/manage one of the two versions with Homebrew, and the other one "by hand". In this case, however, I'd like the non-Homebrew installation to be configured and built exactly as Homebrew would. This means configuring the build in the same way as Homebrew does, except for those aspects of the installation (e.g. locations of runtime files) that would directly conflict with Homebrew's Emacs installation.

What's the simplest way to generate an installation script that would faithfully replicate Homebrew's build for one of these two versions of Emacs?

(I imagine that the task mentioned in the last question would be a triviality for Ruby programmers, but I don't know the first thing about Ruby. I write code for a living, though, so solutions involving some programming–say, python/perl/bash scripting–would be fine with me.)

BTW, the solution does not have to be "super maintainable", since I expect that after running this side-by-side comparison for at most a few months I'll pick one of the two versions, and stick with it from then on.


Background
For many, many years I've been happily running Emacs on Terminal, in text-only mode. What makes this set-up less ideal than it has been so far is that now I want to start using Emacs' Org Mode, which has many key combinations that don't get correctly transmitted by Terminal. For example, when I type M-S-<right>, what Emacs actually receives—via Terminal—is M-<right>. This is a known issue, and there are official work-arounds for it, but I'd prefer to avoid them altogether if I can. My hope is that one or both of the versions of Emacs mentioned in this question will do this. But, since I've been using Emacs 5-10 hrs/day for almost three decades now, I've become quite sensitive to the details of my interaction with it. This is why I want to try both the Cocoa- and X11-based versions of it side-by-side before settling for one. If neither fits the bill, I'll try AquamacsEmacs. I tried AE several years ago, but it did not win me over (for reasons I can no longer remember), so I see AE as a distant third choice.

3

In this case I would install Aquamacs or Emacs for OS X to get the Cocoa version and Homebrew for the X11 version.

Aquamacs is tuned to appear more Mac like so might not do exactly what you want - but all this is done in configuration so easy to change for an emacs veteran

  • Homebrew no longer supports --with-x as an option (only --with-cocoa) so this solution no longer works - I'm posting a (not-ideal) answer below – Colin Sep 11 '17 at 0:13
1

Homebrew no longer supports the --with-x option, but you can build an x11 version of emacs for OS X from the source pretty easily.

configure --with-x --without-makeinfo --with-jpeg=no --with-gif=no --with-tiff=no

However I had to do a couple of hacky things to make this work and I'm not sure why. To get the configure script you have to use autoconf, which by default will generate a configure that builds the cocoa version. It seems to be necessary to use the '--enable_ns=no' option to prevent this (ns for nextstep), however neither configure nor autoconf recognizes this option for some reason. So I had autoconf generate configure and then went in and manually set with_ns=no at some point in configure.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .