diff options
| author | Sascha Vincent Kurowski | 2014-10-22 00:07:20 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2014-10-22 09:16:22 +0100 |
| commit | 8c37f5cd0416c36715ef5468e1070a76c3bedd06 (patch) | |
| tree | 937084028a538a63f2b35822a58aaeeff49b1b44 /Library | |
| parent | 0e4824e2d393070134f280b37c5848d5da5ef43d (diff) | |
| download | homebrew-8c37f5cd0416c36715ef5468e1070a76c3bedd06.tar.bz2 | |
emacs: add launchd plist for server daemon.
Since emacs version 23.1 the emacs executable accepts a --daemon flag
which will start emacs as a server daemon. You can then connect to the
server using emacsclient (reducing startup time etc).
See http://www.emacswiki.org/emacs/EmacsAsDaemon#toc7
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/emacs.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb index c91b736b9..88f6eea6c 100644 --- a/Library/Formula/emacs.rb +++ b/Library/Formula/emacs.rb @@ -114,6 +114,25 @@ class Emacs < Formula end end + def plist; <<-EOS.undent + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> + <plist version="1.0"> + <dict> + <key>Label</key> + <string>#{plist_name}</string> + <key>ProgramArguments</key> + <array> + <string>#{opt_bin}/emacs</string> + <string>--daemon</string> + </array> + <key>RunAtLoad</key> + <true/> + </dict> + </plist> + EOS + end + test do assert_equal "4", shell_output("#{bin}/emacs --batch --eval=\"(print (+ 2 2))\"").strip end |
