Prolific Japanese hacker Daisuke Murase (a.k.a. typester) has recently patched Cocoa Emacs to add a full-screen display mode. Here's how to add this must-have feature into your own local Emacs tree while you wait for it to get integrated into the official Emacs sources.
Let's start with the assumptions that using the latest dev version of Emacs is a Good Thing, and that full-screen display is a feature so wonderful (particularly on laptops) that it's worth some small effort to obtain.
I build my Emacs from a local copy of the official Emacs git repo, which is automatically updated from the master bzr tree. Just a "git pull", and I'm up to date.
I don't want to build from typester's repo because it hasn't been updated from upstream since December.
So I add typester's repo as an additional remote:
$ git fetch typester
However, I find that his feature branch doesn't merge cleanly with the official clone, perhaps because he started with a different git clone of the emacs sources.
Looking at the history of typester's branch, the last upstream change was a3585f6c2a. So, to apply the changes he made on my current branch:
$ git diff a3585f6c2a typester/feature/fullscreen | patch -p1
And I see it applies without any conflicts! Great! (Here's a copy of the patch as it looks today.)
Now I can build as usual:
$ make && make install
$ mv nextstep/Emacs.app /Applications/
To toggle full-screen mode inside emacs:
M-x ns-toggle-fullscreen







Since creating the patch, that's exactly what I've been doing, both against the master and emacs-23 branches -- I switch back and forth between the two.
@Oscar:
If you look at the logs at the Savannah Emacs git repo; it has not been updated since December 2009 - http://git.savannah.gnu.org/cgit/emacs.git/log/
@Steve:
Great idea on having the two remotes in one local GIT to have both the latest Emacs and the Fullscreen patch. I wonder if instead of creating a separate patch (and eventual merge) as you did, could you just rebase Typester's patch onto the current HEAD (or a specific released tag if you didn't want truly bleeding edge.
Glad to hear it worked out so easily for you. I've been working from the base git repo at http://repo.or.cz/r/emacs.git, hence the merging issues -- perhaps the savannah.gnu.org repo you reference might indeed be a better choice.
I set one up at
http://github.com/ob/emacs/commits/ob/masterwhere it is merged.
I got the emacs repo from the savannah server:
git clone git://git.savannah.gnu.org/emacs.gitand then added the typester repo, fetched it and ran
git merge typester/feature/fullscreenwhich seems to work.
Thanks for this post, I'm enjoying full screen mode in emacs 23 now.