Emacs 服务器模式,分享用 AppleScript 启动 emacsclient 的配置 ,能够永远点击前置窗口的

2018-11-26 20:05:47 +08:00
 henryshen233

两个 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"
1355 次点击
所在节点    程序员
1 条回复
henryshen233
2018-11-26 20:06:28 +08:00
新建 AppleScript 文件然后保存为.app 文件到 Applications 文件夹即可

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/511719

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX