Just letting you know you might want to update the Homebrew install instructions.  Homebrew no longer supports command line options, specifically ‘—with-cocoa’ in this case.

$ brew install emacs
That will still install emacs but without a GUI.

$ brew cask install emacs
That will install emacs with cocoa.

Keep up the great work!
Michael.