如何在 Windows 中使用 Alt 作为 Emacs 23 的元键,尤其是 Mx?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6495050/
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-15 17:12:58  来源:igfitidea点击:

How can I use Alt as meta key in Windows for Emacs 23, especially M-x?

windowsemacsmeta-key

提问by ayckoster

I tried to use Alt as meta key for the FSF Emacs 23 Windows version and for EmacsW32 but especially M-x (Alt-x) does not work.

我尝试使用 Alt 作为 FSF Emacs 23 Windows 版本和 EmacsW32 的元键,但尤其是 Mx (Alt-x) 不起作用。

Somehow I cannot use Alt as Meta key for Alt-x (M-x). I searched really hard and all I got is how to switch the meta key to Alt in w32-meta-style. Currently this variable has the value 'use Alt as Meta key'. I also tried all other values with no success. Furthermore I installed the unpatched version of emacs from http://ourcomments.org/Emacs/EmacsW32.htmland the original binaries from gnu.org. All versions have the same problem.

不知何故,我不能将 Alt 用作 Alt-x (Mx) 的 Meta 键。我真的很努力地搜索,我得到的只是如何在 w32-meta-style 中将元键切换到 Alt。当前,此变量的值为“使用 Alt 作为元键”。我也尝试了所有其他值但没有成功。此外,我安装了来自http://ourcomments.org/Emacs/EmacsW32.html的未打补丁的 emacs 版本和来自 gnu.org 的原始二进制文件。所有版本都有同样的问题。

Alt works as Meta, except for Alt-x (Meta-x).

Alt 用作 Meta,除了 Alt-x (Meta-x)。

My setup is as follows:

我的设置如下:

  • Windows 7 x64 Professional
  • German keyboard
  • Windows 7 x64 专业版
  • 德语键盘

This question is Windows specific as I have a working Ubuntu version of Emacs 23.

这个问题是特定于 Windows 的,因为我有一个可用的 Emacs 23 Ubuntu 版本。

EDIT: It was Growl for Windows. It loads on start up and caputes all Alt-x inputs. So my solution was to just disable Growl as I do not need it anymore. Might be another App for you.

编辑:它是 Windows 的 Growl。它在启动时加载并捕获所有 Alt-x 输入。所以我的解决方案是禁用 Growl,因为我不再需要它了。可能是您的另一个应用程序。

采纳答案by Joakim H?rsman

It should work out of the box. Does Alt+x work as M-x if you start Emacs with the -Q flag? That inhibits loading of your customizations, in case one of them is breaking M-x on Windows.

它应该是开箱即用的。如果使用 -Q 标志启动 Emacs,Alt+x 是否可以用作 Mx?这会阻止加载您的自定义设置,以防其中之一破坏了 Windows 上的 Mx。

Also, Emacs only treats the left Alt key as Meta by default, the right Alt (AltGr), is used for entering special characters .

此外,Emacs 默认仅将左 Alt 键视为 Meta,右 Alt (AltGr) 用于输入特殊字符。

回答by jaybee

I don't know about w32-meta-stylebut did you set w32-alt-is-meta? See http://www.gnu.org/software/libtool/manual/emacs/Windows-Keyboard.html

我不知道,w32-meta-style但你设置了w32-alt-is-meta吗?请参阅http://www.gnu.org/software/libtool/manual/emacs/Windows-Keyboard.html

回答by ens

The Growl hotkeys can be changed: https://groups.google.com/forum/#!topic/growl-for-windows/luSpf9lQQRM

Growl 热键可以更改:https: //groups.google.com/forum/#!topic/growl-for-windows/luSpf9lQQRM

To disable the hotkeys, just remove the content of the 'value' tags.

要禁用热键,只需删除“值”标签的内容。