2018.6.23追記
Summary
 El Capitan以降のMacOSでは(つまりmacOS High Sierraも)、たとえroot権限でも/usr/bin以下に書き込み権限が無い“rootless”という仕様のため、/usr/local/bin/emacsより先に/usr/bin/emacs(emacs22)が実行されるという問題があった。
 rootless設定を解除してからインストールすることで解決。
emacs 26.1にアップデートするのはbreawで簡単。
$ breaw upgrade emacsYosemiteの場合
 YosemiteではTerminalの中でemacsを実行した時に日本語が表示できないという問題がある。Emacs-macのインストール を参考にして解決
 High Sierraの場合:
 うまくいかなかったのでこのページでまとめ(2018.4.12)
デフォルトではGNU Emacs 22.1.1が入っているが,日本語がちゃんと使えないので,最新のバージョンをインストールする方が良い.
Installing GNU Emacs 25.3.1 on macOS High Sierra (version 10.13.4)
$ brew install emacs --with-cocoa
としてインストールしようとするが,コマンドラインツールスが無いと怒られる
xcrun: error: invalid active developer path\
 (/Library/Developer/CommandLineTools), missing\
  xcrun at: /Library/Developer/CommandLineTools/
  usr/bin/xcrun$ xcode-select --install
$ brew install emacs --with-cocoaこれはうまくいかなかったので別の方法も検討してみた
$ brew tap railwaycat/emacsmacport
$ brew install emacs-mac
$ brew linkapps 結論
Emacsとは別の問題で、El Capitan以降のMacOSでは(つまりmacOS High Sierraも)root権限でも/usr/bin以下に書き込み権限が無いという仕様の問題だった。 ここを参考にしてrootlessを解除することで解決。
$ csutil status
System Integrity Protection status: enabled.$ csutil disable
Successfully disabled System Integrity Protection. Please restart the machine for the changes to take effect.
$ rebootInstalling VIM version 8.0.1650
$ brew install vim
quit with “:q<ret>”