Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用emacs为open运行macOS服务失败,错误为;EmacClient:无法获取终端名称mac“;_Macos_Emacs - Fatal编程技术网

使用emacs为open运行macOS服务失败,错误为;EmacClient:无法获取终端名称mac“;

使用emacs为open运行macOS服务失败,错误为;EmacClient:无法获取终端名称mac“;,macos,emacs,Macos,Emacs,我在macOS中创建了一个服务,这样我就可以根据需要使用emacs打开任何文件。该服务是使用Automator和以下shell脚本创建的: /usr/local/bin/。/cillar/emacs/25.3/bin/emacsclient-nc“$@” 而此服务将始终失败,并显示以下消息: EmacClient:无法获取终端名称 有人有线索吗?感谢转发。我能够在Automator下使用您的命令行而无需任何特殊设置,成功地将文件加载到正在运行的Emacs.app中。但我构建了自己的Ema

我在macOS中创建了一个服务,这样我就可以根据需要使用emacs打开任何文件。该服务是使用Automator和以下shell脚本创建的:

/usr/local/bin/。/cillar/emacs/25.3/bin/emacsclient-nc“$@”

而此服务将始终失败,并显示以下消息:

EmacClient:无法获取终端名称


有人有线索吗?感谢转发。

我能够在Automator下使用您的命令行而无需任何特殊设置,成功地将文件加载到正在运行的Emacs.app中。但我构建了自己的Emacs.app,而不是使用自制软件,所以这可能会有所不同。您可以尝试传递
--display ns
选项,告诉它使用Mac windowing系统,前提是您没有在终端上运行emacs。非常感谢您提供的解决方案,它对我很有效。另一个解决方法是
open-a Emacs“$@“
我可以在Automator下使用您的命令行而无需任何特殊设置,成功地将文件加载到正在运行的Emacs.app中。但是我构建了自己的Emacs.app,而不是使用自制软件,因此这可能会有所不同。您可以尝试传递
--display ns
选项,告诉它使用Mac w在Wing系统中,假设您没有在终端中运行emacs。非常感谢您提供的解决方案,它对我很有效。另一个解决方法是
open-a emacs“$@”