简体   繁体   English

OS X上的Emacs 23-不会分配伪终端,因为stdin不是终端

[英]Emacs 23 on OS X - pseudo terminal will not be allocated because stdin is not a terminal

I installed Emacs 23 on OS X (the NS/Cocoa variant) and I got the following error when I tried to run ssh from a shell inside emacs. 我在OS X(NS / Cocoa变体)上安装了Emacs 23,当我尝试从emacs内的shell运行ssh时出现以下错误。

"pseudo terminal will not be allocated because stdin is not a terminal". “因为stdin不是终端,所以不会分配伪终端”。

Searching around the web tells me that it is because stdin is somehow a pipe instead of a real tty. 网上搜索告诉我,这是因为stdin某种程度上是管道而不是真正的tty。 I confirmed that by running stty. 我通过运行stty确认了这一点。

Unfortunately, no one really seems to know how to fix it. 不幸的是,似乎没有人真的知道如何解决它。 There were suggestions to try and modify process-connection-type (some said set it to nil while others said t) but unfortunately, neither seems to work. 有建议尝试修改process-connection-type(有人说将其设置为nil,而另一些人说为t),但不幸的是,这两个似乎都不起作用。

How do I fix this and get back usage of ssh (and I guess other tools like ftp, latex and anything that needs a tty) inside emacs's shell? 如何解决此问题并在emacs的外壳中恢复使用ssh(我猜想其他工具,例如ftp,乳胶和任何需要tty的工具)的用法?

[update: I know of Mx term but that isn't a solution for me. [更新:我知道Mx术语,但这对我来说不是解决方案。 I have confirmed that this works for me on Carbon Emacs 22.3 so this might be something specific about the NS post) 我已经确认这可以在Carbon Emacs 22.3上使用,所以这可能与NS帖子有关)

I figured this out. 我想通了。 I had some piece of elisp in my .emacs which was setting process-connection-type to nil. 我的.emacs中有一些elisp,将process-connection-type设置为nil。 Though this was needed for Carbon Emacs, it doesn't seem to be needed for NS Emacs 23. Setting it to t fixes it 尽管Carbon Emacs需要此功能,但NS Emacs 23似乎不需要此功能。

您使用的是Mx Shell还是Mx term,term是一个完善的终端仿真器,可让您运行所需的任何控制台应用程序。

Mx ansi-term MX期

Character to defy 15 char limit. 违反15个字符限制的字符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM