Windows 中的 Emacs

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41300/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 05:12:00  来源:igfitidea点击:

Emacs in Windows

windowsemacs

提问by sverrejoh

How do you run Emacs in Windows?

你如何在 Windows 中运行 Emacs?

What is the best flavor of Emacs to use in Windows, and where can I download it? And where is the .emacs file located?

在 Windows 中使用的最佳 Emacs 风格是什么,我在哪里可以下载它?.emacs 文件在哪里?

采纳答案by Sébastien RoccaSerra

I use EmacsW32, it works great. EDIT: I now use regular GNU Emacs 24, see below.

我使用EmacsW32,效果很好。编辑:我现在使用常规的 GNU Emacs 24,见下文。

See its EmacsWiki pagefor details.

有关详细信息,请参阅其EmacsWiki 页面

To me, the biggest advantage is that:

对我来说,最大的优势在于:

  • it has a version of emacsclient that starts the Emacs server if no server is running (open all your files in the same Emacs window)
  • it includes several useful packages such as Nxml
  • it has a Windows installer or you can build it from sources
  • 它有一个 emacsclient 版本,如果没有服务器正在运行,它会启动 Emacs 服务器(在同一个 Emacs 窗口中打开所有文件)
  • 它包括几个有用的包,例如 Nxml
  • 它有一个 Windows 安装程序,或者您可以从源代码构建它

And concerning XEmacs, according to this postby Steve Yegge:

关于 XEmacs,根据Steve Yegge 的这篇文章

To summarize, I've argued that XEmacs has a much lower market share, poorer performance, more bugs, much lower stability, and at this point probably fewer features than GNU Emacs. When you add it all up, it's the weaker candidate by a large margin.

总而言之,我认为 XEmacs 的市场份额要低得多,性能更差,错误更多,稳定性要低得多,而且在这一点上可能比 GNU Emacs 的功能更少。当你把这一切加起来时,它是较弱的候选人。

EDIT: I now use regular GNU Emacs 24. It also contains Nxml, can be installed or built from sources, and with this wrapper, the Emacs server starts if no server is running. Cheers!

编辑:我现在用的普通GNU Emacs的24.它也包含Nxml,可以安装或从源代码构建的,并与此包装,Emacs的服务器开始,如果没有服务器正在运行。干杯!

回答by Carl Seleborg

Note that GNU Emacs for Windows comes with two executables to start Emacs: "emacs.exe" and "runemacs.exe". The former keeps a DOS-Prompt window in the background, while the latter does not, so when if you choose that distribution and want to create a shortcut, be sure to launch "runemacs.exe".

请注意,用于 Windows 的 GNU Emacs 带有两个可执行文件来启动 Emacs:“emacs.exe”和“runemacs.exe”。前者在后台保留一个 DOS-Prompt 窗口,而后者则没有,因此当您选择该发行版并想要创建快捷方式时,请务必启动“runemacs.exe”。

Carl

卡尔

回答by cristobalito

Easiest way to find where the user init file is:

查找用户 init 文件位置的最简单方法:

C-h v user-init-file

Easiest way to open it is (in the scratchbuffer):

打开它的最简单方法是(在暂存缓冲区中):

(find-file user-init-file)

and hit C-j to eval

并点击 Cj 进行评估

回答by Mike Stone

Well, I personally really like what I have been using since I started with Emacs, which is GNU Emacs. It looks like it is built for windows too. That link also answers your .emacs file question. Here is a place you can download it. You should probably get version 22.2 (the latest).

嗯,我个人真的很喜欢自从我开始使用 Emacs 以来我一直在使用的东西,也就是 GNU Emacs。看起来它也是为Windows构建的。该链接还回答了您的.emacs 文件问题这是一个你可以下载它的地方。您可能应该获得 22.2 版(最新版本)。

If this is your first time, I hope you enjoy it! I know I absolutely love emacs!

如果这是您的第一次,希望您喜欢!我知道我非常喜欢 emacs!

回答by Brian Carlton

I run it under cygwin. That also gives me a Unix-ish environment for shelling out commands with meta-!

我在 cygwin 下运行它。这也为我提供了一个 Unix-ish 环境,用于使用 meta-!

回答by mkasberg

I use a vanilla version of emacs. In my experience, this is very stable, simple, does everything I need, and doesn't add a bunch of bloat that I don't need. The .emacsfile can be placed in C:\Users\YourNameif the HOMEenvironment variable is set. This is a great way to handle it because it works on a user basis and mimics emacs behavior on Linux. You can download the zip from any gnu software repository mirrorin the emacs/windowsfolder. You want the file that is named emacs-xx.x-bin-i686-pc-mingw32.zip.

我使用emacs的香草版本。根据我的经验,这非常稳定、简单,可以完成我需要的一切,并且不会增加我不需要的一堆膨胀。如果设置了HOME环境变量,.emacs文件可以放在C:\Users\YourName 中。这是处理它的好方法,因为它以用户为基础工作并模仿 Linux 上的 emacs 行为。您可以从emacs/windows文件夹中的任何 gnu 软件存储库镜像下载 zip 。您需要名为.emacs-xx.x-bin-i686-pc-mingw32.zip

There are some great instructions for configuring emacs for windows here. Basically, "installation" boils down to:

有配置的Emacs的Windows一些伟大的指示在这里。基本上,“安装”归结为:

  1. Download emacs from a gnu mirrorat emacs/windows/emacs-version-bin-i686-pc-mingw32.zip, and extract the zip to an appropriate folder. Preferably C:\emacsto avoid spaces in the filename.
  2. Set the HOMEenvironment variable to C:\Users\username(or whatever you want). Make it a user-only variable (if it is username-specific). This is where your .emacsfile goes.
  3. If you want a start menu or desktop shortcut, create a shortcut to bin/runemacs.exe.
  4. Add c:\emacs\emacs-xx.x\bin\to your path (user or system), so that you can run it from the command line.
  1. 从位于emacs/windows/emacs-version-bin-i686-pc-mingw32.zip的 gnu镜像下载 emacs ,并将 zip 解压缩到适当的文件夹。最好是C:\emacs以避免文件名中出现空格。
  2. HOME环境变量设置为C:\Users\username(或任何你想要的)。使其成为仅限用户的变量(如果它是特定于用户名的)。这是您的.emacs文件所在的位置。
  3. 如果您想要开始菜单或桌面快捷方式,请创建bin/runemacs.exe的快捷方式。
  4. c:\emacs\emacs-xx.x\bin\ 添加到您的路径(用户或系统),以便您可以从命令行运行它。

回答by imriss

Also, you can consider emacs-w64 for 64bit windows systems:

另外,对于 64 位 Windows 系统,您可以考虑使用 emacs-w64:

emacs-w64: http://sourceforge.net/projects/emacsbinw64/

emacs-w64http: //sourceforge.net/projects/emacsbinw64/

回答by Henry

See http://www.gnu.org/software/emacs/windows/ntemacs.html. Section 2.1 describes where to get it, and section 3.5 describes where the .emacs file goes (by default, in your home directory, as specified by the HOME environment variable).

请参阅http://www.gnu.org/software/emacs/windows/ntemacs.html。第 2.1 节描述了从哪里获取它,第 3.5 节描述了 .emacs 文件的去向(默认情况下,在您的主目录中,由 HOME 环境变量指定)。

回答by boskom

I suggest you to use development version of GNU Emacs 23, which is pretty stable and to be released relatively soon. You can get weekly binary builds from the link below.

我建议你使用 GNU Emacs 23 的开发版本,它非常稳定并且很快就会发布。您可以从下面的链接获得每周的二进制版本。

Latest GNU Emacs as a zip archive

最新的 GNU Emacs 作为 zip 存档

回答by gerikson

I've run both GNU emacs and Xemacs on windows. I used to use it as my primary editor, email client etc, but not it's "just" an editor.

我已经在 Windows 上运行了 GNU emacs 和 Xemacs。我曾经将它用作我的主要编辑器、电子邮件客户端等,但它不“只是”一个编辑器。

When I recently reinstalled to Vista I installed the latest GNU version. It works fine. So does Xemacs, but it does look like GNU have got their sh*t together so Xemacs isn't as compelling anymore.

当我最近重新安装到 Vista 时,我安装了最新的 GNU 版本。它工作正常。Xemacs 也是如此,但看起来 GNU 确实把他们的东西放在了一起,所以 Xemacs 不再那么引人注目了。