如何最好地集成 Emacs 和 Cygwin? [英] How to best integrate Emacs and Cygwin?

查看:24
本文介绍了如何最好地集成 Emacs 和 Cygwin?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多方法可以将 Cygwin 与 Windows 上的 Emacs 集成.EmacsWiki 展示了一些想法.以下是我找到的选项:

  1. 使用 Cygwin 附带的 Emacs.(然后找到一种方法来访问 cmd.exe,如果需要的话.)
  2. 使用 NTEmacs 和 Cygwin 作为有时"外壳.(启动 Cygwin 的特殊命令)
  3. 使用 NTEmacs 和 Cygwin 作为始终"外壳.(M-x shell 启动 cygwin)

澄清为什么".这里有几个例子,我希望在 Emacs 中使用 Cygwin:

  1. M-x whois 不适用于 NTEmacs.
  2. Wanderlust 之类的软件包包含一个对 Windows 不友好的 Makefile.
  3. 有时我只需要一个 bash shell 来做某事.

那么 Emacs/Cygwin 中的哪个选项对其他人有效?另外,有没有人成功尝试过 MSYS 集成?

解决方案

在 Cygwin 中使用 Emacs.不是 XEmacs..Emacs.我只是从 Cygwin 安装所有东西并输入以下内容来运行 Emacs:

<前>XWin - 多窗口出口显示=:0.0emacs&

像这样创建指向 C 驱动器(或任何其他驱动器)的链接也可能有帮助:

ln -s/cygdrive/c/c

我已经使用它几个月了,它总是运行良好.我经常使用 TRAMP 和 subversion 等高级功能,没有任何问题.像 cedet 这样的所有高级软件包都可以正常工作.

如果你没有注意到,我就是原海报.经过我所有的研究和尝试,这个成功了,我很高兴.Cygwin 干得好!

另外,我建议不要在 Emacs 中使用 shell.top 之类的实用程序似乎不起作用.相反,使用 MinTTY 和屏幕.Cygwin 直接在 MinTTY 中为您提供 ssh(您不需要腻子).最好的部分是我的很多 Linux 知识可以在 Windows 中无缝运行.

There are a ton of ways to integrate Cygwin with Emacs on Windows. EmacsWiki shows a few ideas. Here are the options that I've found:

  1. Use the Emacs that comes with Cygwin. (Then find a way to get to cmd.exe if you want it.)
  2. Use NTEmacs and Cygwin as a "sometimes" shell. (A special command to launch Cygwin)
  3. Use NTEmacs and Cygwin as the "always" shell. (M-x shell launches cygwin)

To give some clarity as to "why". Here are a couple of examples where I wish I had Cygwin with Emacs:

  1. M-x whois doesn't work on NTEmacs.
  2. Packages like Wanderlust include a Makefile that isn't Windows friendly.
  3. Sometimes I just need a bash shell for something.

So which option of Emacs/Cygwin works well for others? Also, has anyone tried MSYS integration successfully?

解决方案

Use the Emacs in Cygwin. Not XEmacs..Emacs. I just install everything from Cygwin and type the following to run Emacs:

XWin -multiwindow
export DISPLAY=:0.0
emacs&

It may also help to create a link to your C drive (or any other drive) like so:

ln -s /cygdrive/c /c

I've been using this for several months and it always works well. I constantly use advanced features like TRAMP and subversion without any issues. All advanced packages like cedet just work.

If you hadn't noticed, I am the original poster. After all of my research and attempts, this one worked and I am VERY PLEASED. Good job Cygwin!

Also, I recommend not using shell within Emacs. Utilities like top just don't seem to work. Instead, use MinTTY and screen. Cygwin gives you ssh directly in MinTTY (you don't need putty). The best part is that a lot of my Linux knowledge works seamlessly in Windows.

这篇关于如何最好地集成 Emacs 和 Cygwin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆