Emacs帮助系统

获得帮助系统的帮助

如下任意的快捷键 C-h C-h, C-h ?, C-h <f1>, <f1> ?, <f1> <f1>, <f1> C-h 都可以启动帮助命令 (help-for-help)

注意: C-h, <f1> 作为前缀是可以互换的,同样 C-h, <f1>, ? 作为后缀也是可以互换的, 但实际上用的最多的还是 C-h 因此以下都是以 C-h 给出的快捷键。

帮助命令

搜索命令和函数:

C-h a (apropos-command)

通过命令名搜索, 搜索条件可以是字符串,正则表达式,或者是字符串列表。 如果是空格分隔的字符串列表,这个时候搜索的是包含任意一个字符串的命令,即或(or)的关系。

该命令默认只搜索交互(interactive)函数-也被称做 命令,如果使用前缀命令 C-u C-h a 则也会搜索所有非交互的函数。

另外,通过设置 apropos-do-all 变量的值为非空, 也可以将非交互函数包含在搜索范围内。

注意: 命令(command)和函数(function)的区别,命令是交互函数(interactive).

a command-apropos. Type a list of words or a regexp; it shows a list of

commands whose names match. See also the apropos command. f describe-function. Type a function name and you see its documentation. F Info-goto-emacs-command-node. Type a command name; it goes to the on-line manual's section that describes the command.

w where-is. Type a command name; it displays which keystrokes

invoke that command.

查找键绑定

b describe-bindings. Display a table of all key bindings.

c describe-key-briefly. Type a key sequence;

it displays the command name run by that key sequence.

k describe-key. Type a key sequence;

it displays the full documentation for that key sequence. K Info-goto-emacs-key-command-node. Type a key sequence; it goes to the on-line manual's section that describes the command bound to that key.

查找命令

You have typed C-h, the help character. Type a Help option: (Use SPC or DEL to scroll through this text. Type q to exit the Help command.)

C describe-coding-system. Type the name of the coding system to describe,

or just RET to describe the ones currently in use. d apropos-documentation. Type a pattern (a list of words or a regexp), and it shows a list of functions, variables, and other items whose documentation matches that pattern. See also the apropos command.

I describe-input-method. Describe a specific input method (if you type

its name) or the current input method (if you type just RET). l view-lossage. Show last 100 characters you typed. L describe-language-environment. This describes either a specific language environment (if you type its name) or the current language environment (if you type just RET). m describe-mode. Display documentation of current minor modes, and the current major mode, including their special commands.

p finder-by-keyword. Find packages matching a given topic keyword.

s describe-syntax. Display contents of syntax table, plus explanations.

S info-lookup-symbol. Type a symbol; it goes to that symbol in the

on-line manual for the programming language used in this buffer.

v describe-variable. Type name of a variable;

it displays the variable's documentation and value.

t help-with-tutorial. Select the Emacs learn-by-doing tutorial.

r info-emacs-manual. Display the Emacs manual in Info mode. i info. The Info documentation reader: read on-line manuals.

e view-echo-area-messages. Go to the buffer that logs echo-area messages.

几乎没用的命令

C-h h 显示一个包含多语言文本的“你好”文件。 Display the HELLO file which illustrates various scripts.

C-a Display information about Emacs. C-c Display Emacs copying permission (GNU General Public License). C-d Display Emacs ordering information. C-m Display how to order printed Emacs manuals. C-p Display information about the GNU project. C-w Display information on absence of warranty for GNU Emacs.

C-e Display info about Emacs problems. C-f Display the Emacs FAQ. C-t Display the Emacs TODO list. C-n Display news of recent Emacs changes. n view-emacs-news. Display news of recent Emacs changes.

C-h . 当上下文中出现链结的时候,命令在minibuffer中显示链结的详细信息(但一般没有用) display-local-help. Display any available local help at point

in the echo area.

Context Help

C-h v C-h f

上下文帮助:

在使用 M-x <command> 输入命令的时候, 或者修改变量值的时候,或者编写Elisp脚本, 如果不确定函数和变量的名称,可使用上下文相关的帮助.

自动补全

变量,函数,命令..

Wiki comments powered by Disqus