【发布时间】:2018-03-02 23:59:39
【问题描述】:
因此,当我尝试使用 Automator 服务打开新的 emacs(带有 spacemacs 的 GNU 版本 25.2)缓冲区时,我遇到了一些非常奇怪的行为。
在我的终端中,emacsclient -a '' -c 命令按预期工作,通过 emacsclient 打开一个新缓冲区。但是,当我在 Automator 中创建一个只运行 (/bin/bash) shell 脚本的服务时:
emacsclient -a '' -c
我收到一条错误消息:
The action “Run Shell Script” encountered an error: “emacsclient: could not get terminal name”
怀疑这是由于 Automator 没有使用一些默认的 PATH 变量,我尝试了以下方法:
PATH=/usr/local/bin:$PATH
emacsclient -c
这产生了与以前相同的错误。
接下来我尝试了
PATH=/usr/bin:/usr/local/bin export PATH;
emacsclient -c
这产生了 不同的 错误消息:
The action “Run Shell Script” encountered an error: “emacsclient: invalid option -- c
Try `emacsclient --help' for more information”
但是,为什么我在终端中尝试该脚本,它也给出了类似的错误,这对我来说没有多大意义。
如果有人对如何解决此问题有任何建议,我将不胜感激。
【问题讨论】:
标签: emacs terminal automator spacemacs emacsclient