用于调用“GUI样式”的Emacs M-x命令,菜单 [英] Emacs M-x commands for invoking "GUI-style" menus

查看:319
本文介绍了用于调用“GUI样式”的Emacs M-x命令,菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:如何在Emacs-variant使用操作系统特定的桌面功能的情况下,找到用于在Emacs中执行基于GUI的操作的Mx等效命令?

Question: How could I find out the M-x equivalent commands for doing GUI-based operations in Emacs, in those cases where my Emacs-variant uses OS-specific desktop functionality?

背景:常规理解表示,Emacs中的所有内容都是一个命令,只要知道命令的名称,就可以通过Mx调用命令。假设此语句是正确的,在基于桌面的Emacs变体中,找到用于触发GUI样式菜单的命令名称的方法是什么?

Background: Conventional understanding states that everything in Emacs is a command, and that commands can be invoked via M-x, as long as you know the name of the command. Assuming this statement is correct, what is the way to find the name of the commands used to trigger the "GUI-style" menus in a "desktop" based Emacs variant?

例如,如果我鼠标选择文件菜单打开一个文件,操作系统特定的GUI样式文件打开对话框弹出,等待我的输入。

For example, if I were to mouse-select the File menu to open a file, the OS-specific "GUI" style file-open dialog pops up, waiting for my input.

我如何找到用于执行完全相同的事情的Mx等效命令?

How could I find out the M-x equivalent command for doing the exact same thing?

我我需要知道的,但它是指示使用:

I thought that describe-key would tell me what I needed to know, but it's indication to use:

   M-x menu-find-file-existing

不会调用GUI样式文件 - 打开对话框。

doesn't invoke the "GUI" style file-open dialog. Instead, it uses the Emacs internal non-GUI-OS-neutral variant.

推荐答案

您需要诱使Emacs认为键盘没有被使用,这不像诱骗它认为使用鼠标一样直观。 :)

You need to trick Emacs into thinking that the keyboard was not being used, which is not as intuitive as tricking it into thinking that the mouse was used. :)

(defadvice find-file-read-args (around find-file-read-args-always-use-dialog-box act)
  "Simulate invoking menu item as if by the mouse; see `use-dialog-box'."
  (let ((last-nonmenu-event nil))
    ad-do-it))

在WinXP上的Emacs 22.2.1上测试。我相信这个范例已经存在了一段时间,所以它应该在老的Emacs上工作。没有线索,如果XEmacs工作类似或不。

Tested on Emacs 22.2.1 on WinXP. I believe the paradigm has been around for a while, though, so it should work on older Emacs. No clue if XEmacs works similarly or not.

这篇关于用于调用“GUI样式”的Emacs M-x命令,菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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