help.texi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. @node Help, Mark, M-x, Top
  2. @chapter Help
  3. @kindex Help
  4. @cindex help
  5. @cindex self-documentation
  6. @findex help-command
  7. @kindex C-h
  8. @kindex F1
  9. XEmacs provides extensive help features accessible through a single
  10. character, @kbd{C-h}. @kbd{C-h} is a prefix key that is used only for
  11. documentation-printing commands. The characters that you can type after
  12. @kbd{C-h} are called @dfn{help options}. One help option is @kbd{C-h};
  13. that is how you ask for help about using @kbd{C-h}. To cancel, type
  14. @kbd{C-g}. The function key @key{F1} is equivalent to @kbd{C-h}.
  15. @kindex C-h C-h
  16. @findex help-for-help
  17. @kbd{C-h C-h} (@code{help-for-help}) displays a list of the possible
  18. help options, and then asks you to type the desired option. It prompts
  19. with the string:
  20. @smallexample
  21. A B C F I K L M N P S T V W C-c C-d C-f C-i C-k C-n C-w; ? for more help:
  22. @end smallexample
  23. @noindent
  24. You should type one of those characters.
  25. Typing a third @kbd{C-h} displays a description of what the options mean;
  26. Emacs still waits for you to type an option. To cancel, type @kbd{C-g}.
  27. Most help buffers use a special major mode, Help mode, which lets you
  28. scroll conveniently with @key{SPC} and @key{DEL} or @key{BS}.
  29. @menu
  30. * Help Summary:: Brief list of all Help commands.
  31. * Key Help:: Asking what a key does in XEmacs.
  32. * Name Help:: Asking about a command, variable or function name.
  33. * Apropos:: Asking what pertains to a given topic.
  34. * Library Keywords:: Finding Lisp libraries by keywords (topics).
  35. * Help Mode:: Special features of Help mode and Help buffers.
  36. * Misc Help:: Other help commands.
  37. @end menu
  38. @iftex
  39. @node Help Summary, Help Summary, Help, Help
  40. @end iftex
  41. @ifinfo
  42. @node Help Summary, Key Help, Help, Help
  43. @section Help Summary
  44. @end ifinfo
  45. Here is a summary of the defined help commands.
  46. @table @kbd
  47. @item C-h a @var{regexp} @key{RET}
  48. Display a list of functions and variables whose names match @var{regexp}
  49. (@code{hyper-apropos}).
  50. @item C-h A @var{regexp}
  51. Show all commands whose names contain matches for @var{regexp}
  52. (@code{command-apropos}).
  53. @item C-h b
  54. Display a table of all key bindings currently in effect, with local
  55. bindings of the current major mode first, followed by all global
  56. bindings (@code{describe-bindings}).
  57. @item C-h c @var{key}
  58. Print the name of the command that @var{key} runs
  59. (@code{describe-key-briefly}). Here @kbd{c} stands for `character'. For more
  60. extensive information on @var{key}, use @kbd{C-h k}.
  61. @item C-h d @var{function} @key{RET}
  62. @itemx C-h f @var{function} @key{RET}
  63. Display documentation on the Lisp function named @var{function}
  64. (@code{describe-function}). Since commands are Lisp functions,
  65. a command name may be used.
  66. @item C-h i
  67. Run Info, the program for browsing documentation files (@code{info}).
  68. The complete XEmacs manual is available online in Info.
  69. @item C-h k @var{key}
  70. Display the name and documentation of the command that @var{key} runs
  71. (@code{describe-key}).
  72. @item C-h l
  73. Display a description of the last 100 characters you typed
  74. (@code{view-lossage}).
  75. @item C-h m
  76. Display documentation of the current major mode (@code{describe-mode}).
  77. @item C-h n
  78. @itemx C-h C-n
  79. Display documentation of XEmacs changes, most recent first
  80. (@code{view-emacs-news}).
  81. @item C-h p
  82. Find packages by topic keyword (@code{finder-by-keyword}).
  83. @item C-h C-p
  84. Display a table of all mouse bindings currently in effect now, with
  85. local bindings of the current major mode first, followed by all global
  86. bindings (@code{describe-pointer}).
  87. @item C-h s
  88. Display current contents of the syntax table, plus an explanation of
  89. what they mean (@code{describe-syntax}). @xref{Syntax}.
  90. @item C-h t
  91. Enter the XEmacs interactive tutorial (@code{help-with-tutorial}).
  92. @item C-h v @var{var} @key{RET}
  93. Display the documentation of the Lisp variable @var{var}
  94. (@code{describe-variable}).
  95. @item C-h w @var{command} @key{RET}
  96. Print which keys run the command named @var{command} (@code{where-is}).
  97. @item C-h B @key{RET}
  98. Display info on how to deal with Beta versions of XEmacs
  99. (@code{describe-beta}).
  100. @item C-h C @var{group} @key{RET}
  101. Select customization buffer for @var{group} (@code{customize}).
  102. @item C-h F @key{RET}
  103. View the local copy of the XEmacs FAQ (@code{xemacs-local-faq}).
  104. @item C-h C-i @var{file} @key{RET}
  105. Read Info file @var{file} with Info browser (@code{Info-query}).
  106. @item C-h C-c @var{command} @key{RET}
  107. Look up an Emacs command @var{command} in the Emacs manual in the Info
  108. system (@code{Info-goto-emacs-command-node}).
  109. @item C-h C-f @var{function} @key{RET}
  110. Look up an Emacs Lisp function @var{function} in the Elisp manual in the
  111. Info system (@code{Info-elisp-ref}).
  112. @end table
  113. @node Key Help, Name Help, Help Summary, Help
  114. @section Documentation for a Key
  115. @kindex C-h c
  116. @findex describe-key-briefly
  117. The most basic @kbd{C-h} options are @kbd{C-h c}
  118. (@code{describe-key-briefly}) and @w{@kbd{C-h k}} (@code{describe-key}).
  119. @kbd{C-h c @var{key}} prints in the echo area the name of the command
  120. that @var{key} is bound to. For example, @kbd{C-h c C-f} prints
  121. @samp{forward-char}. Since command names are chosen to describe what
  122. the commands do, this is a good way to get a very brief description of
  123. what @var{key} does.
  124. @kindex C-h k
  125. @findex describe-key
  126. @kbd{C-h k @var{key}} is similar to @kbd{C-h c} but gives more
  127. information. It displays the documentation string of the function
  128. @var{key} is bound to as well as its name. @var{key} is a string or
  129. vector of events. When called interactively, @var{key} may also be a menu
  130. selection. This information does not usually fit into the echo area, so a
  131. window is used for the display.
  132. @kbd{C-h c} and @kbd{C-h k} work for any sort of key sequences,
  133. including function keys and mouse events.
  134. @node Name Help, Apropos, Key Help, Help
  135. @section Help by Command or Variable Name
  136. @kindex C-h f
  137. @findex describe-function
  138. @vindex describe-function-show-arglist
  139. @kbd{C-h f} (@code{describe-function}) reads the name of a Lisp
  140. function using the minibuffer, then displays that function's
  141. documentation string in a window. Since commands are Lisp functions,
  142. you can use the argument @var{function} to get the documentation of a
  143. command that you know by name. For example,
  144. @example
  145. C-h f auto-fill-mode @key{RET}
  146. @end example
  147. @noindent
  148. displays the documentation for @code{auto-fill-mode}. Using @kbd{C-h f}
  149. is the only way to see the documentation of a command that is not bound
  150. to any key, that is, a command you would normally call using @kbd{M-x}.
  151. If the variable @code{describe-function-show-arglist} is @code{t},
  152. @code{describe-function} shows its arglist if the @var{function} is not
  153. an autoload function.
  154. @kbd{C-h f} is also useful for Lisp functions that you are planning to
  155. use in a Lisp program. For example, if you have just written the
  156. expression @code{(make-vector len)} and want to make sure you are using
  157. @code{make-vector} properly, type @kbd{C-h f make-vector @key{RET}}.
  158. Because @kbd{C-h f} allows all function names, not just command names,
  159. you may find that some of your favorite abbreviations that work in
  160. @kbd{M-x} don't work in @kbd{C-h f}. An abbreviation may be unique
  161. among command names, yet fail to be unique when other function names are
  162. allowed.
  163. The function name for @kbd{C-h f} to describe has a default which is
  164. used if you type @key{RET} leaving the minibuffer empty. The default is
  165. the function called by the innermost Lisp expression in the buffer
  166. around point, @emph{provided} that is a valid, defined Lisp function
  167. name. For example, if point is located following the text
  168. @samp{(make-vector (car x)}, the innermost list containing point is the
  169. one that starts with @samp{(make-vector}, so the default is to describe the
  170. function @code{make-vector}.
  171. @kbd{C-h f} is often useful just to verify that you have the right
  172. spelling for the function name. If @kbd{C-h f} mentions a name from the
  173. buffer as the default, that name must be defined as a Lisp function. If
  174. that is all you want to know, just type @kbd{C-g} to cancel the @kbd{C-h
  175. f} command, then go on editing.
  176. @kindex C-h w
  177. @findex where-is
  178. @kbd{C-h w @var{command} @key{RET}} (@code{where-is}) tells you what
  179. keys are bound to @var{command}. It prints a list of the keys in the
  180. echo area. Alternatively, it informs you that a command is not bound to
  181. any keys, which implies that you must use @kbd{M-x} to call the
  182. command.
  183. @kindex C-h v
  184. @findex describe-variable
  185. @kbd{C-h v} (@code{describe-variable}) is like @kbd{C-h f} but
  186. describes Lisp variables instead of Lisp functions. Its default is the
  187. Lisp symbol around or before point, if that is the name of a known Lisp
  188. variable. @xref{Variables}.
  189. @node Apropos, Library Keywords, Name Help, Help
  190. @section Apropos
  191. @kindex C-h A
  192. @findex command-apropos
  193. @cindex apropos
  194. @table @kbd
  195. @item C-h A
  196. Show only symbols that are names of commands
  197. (@code{command-apropos}).
  198. @item M-x apropos @var{regexp}
  199. Show all symbols whose names contain matches for @var{regexp}.
  200. @end table
  201. A more sophisticated sort of question to ask is, ``What are the
  202. commands for working with files?'' To ask this question, type @kbd{C-h
  203. a file @key{RET}}, which displays a list of all command names that
  204. contain @samp{file}, including @code{copy-file}, @code{find-file}, and
  205. so on. With each command name appears a brief description of how to use
  206. the command, and what keys you can currently invoke it with. For
  207. example, it would say that you can invoke @code{find-file} by typing
  208. @kbd{C-x C-f}. The @kbd{A} in @kbd{C-h A} stands for `Apropos';
  209. @kbd{C-h A} runs the command @code{command-apropos}. This command
  210. normally checks only commands (interactive functions); if you specify a
  211. prefix argument, it checks noninteractive functions as well.
  212. Because @kbd{C-h A} looks only for functions whose names contain the
  213. string you specify, you must use ingenuity in choosing the string. If
  214. you are looking for commands for killing backwards and @kbd{C-h a
  215. kill-backwards @key{RET}} doesn't reveal any, don't give up. Try just
  216. @kbd{kill}, or just @kbd{backwards}, or just @kbd{back}. Be persistent.
  217. Pretend you are playing Adventure. Also note that you can use a regular
  218. expression as the argument, for more flexibility (@pxref{Regexps}).
  219. Here is a set of arguments to give to @kbd{C-h a} that covers many
  220. classes of XEmacs commands, since there are strong conventions for
  221. naming the standard XEmacs commands. By giving you a feel for the
  222. naming conventions, this set should also serve to aid you in developing
  223. a technique for picking @code{apropos} strings.
  224. @quotation
  225. char, line, word, sentence, paragraph, region, page, sexp, list, defun,
  226. rect, buffer, frame, window, face, file, dir, register, mode, beginning,
  227. end, forward, backward, next, previous, up, down, search, goto, kill,
  228. delete, mark, insert, yank, fill, indent, case, change, set, what, list,
  229. find, view, describe, default.
  230. @end quotation
  231. @findex apropos
  232. To list all Lisp symbols that contain a match for a regexp, not just
  233. the ones that are defined as commands, use the command @kbd{M-x apropos}
  234. instead of @kbd{C-h A}. This command does not check key bindings by
  235. default; specify a numeric argument if you want it to check them.
  236. @findex apropos-documentation
  237. The @code{apropos-documentation} command is like @code{apropos} except
  238. that it searches documentation strings for matches for the specified
  239. regular expression.
  240. @findex apropos-value
  241. The @code{apropos-value} command is like @code{apropos} except that it
  242. searches symbols' values for matches for the specified regular
  243. expression. This command does not check function definitions or
  244. property lists by default; specify a numeric argument if you want it to
  245. check them.
  246. @vindex apropos-do-all
  247. If the variable @code{apropos-do-all} is non-@code{nil}, the commands
  248. above all behave as if they had been given a prefix argument.
  249. If you want more information about a function definition, variable or
  250. symbol property listed in the Apropos buffer, you can click on it with
  251. @kbd{Mouse-2} or move there and type @key{RET}.
  252. @node Library Keywords, Help Mode, Apropos, Help
  253. @section Keyword Search for Lisp Libraries
  254. @kindex C-h p
  255. @findex finder-by-keyword
  256. The @kbd{C-h p} command lets you search the standard Emacs Lisp
  257. libraries by topic keywords. Here is a partial list of keywords you can
  258. use:
  259. @display
  260. abbrev abbreviation handling, typing shortcuts, macros
  261. bib code related to the `bib' bibliography processor
  262. c C, C++, and Objective-C language support
  263. calendar calendar and time management support
  264. comm communications, networking, remote access to files
  265. data support for editing files of data
  266. docs support for Emacs documentation
  267. dumped files preloaded into Emacs
  268. emulations emulations of other editors
  269. extensions Emacs Lisp language extensions
  270. faces support for multiple fonts
  271. frames support for Emacs frames and window systems
  272. games games, jokes and amusements
  273. hardware support for interfacing with exotic hardware
  274. help support for on-line help systems
  275. hypermedia support for links between text or other media types
  276. i18n internationalization and alternate character-set support
  277. internal code for Emacs internals, build process, defaults
  278. languages specialized modes for editing programming languages
  279. lisp Lisp support, including Emacs Lisp
  280. local code local to your site
  281. maint maintenance aids for the Emacs development group
  282. mail modes for electronic-mail handling
  283. matching various sorts of searching and matching
  284. mouse mouse support
  285. mule multi-language extensions
  286. news support for netnews reading and posting
  287. oop support for object-oriented programming
  288. outlines support for hierarchical outlining
  289. processes process, subshell, compilation, and job control support
  290. terminals support for terminal types
  291. tex code related to the TeX formatter
  292. tools programming tools
  293. unix front-ends/assistants for, or emulators of, UNIX features
  294. vms support code for vms
  295. wp word processing
  296. @end display
  297. @node Help Mode, Misc Help, Library Keywords, Help
  298. @section Help Mode Commands
  299. Help buffers provide the commands of View mode (@pxref{Misc File
  300. Ops}), plus a few special commands of their own.
  301. @table @kbd
  302. @item @key{SPC}
  303. Scroll forward.
  304. @item @key{DEL}
  305. @itemx @key{BS}
  306. Scroll backward.
  307. @c @item @key{RET}
  308. @c Follow a cross reference at point.
  309. @c @item @key{TAB}
  310. @c Move point forward to the next cross reference.
  311. @c @item S-@key{TAB}
  312. @c Move point back to the previous cross reference.
  313. @c @item Mouse-2
  314. @c Follow a cross reference that you click on.
  315. @end table
  316. When a command name (@pxref{M-x,, Running Commands by Name}) or
  317. variable name (@pxref{Variables}) appears in the documentation, it
  318. normally appears inside paired single-quotes.
  319. @node Misc Help, , Help Mode, Help
  320. @section Other Help Commands
  321. @kindex C-h i
  322. @findex info
  323. @cindex Info
  324. @cindex manuals, on-line
  325. @cindex on-line manuals
  326. @kbd{C-h i} (@code{info}) runs the Info program, which is used for
  327. browsing through structured documentation files. The entire XEmacs manual
  328. is available within Info. Eventually all the documentation of the GNU
  329. system will be available. Type @kbd{h} after entering Info to run
  330. a tutorial on using Info.
  331. If you specify a numeric argument, @kbd{C-h i} prompts for the name of
  332. a documentation file. This way, you can browse a file which doesn't
  333. have an entry in the top-level Info menu. It is also handy when you
  334. need to get to the documentation quickly, and you know the exact name of
  335. the file.
  336. @kindex C-h C-f
  337. @kindex C-h C-k
  338. @findex Info-elisp-ref
  339. @findex Info-goto-emacs-command-node
  340. There are two special help commands for accessing XEmacs documentation
  341. through Info. @kbd{C-h C-f @var{function} @key{RET}} enters Info and
  342. goes straight to the documentation of the XEmacs function
  343. @var{function}. @kbd{C-h C-k @var{key}} enters Info and goes straight
  344. to the documentation of the key @var{key}. These two keys run the
  345. commands @code{Info-elisp-ref} and
  346. @code{Info-goto-emacs-key-command-node}.
  347. @kindex C-h l
  348. @findex view-lossage
  349. If something surprising happens, and you are not sure what commands you
  350. typed, use @kbd{C-h l} (@code{view-lossage}). @kbd{C-h l} prints the last
  351. 100 command characters you typed in. If you see commands that you don't
  352. know, you can use @kbd{C-h c} to find out what they do.
  353. @kindex C-h m
  354. @findex describe-mode
  355. XEmacs has several major modes. Each mode redefines a few keys and
  356. makes a few other changes in how editing works. @kbd{C-h m}
  357. (@code{describe-mode}) prints documentation on the current major mode,
  358. which normally describes all the commands that are changed in this mode.
  359. @kindex C-h b
  360. @findex describe-bindings
  361. @kbd{C-h b} (@code{describe-bindings}) and @kbd{C-h s}
  362. (@code{describe-syntax}) present information about the current XEmacs
  363. mode that is not covered by @kbd{C-h m}. @kbd{C-h b} displays a list of
  364. all the key bindings currently in effect, with the local bindings of the
  365. current major mode first, followed by the global bindings (@pxref{Key
  366. Bindings}). @kbd{C-h s} displays the contents of the syntax table with
  367. explanations of each character's syntax (@pxref{Syntax}).
  368. You can get a similar list for a particular prefix key by typing
  369. @kbd{C-h} after the prefix key. (There are a few prefix keys for which
  370. this does not work---those that provide their own bindings for
  371. @kbd{C-h}. One of these is @key{ESC}, because @kbd{@key{ESC} C-h} is
  372. actually @kbd{C-M-h}, which marks a defun.)
  373. @kindex C-h F
  374. @findex xemacs-local-faq
  375. @kindex C-h n
  376. @findex view-emacs-news
  377. @kindex C-h t
  378. @findex help-with-tutorial
  379. @kindex C-h C-c
  380. @findex describe-copying
  381. @kindex C-h C-d
  382. @findex describe-distribution
  383. @kindex C-h C-w
  384. @findex describe-no-warranty
  385. The other @kbd{C-h} options display various files of useful
  386. information. @kbd{C-h C-w} (@code{describe-no-warranty}) displays the
  387. full details on the complete absence of warranty for XEmacs. @kbd{C-h
  388. n} (@code{view-emacs-news}) displays the file @file{xemacs/etc/NEWS},
  389. which contains documentation on XEmacs changes arranged chronologically.
  390. @kbd{C-h F} (@code{xemacs-local-faq}) displays local version of the
  391. XEmacs frequently-answered-questions-list. @kbd{C-h t}
  392. (@code{help-with-tutorial}) displays the learn-by-doing XEmacs
  393. tutorial. @kbd{C-h C-c} (@code{describe-copying}) displays the file
  394. @file{xemacs/etc/COPYING}, which tells you the conditions you must obey
  395. in distributing copies of XEmacs. @kbd{C-h C-d}
  396. (@code{describe-distribution}) displays another file named
  397. @file{xemacs/etc/DISTRIB}, which tells you how you can order a copy of
  398. the latest version of XEmacs.