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
This commit is contained in:
parent
ef4b9c52f9
commit
351c585389
1 changed files with 19 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue