emacs.1 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. .\" See section COPYING for copyright and redistribution information.
  2. .TH EMACS 1 "2007 April 13" "GNU Emacs 24.2"
  3. .
  4. .
  5. .SH NAME
  6. emacs \- GNU project Emacs
  7. .
  8. .
  9. .SH SYNOPSIS
  10. .B emacs
  11. [
  12. .I command-line switches
  13. ] [
  14. .I files ...\&
  15. ]
  16. .
  17. .
  18. .SH DESCRIPTION
  19. .I GNU Emacs
  20. is a version of
  21. .IR Emacs ,
  22. written by the author of the original (PDP-10)
  23. .IR Emacs ,
  24. Richard Stallman.
  25. The user functionality of GNU Emacs encompasses everything other
  26. editors do, and it is easily extensible since its editing commands are
  27. written in Lisp.
  28. .PP
  29. The primary documentation of GNU Emacs is in the GNU Emacs Manual,
  30. which you can read using Info, either from Emacs or as a standalone
  31. program.
  32. Please look there for complete and up-to-date documentation.
  33. This man page is updated only when someone volunteers to do so.
  34. .PP
  35. .I Emacs
  36. has an extensive interactive help facility,
  37. but the facility assumes that you know how to manipulate
  38. .I Emacs
  39. windows and buffers.
  40. CTRL-h or F1 enters the Help facility.
  41. Help Tutorial (CTRL-h t) starts an interactive tutorial to quickly
  42. teach beginners the fundamentals of
  43. .I Emacs.
  44. Help Apropos (CTRL-h a) helps you find a command with a name matching
  45. a given pattern, Help Key (CTRL-h k) describes a given key sequence,
  46. and Help Function (CTRL-h f) describes a given Lisp function.
  47. .PP
  48. .IR "GNU Emacs" 's
  49. many special packages handle mail reading (RMail) and sending (Mail),
  50. outline editing (Outline), compiling (Compile), running subshells
  51. within
  52. .I Emacs
  53. windows (Shell), running a Lisp read-eval-print loop
  54. (Lisp-Interaction-Mode), automated psychotherapy (Doctor), and much more.
  55. .
  56. .SS Emacs Options
  57. The following options are of general interest:
  58. .RS
  59. .TP 8
  60. .I file
  61. Edit
  62. .IR file .
  63. .TP
  64. .BI \-\-file " file\fR,\fP " \-\-find-file " file\fR,\fP " \-\-visit " file"
  65. The same as specifying
  66. .I file
  67. directly as an argument.
  68. .TP
  69. .BI + number
  70. Go to the line specified by
  71. .I number
  72. (do not insert a space between the "+" sign and
  73. the number).
  74. This applies only to the next file specified.
  75. .TP
  76. .BI + line:column
  77. Go to the specified
  78. .I line
  79. and
  80. .IR column .
  81. .TP
  82. .BR \-q ", " \-\-no\-init\-file
  83. Do not load an init file.
  84. .TP
  85. .B \-\-no\-site\-file
  86. Do not load the site-wide startup file.
  87. .TP
  88. .B \-\-no\-desktop
  89. Do not load a saved desktop.
  90. .TP
  91. .BR \-Q ", " \-\-quick
  92. Similar to "\-q \-\-no\-site\-file \-\-no\-splash". Also, avoid
  93. processing X resources.
  94. .TP
  95. .B \-\-no\-splash
  96. Do not display a splash screen during start-up.
  97. .TP
  98. .B \-\-debug\-init
  99. Enable
  100. .I Emacs
  101. Lisp debugger during the processing of the user init file
  102. .BR ~/.emacs .
  103. This is useful for debugging problems in the init file.
  104. .TP
  105. .BI \-u " user\fR,\fP " \-\-user " user"
  106. Load
  107. .IR user 's
  108. init file.
  109. .TP
  110. .BI \-t " file\fR,\fP " \-\-terminal " file"
  111. Use specified
  112. .I file
  113. as the terminal instead of using stdin/stdout.
  114. This must be the first argument specified in the command line.
  115. .TP
  116. .B \-\-daemon
  117. Start Emacs as a daemon, enabling the Emacs server and disconnecting
  118. from the terminal. You can then use the emacsclient command to
  119. connect to the server (see
  120. .BR emacsclient (1)).
  121. .TP
  122. .B \-\-version
  123. Display
  124. .I Emacs
  125. version information and exit.
  126. .TP
  127. .B \-\-help
  128. Display this help and exit.
  129. .RE
  130. .PP
  131. The following options are Lisp-oriented
  132. (these options are processed in the order encountered):
  133. .RS
  134. .TP 8
  135. .BI \-f " function\fR,\fP " \-\-funcall " function"
  136. Execute the lisp function
  137. .IR function .
  138. .TP
  139. .BI \-l " file\fR,\fP " \-\-load " file"
  140. Load the lisp code in the file
  141. .IR file .
  142. .TP
  143. .BI \-\-eval " expr\fR,\fP " \-\-execute " expr"
  144. Evaluate the Lisp expression
  145. .IR expr .
  146. .RE
  147. .PP
  148. The following options are useful when running
  149. .I Emacs
  150. as a batch editor:
  151. .RS
  152. .TP 8
  153. .B \-\-batch
  154. Edit in batch mode.
  155. The editor will send messages to stderr.
  156. You must use \-l and \-f options to specify files to execute
  157. and functions to call.
  158. .TP
  159. .BI \-\-script " file"
  160. Run
  161. .I file
  162. as an Emacs Lisp script.
  163. .TP
  164. .BI \-\-insert " file"
  165. Insert contents of
  166. .I file
  167. into the current buffer.
  168. .TP
  169. .B \-\-kill
  170. Exit
  171. .I Emacs
  172. while in batch mode.
  173. .TP
  174. .BI \-L " dir\fR,\fP " \-\-directory " dir"
  175. Add
  176. .I dir
  177. to the list of directories
  178. .I Emacs
  179. searches for Lisp files.
  180. .RE
  181. .
  182. .\" START DELETING HERE IF YOU'RE NOT USING X
  183. .SS Using Emacs with X
  184. .I Emacs
  185. has been tailored to work well with the X window system.
  186. If you run
  187. .I Emacs
  188. from under X windows, it will create its own X window to
  189. display in.
  190. You will probably want to start the editor as a background
  191. process so that you can continue using your original window.
  192. .PP
  193. .I Emacs
  194. can be started with the following X switches:
  195. .RS
  196. .TP 8
  197. .BI \-\-name " name"
  198. Specify the name which should be assigned to the initial
  199. .I Emacs
  200. window.
  201. This controls looking up X resources as well as the window title.
  202. .TP
  203. .BI \-T " name\fR,\fP " \-\-title " name"
  204. Specify the title for the initial X window.
  205. .TP
  206. .BR \-r ", " \-rv ", " \-\-reverse\-video
  207. Display the
  208. .I Emacs
  209. window in reverse video.
  210. .TP
  211. .BI \-fn " font\fR,\fP " \-\-font " font"
  212. Set the
  213. .I Emacs
  214. window's font to that specified by
  215. .IR font .
  216. You will find the various
  217. .I X
  218. fonts in the
  219. .I /usr/lib/X11/fonts
  220. directory.
  221. Note that
  222. .I Emacs
  223. will only accept fixed width fonts.
  224. Under the X11 Release 4 font-naming conventions, any font with the
  225. value "m" or "c" in the eleventh field of the font name is a fixed
  226. width font.
  227. Furthermore, fonts whose name are of the form
  228. .IR width x height
  229. are generally fixed width, as is the font
  230. .IR fixed .
  231. See
  232. .BR xlsfonts (1)
  233. for more information.
  234. When you specify a font, be sure to put a space between the
  235. switch and the font name.
  236. .TP
  237. .BI \-\-xrm " resources"
  238. Set additional X resources.
  239. .TP
  240. .BI "\-\-color\fR,\fP \-\-color=" mode
  241. Override color mode for character terminals;
  242. .I mode
  243. defaults to `auto', and can also be `never', `auto', `always',
  244. or a mode name like `ansi8'.
  245. .TP
  246. .BI \-bw " pixels\fR,\fP " \-\-border\-width " pixels"
  247. Set the
  248. .I Emacs
  249. window's border width to the number of pixels specified by
  250. .IR pixels .
  251. Defaults to one pixel on each side of the window.
  252. .TP
  253. .BI \-ib " pixels\fR,\fP " \-\-internal\-border " pixels"
  254. Set the window's internal border width to the number of pixels specified
  255. by
  256. .IR pixels .
  257. Defaults to one pixel of padding on each side of the window.
  258. .TP
  259. .BI \-g " geometry\fR,\fP " \-\-geometry " geometry"
  260. Set the
  261. .I Emacs
  262. window's width, height, and position as specified.
  263. The geometry specification is in the standard X format; see
  264. .BR X (7)
  265. for more information.
  266. The width and height are specified in characters; the default is
  267. 80 by 24.
  268. See the Emacs manual, section "Options for Window Size and Position",
  269. for information on how window sizes interact
  270. with selecting or deselecting the tool bar and menu bar.
  271. .TP
  272. .BI \-lsp " pixels\fR,\fP " \-\-line\-spacing " pixels"
  273. Additional space to put between lines.
  274. .TP
  275. .BR \-vb ", " \-\-vertical\-scroll\-bars
  276. Enable vertical scrollbars.
  277. .TP
  278. .BR \-fh ", " \-\-fullheight
  279. Make the first frame as high as the screen.
  280. .TP
  281. .BR \-fs ", " \-\-fullscreen
  282. Make the first frame fullscreen.
  283. .TP
  284. .BR \-fw ", " \-\-fullwidth
  285. Make the first frame as wide as the screen.
  286. .TP
  287. .BR \-mm ", " \-\-maximized
  288. Maximize the first frame, like "\-fw \-fh".
  289. .TP
  290. .BI \-fg " color\fR,\fP " \-\-foreground\-color " color"
  291. On color displays, set the color of the text.
  292. Use the command
  293. .I M\-x list\-colors\-display
  294. for a list of valid color names.
  295. .TP
  296. .BI \-bg " color\fR,\fP " \-\-background\-color " color"
  297. On color displays, set the color of the window's background.
  298. .TP
  299. .BI \-bd " color\fR,\fP " \-\-border\-color " color"
  300. On color displays, set the color of the window's border.
  301. .TP
  302. .BI \-cr " color\fR,\fP " \-\-cursor\-color " color"
  303. On color displays, set the color of the window's text cursor.
  304. .TP
  305. .BI \-ms " color\fR,\fP " \-\-mouse\-color " color"
  306. On color displays, set the color of the window's mouse cursor.
  307. .TP
  308. .BI \-d " displayname\fR,\fP " \-\-display " displayname"
  309. Create the
  310. .I Emacs
  311. window on the display specified by
  312. .IR displayname .
  313. Must be the first option specified in the command line.
  314. .TP
  315. .BR \-nbi ", " \-\-no\-bitmap\-icon
  316. Do not use picture of gnu for Emacs icon.
  317. .TP
  318. .B \-\-iconic
  319. Start
  320. .I Emacs
  321. in iconified state.
  322. .TP
  323. .BR \-nbc ", " \-\-no\-blinking\-cursor
  324. Disable blinking cursor.
  325. .TP
  326. .BR \-nw ", " \-\-no\-window\-system
  327. Tell
  328. .I Emacs
  329. not to create a graphical frame.
  330. If you use this switch when invoking
  331. .I Emacs
  332. from an
  333. .BR xterm (1)
  334. window, display is done in that window.
  335. .TP
  336. .BR \-D ", " \-\-basic\-display
  337. This option disables many display features; use it for
  338. debugging Emacs.
  339. .RE
  340. .PP
  341. You can set
  342. .I X
  343. default values for your
  344. .I Emacs
  345. windows in your
  346. .I \.Xresources
  347. file (see
  348. .BR xrdb (1)).
  349. Use the following format:
  350. .IP
  351. .RI emacs. keyword : value
  352. .PP
  353. where
  354. .I value
  355. specifies the default value of
  356. .IR keyword .
  357. .I Emacs
  358. lets you set default values for the following keywords:
  359. .RS
  360. .TP 8
  361. .BR background " (class " Background )
  362. For color displays,
  363. sets the window's background color.
  364. .TP
  365. .BR bitmapIcon " (class " BitmapIcon )
  366. If
  367. .BR bitmapIcon 's
  368. value is set to
  369. .IR on ,
  370. the window will iconify into the "kitchen sink."
  371. .TP
  372. .BR borderColor " (class " BorderColor )
  373. For color displays,
  374. sets the color of the window's border.
  375. .TP
  376. .BR borderWidth " (class " BorderWidth )
  377. Sets the window's border width in pixels.
  378. .TP
  379. .BR cursorColor " (class " Foreground )
  380. For color displays,
  381. sets the color of the window's text cursor.
  382. .TP
  383. .BR cursorBlink " (class " CursorBlink )
  384. Specifies whether to make the cursor blink.
  385. The default is
  386. .IR on .
  387. Use
  388. .I off
  389. or
  390. .I false
  391. to turn cursor blinking off.
  392. .TP
  393. .BR font " (class " Font )
  394. Sets the window's text font.
  395. .TP
  396. .BR foreground " (class " Foreground )
  397. For color displays,
  398. sets the window's text color.
  399. .TP
  400. .BR fullscreen " (class " Fullscreen )
  401. The desired fullscreen size.
  402. The value can be one of
  403. .IR fullboth ,
  404. .IR maximized ,
  405. .IR fullwidth ,
  406. or
  407. .IR fullheight ,
  408. which correspond to the command-line options `\-fs', `\-mm', `\-fw',
  409. and `\-fh', respectively.
  410. Note that this applies to the initial frame only.
  411. .TP
  412. .BR geometry " (class " Geometry )
  413. Sets the geometry of the
  414. .I Emacs
  415. window (as described above).
  416. .TP
  417. .BR iconName " (class " Title )
  418. Sets the icon name for the
  419. .I Emacs
  420. window icon.
  421. .TP
  422. .BR internalBorder " (class " BorderWidth )
  423. Sets the window's internal border width in pixels.
  424. .TP
  425. .BR lineSpacing " (class " LineSpacing )
  426. Additional space ("leading") between lines, in pixels.
  427. .TP
  428. .BR menuBar " (class " MenuBar )
  429. Gives frames menu bars if
  430. .IR on ;
  431. don't have menu bars if
  432. .IR off .
  433. See the Emacs manual, sections "Lucid Resources" and "LessTif
  434. Resources", for how to control the appearance of the menu bar
  435. if you have one.
  436. .TP
  437. .BR minibuffer " (class " Minibuffer )
  438. If
  439. .IR none ,
  440. don't make a minibuffer in this frame.
  441. It will use a separate minibuffer frame instead.
  442. .TP
  443. .BR paneFont " (class " Font )
  444. Font name for menu pane titles, in non-toolkit versions of
  445. .IR Emacs .
  446. .TP
  447. .BR pointerColor " (class " Foreground )
  448. For color displays,
  449. sets the color of the window's mouse cursor.
  450. .TP
  451. .BR privateColormap " (class " PrivateColormap )
  452. If
  453. .IR on ,
  454. use a private color map, in the case where the "default
  455. visual" of class
  456. .B PseudoColor
  457. and
  458. .B Emacs
  459. is using it.
  460. .TP
  461. .BR reverseVideo " (class " ReverseVideo )
  462. If
  463. .BR reverseVideo 's
  464. value is set to
  465. .IR on ,
  466. the window will be displayed in reverse video.
  467. .TP
  468. .BR screenGamma " (class "ScreenGamma )
  469. Gamma correction for colors, equivalent to the frame parameter
  470. `screen\-gamma'.
  471. .TP
  472. .BR scrollBarWidth " (class "ScrollBarWidth )
  473. The scroll bar width in pixels, equivalent to the frame parameter
  474. `scroll\-bar\-width'.
  475. .TP
  476. .BR selectionFont " (class " SelectionFont )
  477. Font name for pop-up menu items, in non-toolkit versions of
  478. .IR Emacs .
  479. (For toolkit versions, see the Emacs manual, sections
  480. "Lucid Resources" and "LessTif Resources".)
  481. .TP
  482. .BR selectionTimeout " (class " SelectionTimeout )
  483. Number of milliseconds to wait for a selection reply.
  484. A value of 0 means wait as long as necessary.
  485. .TP
  486. .BR synchronous " (class " Synchronous )
  487. Run Emacs in synchronous mode if
  488. .IR on .
  489. Synchronous mode is useful for debugging X problems.
  490. .TP
  491. .BR title " (class " Title )
  492. Sets the title of the
  493. .I Emacs
  494. window.
  495. .TP
  496. .BR toolBar " (class " ToolBar )
  497. Number of lines to reserve for the tool bar.
  498. .TP
  499. .BR useXIM " (class " UseXIM )
  500. Turns off use of X input methods (XIM) if
  501. .I false
  502. or
  503. .IR off .
  504. .TP
  505. .BR verticalScrollBars " (class " ScrollBars )
  506. Gives frames scroll bars if
  507. .IR on ;
  508. suppresses scroll bars if
  509. .IR off .
  510. .TP
  511. .BR visualClass " (class " VisualClass )
  512. Specify the "visual" that X should use.
  513. This tells X how to handle colors.
  514. The value should start with one of
  515. .IR TrueColor ,
  516. .IR PseudoColor ,
  517. .IR DirectColor ,
  518. .IR StaticColor ,
  519. .IR GrayScale ,
  520. and
  521. .IR StaticGray ,
  522. followed by
  523. .BI \- depth\fR,\fP
  524. where
  525. .I depth
  526. is the number of color planes.
  527. .RE
  528. .
  529. .SH MANUALS
  530. You can order printed copies of the GNU Emacs Manual from the Free
  531. Software Foundation, which develops GNU software.
  532. See the online store at <http://shop.fsf.org/>.
  533. .br
  534. Your local administrator might also have copies available.
  535. As with all software and publications from FSF, everyone is permitted
  536. to make and distribute copies of the Emacs manual.
  537. The Texinfo source to the manual is also included in the Emacs source
  538. distribution.
  539. .
  540. .
  541. .SH FILES
  542. /usr/local/share/info \(em files for the Info documentation browser.
  543. The complete text of the Emacs reference manual is included in a
  544. convenient tree structured form.
  545. Also includes the Emacs Lisp Reference Manual, useful to anyone
  546. wishing to write programs in the Emacs Lisp extension language,
  547. and the Introduction to Programming in Emacs Lisp.
  548. /usr/local/share/emacs/$VERSION/lisp \(em Lisp source files and
  549. compiled files that define most editing commands.
  550. Some are preloaded; others are autoloaded from this directory when
  551. used.
  552. /usr/local/libexec/emacs/$VERSION/$ARCH \(em various programs that are
  553. used with GNU Emacs.
  554. /usr/local/share/emacs/$VERSION/etc \(em various files of information.
  555. /usr/local/share/emacs/$VERSION/etc/DOC.* \(em contains the documentation
  556. strings for the Lisp primitives and preloaded Lisp functions
  557. of GNU Emacs.
  558. They are stored here to reduce the size of Emacs proper.
  559. /usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering
  560. various services to assist users of GNU Emacs, including education,
  561. troubleshooting, porting and customization.
  562. .
  563. .
  564. .SH BUGS
  565. There is a mailing list, bug-gnu-emacs@gnu.org, for reporting Emacs
  566. bugs and fixes.
  567. But before reporting something as a bug, please try to be sure that
  568. it really is a bug, not a misunderstanding or a deliberate feature.
  569. We ask you to read the section ``Reporting Bugs'' in the Emacs manual
  570. for hints on how and when to report bugs.
  571. Also, include the version number of the Emacs you are running in
  572. \fIevery\fR bug report that you send in.
  573. Bugs tend actually to be fixed if they can be isolated, so it is
  574. in your interest to report them in such a way that they can be
  575. easily reproduced.
  576. Do not expect a personal answer to a bug report.
  577. The purpose of reporting bugs is to get them fixed for everyone
  578. in the next release, if possible.
  579. For personal assistance, look in the SERVICE file (see above) for
  580. a list of people who offer it.
  581. Please do not send anything but bug reports to this mailing list.
  582. For more information about Emacs mailing lists, see the
  583. file /usr/local/share/emacs/$VERSION/etc/MAILINGLISTS.
  584. .
  585. .
  586. .SH UNRESTRICTIONS
  587. .I Emacs
  588. is free; anyone may redistribute copies of
  589. .I Emacs
  590. to anyone under the terms stated in the GNU General Public License,
  591. a copy of which accompanies each copy of
  592. .I Emacs
  593. and which also
  594. appears in the reference manual.
  595. .PP
  596. Copies of
  597. .I Emacs
  598. may sometimes be received packaged with distributions of Unix systems,
  599. but it is never included in the scope of any license covering those
  600. systems.
  601. Such inclusion violates the terms on which distribution is permitted.
  602. In fact, the primary purpose of the GNU General Public License is to
  603. prohibit anyone from attaching any other restrictions to
  604. redistribution of
  605. .IR Emacs .
  606. .PP
  607. Richard Stallman encourages you to improve and extend
  608. .IR Emacs ,
  609. and urges that
  610. you contribute your extensions to the GNU library.
  611. Eventually GNU (Gnu's Not Unix) will be a complete replacement
  612. for Unix.
  613. Everyone will be free to use, copy, study and change the GNU system.
  614. .
  615. .
  616. .SH SEE ALSO
  617. .BR emacsclient (1),
  618. .BR etags (1),
  619. .BR X (7),
  620. .BR xlsfonts (1),
  621. .BR xterm (1),
  622. .BR xrdb (1)
  623. .
  624. .
  625. .SH AUTHORS
  626. .I Emacs
  627. was written by Richard Stallman and the Free Software Foundation.
  628. For detailed credits and acknowledgements, see the GNU Emacs manual.
  629. .
  630. .
  631. .
  632. .SH COPYING
  633. Copyright
  634. .if t \(co
  635. .if n (C)
  636. 1995, 1999-2012 Free Software Foundation, Inc.
  637. .PP
  638. Permission is granted to make and distribute verbatim copies of this
  639. document provided the copyright notice and this permission notice are
  640. preserved on all copies.
  641. .PP
  642. Permission is granted to copy and distribute modified versions of
  643. this document under the conditions for verbatim copying, provided that
  644. the entire resulting derived work is distributed under the terms of
  645. a permission notice identical to this one.
  646. .PP
  647. Permission is granted to copy and distribute translations of this
  648. document into another language, under the above conditions for
  649. modified versions, except that this permission notice may be stated
  650. in a translation approved by the Free Software Foundation.
  651. .