Emacs:打开特定的“信息”部分 [英] Emacs: Open a specific Info section

查看:79
本文介绍了Emacs:打开特定的“信息”部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行描述功能信息时,文档说:从程序中调用,FILE-OR-NODE可能会指定形式为(FILENAME)NODENAME。

When i do describe-function info, documentation says: Called from a program, FILE-OR-NODE may specify an Info node of the form "(FILENAME)NODENAME".

我使用此语法在Emacs手册中打开特定的部分,例如 eval-表达式(信息(emacs)mark)

I used this syntax to open specific sections in Emacs manual like eval-expression (info "(emacs)mark").

但是现在我有三个问题:

But now i have three questions:


  • 如何找出某个信息文件的文件名? (例如: Emacs Lisp简介中的 elisp)

  • 如何查找节名称? (例如:标记和 11的标记)

  • 是否可以在通过 eval-expression调用信息文件之前列出信息文件及其部分。

  • 可选:是否可以在不运行信息模式的情况下完成上述所有操作?

  • How to find out filename of a certain info file? (example: "elisp" for Emacs Lisp Intro)
  • How to find out the section name? (example: "mark" for "11 The Mark and the Region")
  • Is it possible to list info files and their sections before calling one with eval-expression?
  • Optional: is it possible to do all of the above without running info mode?

为了澄清,我的问题来自以下事实:节点名称(例如: Shell)和相应节的标题(例如:从Emacs运行36个Shell命令)是不同的。

To clarify, my questions arise from the fact that the node name (example: "Shell") and title of a corresponding section (example: "36 Running Shell Commands from Emacs") differ.

推荐答案



  • 如何找出某个信息文件的文件名? (例如:Emacs Lisp简介的 elisp)

Ch * info * 缓冲区中的 m 将告诉您 c 键将输入名称终止环中的当前信息节点(以及在回显区域中显示它)。从那里可以像往常一样使用 Cy 来拉它。

C-hm from the *info* buffer will tell you that the c key will Put name of current Info node in the kill ring (as well as displaying it in the echo area). From there you can yank it with C-y as usual.

括号中的节点名称部分文件名(减去后缀和目录路径)。

The part of the node name in parenthesis is the name of the file (minus its suffix, and directory path).

获取文件名包括的目录路径(但仍减去任何后缀) ),您可以为所涉及的文件(示例中为 emacs)调用(信息查找文件文件)

To obtain the filename including its directory path (but still minus any suffix), you can call (Info-find-file "file") for the file in question ("emacs" in your example).

请注意,文件的后缀(如果有)可以是 Info-suffix-list 变量中的任何内容。

Note that the suffix for the file (if any) can be anything in the Info-suffix-list variable.

实际上,您也可以传递完整的文件路径作为 info 函数的参数。这通常 没什么用,但是如果您最终遇到了冲突的信息文件,可能会很方便。交互式地, Cu Ch i 会提示您输入完整的文件名。

You can in fact pass a full file path as the argument to the info function as well. That's generally less useful, but may be handy if you managed to end up with conflicting info files. Interactively, C-uC-hi will prompt you for a full filename.

(要交互输入节点名称,可以使用 Ch i g 。)

(To enter a node name interactively, you can use C-hig.)



  • 如何查找节名称? (例如:标记和区域11的标记)

与第一个问题相同,除了它是节点名称​​ 之后的部分。同样,只需使用 c 即可找到。

That's essentially the same as the first question, except it's the part of the node name after the parentheses that you want. Again, just use c to find out.



  • 是否可以列出

我不完全确定


  • d 将跳转到主目录(因为 Ch i 最初会带您进入)。这是从在 Info-directory-list 变量的目录中找到的所有 dir 文件生成的。每个 dir 文件都包含每个文件的路径,但是您不太可能需要查看它们。

  • d will jump to the main directory (as C-hi takes you to initially). This is generated from all the dir files found in the directories in the Info-directory-list variable. Each dir file contains the paths for each file, but you're unlikely to need to see those.

< t 带您到文件的顶部节点,该节点通常显示文件的顶级内容。

< or t takes you to the top node of the file, which generally presents the top-level contents for the file.

T 打开当前文件的全页式目录。

T opens an all-on-one-page table of contents for the current file.

I 为您显示与当前文件匹配的索引条目。

I presents you with index entries matching a pattern, for the current file.

Cs 可以搜索当前文件的所有节点(每次击中当前节点的末尾即可再次键入该文件,以便在下一个节点中开始搜索)。

C-s can search through all nodes of the current file (simply type it again each time you hit the end of the current node to start searching in the next).

Mx info-apropos 可用于搜索所有信息文件。

M-x info-apropos can be used to search all info files.

很明显,一旦通过任何方法到达特定节点,就可以使用 c 来找到其名称。

And obviously once you've arrived at a particular node via any method, you can use c to find out its name.

同样如前所述,一旦您进入 * info * bu ffer,您可以使用相同的(file)节点语法键入 g 转到任何信息文件中的任何节点。如果您已经在该文件中,则可以省略(文件),或者省略 node 进入该文件的顶部节点指定的文件。您可能会或不希望使用

M-: (信息(文件)节点) RET

Also as previously mentioned, once you're in the *info* buffer, you can type g to go to any node in any info file, using the same (file) node syntax. You can omit (file) if you are already in that file, or omit node to get to the top node of the specified file. You may or may not prefer that to using
M-: (info "(file) node") RET

作为特殊情况, g * RET 在单个缓冲区中呈现整个当前信息文件。

As a special case, g*RET renders the entire current info file in a single buffer.

关于一般主题的其他有用的问答:

Other useful Q&As on the general subject:

  • Reading multiple Emacs info files simultaneously
  • how to open *.info file in emacs in info mode?
  • info indexing (within and without emacs)

也:

  • http://www.emacswiki.org/emacs/InfoMode

当然


  • M- : (信息(信息)顶部) RET

  • Ch i h

  • Ch i

  • M-: (info "(info) Top") RET
  • C-hih
  • C-hi?

这篇关于Emacs:打开特定的“信息”部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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