两个 AppleScript 文件,弄了好久一直是一开始几次窗口能够自动前置,可是后来却不会前置了,终于弄好分享下 一个是 Emacs Client.app 的:
try
set frameVisible to do shell script "/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -e '(<= 2 (length (visible-frame-list)))'"
if frameVisible is not "t" then
do shell script "/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c -n"
do shell script "open -a Emacs"
end if
end try
还有 Emacs Daemon 的:
do shell script "/Applications/Emacs.app/Contents/MacOS/Emacs --daemon"