Mac OS X
brew install emacs --with-imagemagick --with-gnutls --with-cocoa
更多信息可以通过 brew info emacs
来获取,
$ brew info emacs
emacs: stable 24.5 (bottled), devel 25.0.92, HEAD
GNU Emacs text editor
https://www.gnu.org/software/emacs/
/usr/local/Cellar/emacs/25.0.92 (4,054 files, 118.9M) *
Built from source with: --with-imagemagick --with-gnutls --with-cocoa
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/emacs.rb
==> Dependencies
Build: xz ✔, pkg-config ✔
Optional: d-bus ✘, gnutls ✔, librsvg ✘, imagemagick ✔, mailutils ✘, glib ✘
==> Options
--with-cocoa
Build a Cocoa version of emacs
--with-ctags
Don't remove the ctags executable that emacs provides
--with-d-bus
Build with d-bus support
--with-glib
Build with glib support
--with-gnutls
Build with gnutls support
--with-imagemagick
Build with imagemagick support
--with-librsvg
Build with librsvg support
--with-mailutils
Build with mailutils support
--with-x11
Build with x11 support
--without-libxml2
Don't build with libxml2 support
--devel
Install development version 25.0.92
--HEAD
Install HEAD version
==> Caveats
A command line wrapper for the cocoa app was installed to:
/usr/local/Cellar/emacs/24.5/bin/emacs
To have launchd start emacs at login:
ln -sfv /usr/local/opt/emacs/*.plist ~/Library/LaunchAgents
Then to load emacs now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.emacs.plist
.app bundles were installed.
Run `brew linkapps emacs` to symlink these to /Applications.
Linux
最简单的方式就是安装 LinuxBrew 后使用和 Mac 相同的方式进行安装!(感谢 jiegec 的推荐)
上面方法安装出来的是命令行版本的 Emacs。
自己从编译的方法可以在这个链接中找到:
http://ergoemacs.org/emacs/building_emacs_from_git_repository.html
信息来源于 codefalling