Old Style Fullscreen for Emacs in Homebrew

Emacs in Homebrew used to contain a patch to run in fullscreen on OS X.  When OS X Lion introduced a new fullscreen mode, Emacs upstream added support for said mode and Homebrew removed their patch.

However, until Mavericks, OS X’s fullscreen mode was rather unusable for multi-head setups, which I often use for development.  Even with Mavericks, I personally still find the native fullscreen mode somewhat annoying — specifically I frequently ?-tab between windows and am not fond of having to wait for the animation to drop things into place.

Mostly due to this frustration, I kept using an older version of Emacs up until a couple weeks ago.  However, Hemant Kumar’s recent excellent article on using Emacs for Rails development motivated me to update my Emacs to the most recent stable version and do a much needed cleanup to the cruft that I’ve been collecting around in my ~/.emacs.d for the last 15 years.

So, after a bit of Googling I realized that a non-native fullscreen mode has been added to Emacs’ Bazaar repository.  I’d rather not run Emacs from the development branch (on the day that I tried it had frequent problems with freezing whilst taking 100% CPU), so I ported the patches back to the current Emacs stable release (24.3).  The patch is here.

The good folks of Homebrew accepted my pull request, so now for all of us wishing for the older, non-native fullscreen mode, after building from current Homebrew, you just add the following to your init.el:

(setq ns-use-native-fullscreen nil)

The little fullscreen icon in the upper right goes away and you can now go into fullscreen mode by pushing F11.

Enjoy!

Read More

Localghost 1.0 Released

I’d been looking for an excuse to create a Cocoa app for a while. Even though I still switch hit between Ubuntu and OS X, I spend most of my time on OS X these days. I’d gotten Cocoa Programming for Mac OS X a while back, but had been missing that real-but-simple app idea to give it a whirl on. Until Localghost.

You see, I edit my /etc/hosts litearlly a dozen+ times a day when I want to test things in their production configuration, but with my development version. Localghost adds / removes a set of selected hosts from /etc/hosts with a system tray applet. There’s more info here:

Localghost page.

Read More