BBS水木清华站∶精华区

 
Emacs 的 info 使用说明 
 
前已略述 info 的使用法,现在就更进一步详述之。在 EMACS 
的线上辅助说明功能中,info 的内容可说是最为丰富的。因为, 
任何线上辅助说明的文件都可在 info 模式中找到。因为,info 
就是用来放置整个 EMACS 手册。 
     info 对於 EMACS 文件的安排是采取树状的结构, 
所以是以根部(root)为出发点。info 执行 info program, 
使用 info program 的方法有二: 
 
   *   Ctrl-h i 
   *   ESC-x info 
 
     info 对於档案的编排,是以 Hypertext 的方法来处理所有的 
相关文件。当键入 ``Ctrl-h i'' 或 ``ESC-x info'' 後,会先进入 info 
树状(tree)结构的最顶端。如下就是进入 info 时的第一个画面: 
 
-*- Text -*- 
This is the file .../info/dir, which contains the topmost node of the 
Info hierarchy.  The first time you invoke Info you start off 
looking at that node, which is (dir)Top. 
 
File: dir       Node: Top       This is the top of the INFO tree 
  This (the Directory node) gives a menu of major topics. 
  Typing "d" returns here, "q" exits, "?" lists all INFO commands, "h" 
  gives a primer for first-timers, "mTexinfo" visits Texinfo topic, 
  etc. 
  --- PLEASE ADD DOCUMENTATION TO THIS TREE. (See INFO topic first.) --- 
 
* Menu: The list of major topics begins on the next line. 
 
* Info: (info). Documentation browsing system. 
 
* Emacs: (emacs).  The extensible self-documenting text editor. 
 
* VIP: (vip).   A VI-emulation for Emacs. 
 
* Texinfo: (texi.info). 
                With one source file, make either a printed manual 
                (through TeX) or an Info file (through texinfo). 
                Full documentation in this menu item. 
 
* Termcap: (termcap). 
                The termcap library, which enables application programs 
                to handle all types of character-display terminals. 
 
* Regex: (regex). 
                The GNU regular expression library. 
 
* Cpp: (cpp.info). 
                C pre-processor. 
 
* Gcc: (gcc.info). 
                GNU C Compiler --- an ANSI C Compiler developed by FSF. 
 
* Gzip: (gzip.info). 
                GNU zip program --- an compress package developed by FSF. 
 
* Ispell: (ispell.info). 
                A spelling checker. 
 
* Libg++: (libg++.info). 
                G++ libraries. 
 
* Gmake: (make.info). 
                A make utility developed by FSF. 
 
* Bison: (bison.info). 
                GNU Yacc. 
 
* Gawk: (gawk.info). 
                GNU awk --- pattern scanning and processing language. 
 
* Gdb: (gdb.info). 
                GNU debugger. 
 
* Info-stnd: (info-stnd.info). 
                Stand along GNU info. 
 
* Makeinfo: (makeinfo.info). 
                Program for producing *.info file from *.texi file. 
 
* Graphics: (graphics.info). 
                A set programs for producing plot files and display them 
                on Tektronix 4010, PostScript, and X window system compatible 
                output devices. 
 
* m4: (m4.info). 
        m4 is macro processor, in the sense that it copies its input to the 
        output, expending macros as it goes. GNU m4 is mostly compatible with 
        system V, Release 3 version. 
 
* Hyperbole: (hypb.info). 
        GNU Emacs-based everyday information management system. 
        Use {C-h h d d} for a demo. Include Smart Key context-sensitive 
        mouse or keyboard key support, a powerful rolodex, and extensible 
        hypertext facilities including hyper-links in mail and news messages. 
 
* Standards Coding Style:(standards.info). 
        GNU Coding Style. 
 
此时,出现在萤幕的第一列是标头(header),它包含此结点 
(node)的基本讯息。表头所提供的讯息,最多可有五件事情: 
 
  1.  结点所在的档案(File) 
  2.  结点的名称(node) 
  3.  此结点的下一个结点(Next) 
  4.  此结点的上一个结点(Prev) 
  5.  此结点的上一层结点(up) 
 
此时的画面,只显示了二件事情,是因为此画面为 info 树状结构 
的最上层。 
 
在表头之下的资讯,是用来告知如何用 info 。它提供了五件事情,现一一说明。 
 
   *   h 
     不知如何使用 info 模式者,可在进入 info 模式後,使用 info 的线上 
     辅助说明。欲使用 info 的线上辅助说明,只要在进入 info 模式後,键入 
     ``h'' 即可。此不只是一个线上辅助说明,还是一个教学指引。跟随著它的说 
     明,即可明了如何使用 info 模式. 
   * d 
     ``Ctrl-h i'' 指令,会先进入 info 树状结构的根部。任何情况下, 
     可键入  ``d'' 回到此根部。 
   * ? 
     想知所有与 info 有关的指令,只要键入 ``?'',就可以得知所有 
     指令的全貌。 
   * q 
     欲离开 info,只要键入 ``q'' ,就可以离开 info 而回到先前的 
     缓冲区。 
   *  m Texinfo< Return > 
     这一个指令是用来使用 info 的 Menu Item。使用的方法如下: 
 
       1.  键入 ``m'' 。 
       2.  键入所欲参考的文件名称,也可使用 completion 
               的功能来简化输入的工作。 
       3.  键入 RET。 
 
           何为 Menu Item 会再解释。 
 
     在这五个指令之下的是,此结点可以使用的 Menu Item。 
使用者可以直接至所要参考的 Menu 之下,键入 ``RET''。此时, 
 info 会将此 Menu 的相关文件显示在萤幕上。 
使用 info 除了以上的指令之外,还有几个必需知道的指令。 
现介绍如下: 
 
   *   n 
           将结点移至下一个与此结点相连的结点。 
   *   p 
           将结点移至上一个与此结点相连的结点。 
   *   u 
           将结点移至上一层的结点。 
   *   m 
     以上结点间移动的指令,必需结点间有相连接的关系。 
     若想做跨越的移动,这几个指令是无法做到的。此时,必需透过 
     Menu 来做夸越结点的文件阅读。 
     使用 Menu 的方式有二: 
 
        o  ``mTexinfo'' 
          这种使用 menu 的方法,在进入 info 的第一个画面就可以看到了。 
          此方法由三件事共同组成: 
 
            1.  m 
               键入 m 是使用 menu 的指令。 
            2.  Texinfo 
               键入 m 时,minibuffer 会出现 
 
               menu item: 
 
               此时,可在其後输入所欲阅□的文件名称。所以,Texinfo 意 
               指文件的名称。此时,就可以键入画面上以 ``*'' 为开头 
               的名称。如果是刚进入 info ,可使用的 Texinfo 名称有: 
 
               Info、 Emacs、 VIP、 Forms、 GNUS、 CL、 Gcc、 Cpp、 
               Makeinfo、 Info-stnd、 Texi、 Hyperbole、 Octave 
 
            3.  RET 
               待文件名称输入完毕後,要按下 RET ,以告知系统文件名称已经 
               输入完成了,可以开始执行的动作了。 
 
 
        o  直接键入 ``RET'' 
           如果在阅□某一个结点时,文件中出现以 ``* Menu:'' 为首的 
           文字,就表示此列以下若有以 ``*'' 为开头的列,均为一个 
           可以使用的 Menu Item 。此时,可以直接键入 ``RET'' 参考 
           另一个结点的文件。 
 
 
      使用 Menu 有些条件,就是所要使用的 Menu,必需在此结点 
      的文件中有明列出来的才可以使用。要使用其它结点的 Menu, 
      必需先到有要使用的 Menu 的结点,才可以使用它的 Menu。 
      Menu 有其一定的结构。所有 Menu 的第一列,都是以 `` Menu:'' 
      为开端。如下所示: 
 
      * Menu: The list of major topics begins on the next line. 
 
      此列之後的所有列,只要以 `` *'' 为开始的列,就表示一个可以 
      使用的 item。 Menu Item 的表示法如下所述: 
 
      * Info: (info).        Documentation browsing system. 
 
      它主要由四个部份主成: 
 
 
 
       1.   * 
           每一个 Menu Item 都是以 ``*'' 为开头。 
       2.   Subtopic: 
           ``*'' 之後就是 Subtopic 的名称,再加上一个 ``:''。 
           info 就是根据此 Subtopic 找到所对应的结点名。此例子的 
           Subtopic 的名称就是 ``Info''。 如果要以指令 ``m'' 的方式, 
           使用Menu Item 所要给予的 Texinfo 的名称就是此 Subtopic 
           的名称。 
 
       3.   node name 
           在 Subtopic : 之後就是所使用的结点名。一般为了使用上 
           的方便,会尽可能的使用相同的 Subtopic 和结点的名称。 
           若二者的名字相同时,在Subtopic 後的结点名会省略而以 
           两个 ``:''表示之。如 ``* Info::''。 
 
       4.   node description 
           结点後面的内容是选择性,它主要是用来概略描述此结点。 
 
 
   *   l 
      如果想要回到前一个(last)所参考过的结点,可以使用指令  l 
      一步一步的往回走。 
   *   b 
      指令  b 可以使游标移至文件的最前端。 
   *   SPC 
     若文件太长可键入空白键( SPC)来卷动萤幕。 
   *   Ctrl-g 
     任何时候想要取消所键入的指令,可键入  Ctrl-g 
 

BBS水木清华站∶精华区