home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / emacs-19.16 / info / emacs-13 < prev    next >
Encoding:
GNU Info File  |  1993-07-06  |  48.0 KB  |  1,230 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.54 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Rmail Reply,  Next: Rmail Summary,  Prev: Rmail Labels,  Up: Rmail
  6.  
  7. Sending Replies
  8. ===============
  9.  
  10.    Rmail has several commands that use Mail mode to send outgoing mail.
  11. *Note Sending Mail::, for information on using Mail mode.  What are
  12. documented here are the special commands of Rmail for entering Mail
  13. mode.  Note that the usual keys for sending mail, `C-x m' and `C-x 4 m',
  14. are available in Rmail mode and work just as they usually do.
  15.  
  16. `m'
  17.      Send a message (`rmail-mail').
  18.  
  19. `c'
  20.      Continue editing already started outgoing message
  21.      (`rmail-continue').
  22.  
  23. `r'
  24.      Send a reply to the current Rmail message (`rmail-reply').
  25.  
  26. `f'
  27.      Forward current message to other users (`rmail-forward').
  28.  
  29. `C-u f'
  30.      Resend the current message to other users (`rmail-resend').
  31.  
  32. `M-m'
  33.      Try sending a bounced message a second time
  34.      (`rmail-retry-failure').
  35.  
  36.    The most common reason to send a message while in Rmail is to reply
  37. to the message you are reading.  To do this, type `r' (`rmail-reply').
  38. This displays the `*mail*' buffer in another window, much like `C-x 4
  39. m', but preinitializes the `Subject', `To', `CC' and `In-reply-to'
  40. header fields based on the message you are replying to.  The `To' field
  41. is starts out as the address of the person who sent the message you
  42. received, and the `CC' field starts out with all the other recipients
  43. of that message.
  44.  
  45.    You can exclude certain recipients from being placed automatically in
  46. the `CC', using the variable `rmail-dont-reply-to-names'.  Its value
  47. should be a regular expression (as a string); any recipient that the
  48. regular expression matches, is excluded from the `CC' field.  The
  49. default value matches your own name, and any name starting with
  50. `info-'.  (Those names are excluded because there is a convention of
  51. using them for large mailing lists to broadcast announcements.)
  52.  
  53.    To omit the `CC' field completely for a particular reply, enter the
  54. reply command with a prefix argument: `C-u r'.
  55.  
  56.    Once the `*mail*' buffer has been initialized, editing and sending
  57. the mail goes as usual (*note Sending Mail::.).  You can edit the
  58. presupplied header fields if they are not right for you.  You can also
  59. use the commands of Mail mode, including `C-c C-y' to yank in the
  60. message that you are replying to, and `C-c C-q' to fill what was thus
  61. yanked.  You can also switch to the Rmail buffer, select a different
  62. message, switch back, and yank the new current message.
  63.  
  64.    Sometimes a message does not reach its destination.  Mailers usually
  65. send the failed message back to you, enclosed in a "failure message".
  66. The Rmail command `M-m' (`rmail-retry-failure') prepares to send the
  67. same message a second time: it sets up a `*mail*' buffer with the same
  68. text and header fields as before.  If you type `C-c C-c' right away,
  69. you send the message again exactly the same as the first time.
  70. Alternatively, you can edit the text or headers and then send it.
  71.  
  72.    Another frequent reason to send mail in Rmail is to "forward" the
  73. current message to other users.  `f' (`rmail-forward') makes this easy
  74. by preinitializing the `*mail*' buffer with the current message as the
  75. text, and a subject designating a forwarded message.  All you have to
  76. do is fill in the recipients and send.  When you forward a message,
  77. recipients get a message which is "from" you, and which has the
  78. original message in its contents.
  79.  
  80.    "Resending" is an alternative similar to forwarding; the difference
  81. is that resending sends a message that is "from" the original sender,
  82. just as it reached you--with a few added header fields `Resent-from'
  83. and `Resent-to' to indicate that it came via you.  To resend a message
  84. in Rmail, use `C-u f'.  (`f' runs `rmail-forward', which is programmed
  85. to invoke `rmail-resend' if you provide a numeric argument.)
  86.  
  87.    The `m' (`rmail-mail') command is used to start editing an outgoing
  88. message that is not a reply.  It leaves the header fields empty.  Its
  89. only difference from `C-x 4 m' is that it makes the Rmail buffer
  90. accessible for `C-c C-y', just as `r' does.  Thus, `m' can be used to
  91. reply to or forward a message; it can do anything `r' or `f' can do.
  92.  
  93.    The `c' (`rmail-continue') command resumes editing the `*mail*'
  94. buffer, to finish editing an outgoing message you were already
  95. composing, or to alter a message you have sent.
  96.  
  97. 
  98. File: emacs,  Node: Rmail Summary,  Next: Rmail Editing,  Prev: Rmail Reply,  Up: Rmail
  99.  
  100. Summaries
  101. =========
  102.  
  103.    A "summary" is a buffer containing one line per message to give you
  104. an overview of the mail in an Rmail file.  Each line shows the message
  105. number, the sender, the labels, and the subject.  When the summary
  106. buffer is selected, you can use almost all Rmail commands; these apply
  107. to the message described by the current line of the summary.  Moving
  108. point in the summary buffer selects messages as you move to their
  109. summary lines.
  110.  
  111.    A summary buffer applies to a single Rmail file only; if you are
  112. editing multiple Rmail files, each one has its own summary buffer (if
  113. you have asked for one).  The summary buffer name is made by appending
  114. `-summary' to the Rmail buffer's name.  Normally only one summary
  115. buffer is displayed at a time.
  116.  
  117. * Menu:
  118.  
  119. * Rmail Make Summary::  Making various sorts of summaries.
  120. * Rmail Summary Edit::  Manipulating messages from the summary.
  121.  
  122. 
  123. File: emacs,  Node: Rmail Make Summary,  Next: Rmail Summary Edit,  Up: Rmail Summary
  124.  
  125. Making Summaries
  126. ----------------
  127.  
  128.    Here are the commands to create a summary for the current Rmail file.
  129. Once the Rmail file has a summary buffer, changes in the Rmail file
  130. (such as deleting or expunging messages, and getting new mail)
  131. automatically update the summary.
  132.  
  133. `h'
  134. `C-M-h'
  135.      Summarize all messages (`rmail-summary').
  136.  
  137. `l LABELS RET'
  138. `C-M-l LABELS RET'
  139.      Summarize message that have one or more of the specified labels
  140.      (`rmail-summary-by-labels').
  141.  
  142. `C-M-r RCPTS RET'
  143.      Summarize messages that have one or more of the specified
  144.      recipients (`rmail-summary-by-recipients').
  145.  
  146. `C-M-t TOPIC RET'
  147.      Summarize messages that have a match for the specified regexp
  148.      TOPIC in their subjects (`rmail-summary-by-topic').
  149.  
  150.    The `h' or `C-M-h' (`rmail-summary') command fills the summary buffer
  151. for the current Rmail file with a summary of all the messages in the
  152. file.  It then displays and selects the summary buffer in another
  153. window.
  154.  
  155.    `C-M-l LABELS RET' (`rmail-summary-by-labels') makes a partial
  156. summary mentioning only the messages that have one or more of the
  157. labels LABELS.  LABELS should contain label names separated by commas.
  158.  
  159.    `C-M-r RCPTS RET' (`rmail-summary-by-recipients') makes a partial
  160. summary mentioning only the messages that have one or more of the
  161. recipients RCPTS.  RCPTS should contain mailing addresses separated by
  162. commas.
  163.  
  164.    `C-M-t TOPIC RET' (`rmail-summary-by-topic') makes a partial summary
  165. mentioning only the messages whose subjects have a match for the
  166. regular expression TOPIC.
  167.  
  168.    Note that there is only one summary buffer for any Rmail file;
  169. making one kind of summary discards any previously made summary.
  170.  
  171. 
  172. File: emacs,  Node: Rmail Summary Edit,  Prev: Rmail Make Summary,  Up: Rmail Summary
  173.  
  174. Editing in Summaries
  175. --------------------
  176.  
  177.    You can use the Rmail summary buffer to do almost anything you can do
  178. in the Rmail buffer itself.  In fact, once you have a summary buffer,
  179. there's no need to switch back to the Rmail buffer.
  180.  
  181.    You can select and display various messages in the Rmail buffer, from
  182. the summary buffer, just by moving point in the summary buffer to
  183. different lines.  It doesn't matter what Emacs command you use to move
  184. point; whichever line point is on at the end of the command, that
  185. message is selected in the Rmail buffer.
  186.  
  187.    Almost all Rmail commands work in the summary buffer as well as in
  188. the Rmail buffer.  Thus, `d' in the summary buffer deletes the current
  189. message, `u' undeletes, and `x' expunges.  `o' and `C-o' output the
  190. current message to a file; `r' starts a reply to it.  You can scroll
  191. the current message while remaining in the summary buffer using SPC and
  192. DEL.
  193.  
  194.    The Rmail commands to move between messages also work in the summary
  195. buffer, but with a twist: they move through the set of messages included
  196. in the summary.  They also redisplay the Rmail buffer on the screen
  197. (unlike cursor motion commands, which update the contents of the Rmail
  198. buffer but don't display it in a window unless it already appears).
  199. Here is a list of these commands:
  200.  
  201. `n'
  202.      Move to next line, skipping lines saying `deleted', and select its
  203.      message.
  204.  
  205. `p'
  206.      Move to previous line, skipping lines saying `deleted', and select
  207.      its message.
  208.  
  209. `M-n'
  210.      Move to next line and select its message.
  211.  
  212. `M-p'
  213.      Move to previous line and select its message.
  214.  
  215. `>'
  216.      Move to the last line, and select its message.
  217.  
  218. `<'
  219.      Move to the first line, and select its message.
  220.  
  221. `M-s PATTERN RET'
  222.      Search through messages for PATTERN starting with the current
  223.      message; select the message found, and move point in the summary
  224.      buffer to that message's line.
  225.  
  226.    Deletion, undeletion, and getting new mail, and even selection of a
  227. different message all update the summary buffer when you do them in the
  228. Rmail buffer.  If the variable `rmail-redisplay-summary' is non-`nil',
  229. these actions also bring the summary buffer back onto the screen.
  230.  
  231.    When you are finished using the summary, type `w'
  232. (`rmail-summary-wipe') to kill the summary buffer's window.  You can
  233. also exit Rmail while in the summary.  `q' (`rmail-summary-quit') kills
  234. the summary window, then saves the Rmail file and switches to another
  235. buffer.
  236.  
  237. 
  238. File: emacs,  Node: Rmail Editing,  Next: Rmail Digest,  Prev: Rmail Summary,  Up: Rmail
  239.  
  240. Editing Within a Message
  241. ========================
  242.  
  243.    Rmail mode provides a few special commands for moving within and
  244. editing the current message.  In addition, the usual Emacs commands are
  245. available (except for a few, such as `C-M-n' and `C-M-h', that are
  246. redefined by Rmail for other purposes).  However, the Rmail buffer is
  247. normally read-only, and to alter it you must use the Rmail command `e'
  248. described below.
  249.  
  250. `t'
  251.      Toggle display of original headers (`rmail-toggle-headers').
  252.  
  253. `e'
  254.      Edit current message (`rmail-edit-current-message').
  255.  
  256.    Rmail reformats the header of each message before displaying it.
  257. Normally this involves deleting most header fields, on the grounds that
  258. they are not interesting.  The variable `rmail-ignored-headers'
  259. specifies a regexp that matches the header fields to discard in this
  260. way.  The original headers are saved permanently, and to see what they
  261. look like, use the `t' command (`rmail-toggle-headers').  This discards
  262. the reformatted headers of the current message and displays it with the
  263. original headers.  Repeating `t' reformats the message again.
  264. Selecting the message again also reformats.
  265.  
  266.    The Rmail buffer is normally read only, and most of the characters
  267. you would type to modify it (including most letters) are redefined as
  268. Rmail commands.  This is usually not a problem since it is rare to want
  269. to change the text of a message.  When you do want to do this, the way
  270. is to type `e' (`rmail-edit-current-message'), which changes from Rmail
  271. mode into Rmail Edit mode, another major mode which is nearly the same
  272. as Text mode.  The mode line indicates this change.
  273.  
  274.    In Rmail Edit mode, letters insert themselves as usual and the Rmail
  275. commands are not available.  When you are finished editing the message
  276. and are ready to go back to Rmail, type `C-c C-c', which switches back
  277. to Rmail mode.  Alternatively, you can return to Rmail mode but cancel
  278. all the editing that you have done by typing `C-c C-]'.
  279.  
  280.    Entering Rmail Edit mode runs the hook `text-mode-hook'; then it
  281. runs the hook `rmail-edit-mode-hook' (*note Hooks::.).  It adds the
  282. attribute `edited' to the message.
  283.  
  284. 
  285. File: emacs,  Node: Rmail Digest,  Next: Out of Rmail,  Prev: Rmail Editing,  Up: Rmail
  286.  
  287. Digest Messages
  288. ===============
  289.  
  290.    A "digest message" is a message which exists to contain and carry
  291. several other messages.  Digests are used on some moderated mailing
  292. lists; all the messages that arrive for the list during a period of time
  293. such as one day are put inside a single digest which is then sent to the
  294. subscribers.  Transmitting the single digest uses much less computer
  295. time than transmitting the individual messages even though the total
  296. size is the same, because the per-message overhead in network mail
  297. transmission is considerable.
  298.  
  299.    When you receive a digest message, the most convenient way to read
  300. it is to "undigestify" it: to turn it back into many individual
  301. messages.  Then you can read and delete the individual messages as it
  302. suits you.
  303.  
  304.    To do this, type `M-x undigestify-rmail-message' after selecting the
  305. digest message.  This extracts the submessages as separate Rmail
  306. messages, and inserts them following the digest.  The digest message
  307. itself is flagged as deleted.
  308.  
  309. 
  310. File: emacs,  Node: Out of Rmail,  Next: Rmail Rot13,  Prev: Rmail Digest,  Up: Rmail
  311.  
  312. Converting an Rmail File to Mailbox Format
  313. ==========================================
  314.  
  315.    The command `M-x unrmail' converts a file in Rmail format to
  316. ordinary system mailbox format, so that you can use it with other
  317. mail-editing tools.  You must specify two arguments, the name of the
  318. Rmail file and the name to use for the converted file.  `M-x unrmail'
  319. does not alter the Rmail file itself.
  320.  
  321. 
  322. File: emacs,  Node: Rmail Rot13,  Prev: Out of Rmail,  Up: Rmail
  323.  
  324. Reading Rot13 Messages
  325. ======================
  326.  
  327.    Mailing list messages that might offend some readers are sometimes
  328. encoded in a simple code called "rot13"--so named because it rotates
  329. the alphabet by 13 letters.  This code is not for secrecy, as it
  330. provides none; rather, it enables those who might be offended to avoid
  331. ever seeing the real text of the message.
  332.  
  333.    To view a buffer using the rot13 code, use the command `M-x
  334. rot13-other-window'.  This displays the current buffer in another window
  335. which applies the code when displaying the text.
  336.  
  337. 
  338. File: emacs,  Node: Dired,  Next: Calendar/Diary,  Prev: Rmail,  Up: Top
  339.  
  340. Dired, the Directory Editor
  341. ***************************
  342.  
  343.    Dired makes an Emacs buffer containing a listing of a directory, and
  344. optionally some of its subdirectories as well.  You can use the normal
  345. Emacs commands to move around in this buffer, and special Dired commands
  346. to operate on the files listed.
  347.  
  348. * Menu:
  349.  
  350. * Enter: Dired Enter.         How to invoke Dired.
  351. * Commands: Dired Commands.   Commands in the Dired buffer.
  352. * Deletion: Dired Deletion.   Deleting files with Dired.
  353. * Visit: Dired Visiting.      Other file operations through Dired.
  354. * Marks vs Flags::          Flagging for deletion vs marking.
  355. * Operating on Files::          How to copy, rename, print, compress, etc.
  356.                     either one file or several files.
  357. * Shell Commands in Dired::   Running a shell command on the marked files.
  358. * Transforming File Names::   Using patterns to rename multiple files.
  359. * Comparison in Dired::          Running `diff' by way of Dired.
  360. * Subdirectories in Dired::   Adding subdirectories to the Dired buffer.
  361. * Subdirectory Motion::          Moving across subdirectories, and up and down.
  362. * Hiding Subdirectories::     Making subdirectories visible or invisible.
  363. * Updating: Dired Updating.   Discarding lines for files of no interest.
  364. * Find: Dired and Find.          Using `find' to choose the files for Dired.
  365.  
  366. 
  367. File: emacs,  Node: Dired Enter,  Next: Dired Commands,  Up: Dired
  368.  
  369. Entering Dired
  370. ==============
  371.  
  372.    To invoke Dired, do `C-x d' or `M-x dired'.  The command reads a
  373. directory name or wildcard file name pattern as a minibuffer argument
  374. to specify which files to list.  Where `dired' differs from
  375. `list-directory' is in putting the buffer into Dired mode so that the
  376. special commands of Dired are available.
  377.  
  378.    The variable `dired-listing-switches' specifies the options to give
  379. to `ls' for listing directory; this string *must* contain `-l'.  If you
  380. use a numeric prefix argument with the `dired' command, you can specify
  381. the `ls' switches with the minibuffer after you finish entering the
  382. directory specification.
  383.  
  384.    To display the Dired buffer in another window rather than in the
  385. selected window, use `C-x 4 d' (`dired-other-window)' instead of `C-x
  386. d'.
  387.  
  388. 
  389. File: emacs,  Node: Dired Commands,  Next: Dired Deletion,  Prev: Dired Enter,  Up: Dired
  390.  
  391. Commands in the Dired Buffer
  392. ============================
  393.  
  394.    The Dired buffer is "read-only", and inserting text in it is not
  395. useful, so ordinary printing characters such as `d' and `x' are used
  396. for special Dired commands.  Some Dired commands "mark" or "flag" the
  397. "current file" (that is, the file on the current line); other commands
  398. operate on the marked files or on the flagged files.
  399.  
  400.    All the usual Emacs cursor motion commands are available in Dired
  401. buffers.  Some special purpose cursor motion commands are also
  402. provided.  The keys `C-n' and `C-p' are redefined to put the cursor at
  403. the beginning of the file name on the line, rather than at the
  404. beginning of the line.
  405.  
  406.    For extra convenience, SPC and `n' in Dired are equivalent to `C-n'.
  407. `p' is equivalent to `C-p'.  (Moving by lines is so common in Dired
  408. that it deserves to be easy to type.)  DEL (move up and unflag) is
  409. often useful simply for moving up.
  410.  
  411. 
  412. File: emacs,  Node: Dired Deletion,  Next: Dired Visiting,  Prev: Dired Commands,  Up: Dired
  413.  
  414. Deleting Files with Dired
  415. =========================
  416.  
  417.    The primary use of Dired is to "flag" files for deletion and then
  418. delete the files previously flagged.
  419.  
  420. `d'
  421.      Flag this file for deletion.
  422.  
  423. `u'
  424.      Remove deletion flag on this line.
  425.  
  426. `DEL'
  427.      Move point to previous line and remove the deletion flag on that
  428.      line.
  429.  
  430. `x'
  431.      Delete the files that are flagged for deletion.
  432.  
  433. `#'
  434.      Flag all auto-save files (files whose names start and end with `#')
  435.      for deletion (*note Auto Save::.).
  436.  
  437. `~'
  438.      Flag all backup files (files whose names end with `~') for deletion
  439.      (*note Backup::.).
  440.  
  441. `. (Period)'
  442.      Flag excess numeric backup files for deletion.  The oldest and
  443.      newest few backup files of any one file are exempt; the middle
  444.      ones are flagged.
  445.  
  446. `% d REGEXP RET'
  447.      Flag for deletion all files whose names match the regular
  448.      expression REGEXP (`dired-flag-files-regexp').  This is just like
  449.      `% m' except that it uses `D' instead of `*' to mark the files.
  450.  
  451.      Only the non-directory part of the file name is used in matching.
  452.      Use `^' and `$' to anchor matches.  Exclude subdirectories by
  453.      hiding them (*note Hiding Subdirectories::.).
  454.  
  455.    You can flag a file for deletion by moving to the line describing the
  456. file and typing `d'.  The deletion flag is visible as a `D' at the
  457. beginning of the line.  This command moves point to the beginning of
  458. the next line, so that repeated `d' commands flag successive files.
  459.  
  460.    The files are flagged for deletion rather than deleted immediately to
  461. reduce the danger of deleting a file accidentally.  Until you direct
  462. Dired to expunge the flagged files, you can remove deletion flags using
  463. the commands `u' and DEL.  `u' works just like `d', but removes flags
  464. rather than making flags.  DEL moves upward, removing flags; it is like
  465. `u' with numeric argument automatically negated.
  466.  
  467.    To delete the flagged files, type `x' (`dired-expunge').  This
  468. command first displays a list of all the file names flagged for
  469. deletion, and requests confirmation with `yes'.  Once you confirm, `x'
  470. deletes all the flagged files, then deletes their lines from the text
  471. of the Dired buffer.  The shortened Dired buffer remains selected.
  472.  
  473.    If you answer `no' or quit with `C-g' when asked to confirm, you
  474. return immediately to Dired, with the deletion flags still present in
  475. the buffer, and no files actually deleted.
  476.  
  477.    The `#', `~' and `.' commands flag many files for deletion, based on
  478. their file names.  These commands are useful precisely because they do
  479. not actually delete any files; you can remove the deletion flags from
  480. any flagged files that you really wish to keep.
  481.  
  482.    `#' flags for deletion all files whose names look like auto-save
  483. files (*note Auto Save::.)--that is, files whose names begin and end
  484. with `#'.  `~' flags for deletion all files whose names say they are
  485. backup files (*note Backup::.)--that is, whose names end in `~'.
  486.  
  487.    `.' (Period) flags just some of the backup files for deletion: all
  488. but the oldest few and newest few backups of any one file.  Normally
  489. `dired-kept-versions' (*not* `kept-new-versions'; that applies only
  490. when saving) specifies the number of newest versions of each file to
  491. keep, and `kept-old-versions' specifies the number of oldest versions
  492. to keep.
  493.  
  494.    Period with a positive numeric argument, as in `C-u 3 .', specifies
  495. the number of newest versions to keep, overriding
  496. `dired-kept-versions'.  A negative numeric argument overrides
  497. `kept-old-versions', using minus the value of the argument to specify
  498. the number of oldest versions of each file to keep.
  499.  
  500.    The `% d' command flags all files whose names match a specified
  501. regular expression (`dired-flag-files-regexp').  Only the non-directory
  502. part of the file name is used in matching.  You can use `^' and `$' to
  503. anchor matches.  You can exclude subdirectories by hiding them (*note
  504. Hiding Subdirectories::.).
  505.  
  506. 
  507. File: emacs,  Node: Dired Visiting,  Next: Marks vs Flags,  Prev: Dired Deletion,  Up: Dired
  508.  
  509. Visiting Files in Dired
  510. =======================
  511.  
  512.    There are several Dired commands for visiting or examining the files
  513. listed in the Dired buffer.  All of them apply to the current line's
  514. file; if that file is really a directory, these commands invoke Dired on
  515. that subdirectory (using a separate Dired buffer).
  516.  
  517. `f'
  518.      Visit the file described on the current line, like typing `C-x C-f'
  519.      and supplying that file name (`dired-find-file').  *Note
  520.      Visiting::.
  521.  
  522. `o'
  523.      Like `f', but uses another window to display the file's buffer
  524.      (`dired-find-file-other-window').  The Dired buffer remains visible
  525.      in the first window.  This is like using `C-x 4 C-f' to visit the
  526.      file.  *Note Windows::.
  527.  
  528. `C-o'
  529.      Visit the file described on the current line, and display the
  530.      buffer in another window, but do not select that window
  531.      (`dired-display-file').
  532.  
  533. `v'
  534.      View the file described on the current line, using `M-x view-file'
  535.      (`dired-view-file').
  536.  
  537.      Viewing a file is like visiting it, but is slanted toward moving
  538.      around in the file conveniently and does not allow changing the
  539.      file.  *Note View File: Misc File Ops.
  540.  
  541. 
  542. File: emacs,  Node: Marks vs Flags,  Next: Operating on Files,  Prev: Dired Visiting,  Up: Dired
  543.  
  544. Dired Marks vs. Flags
  545. =====================
  546.  
  547.    Instead of flagging a file with `D', you can "mark" the file with
  548. some other character (usually `*').  Most Dired commands other than
  549. "expunge" (`x') operate on files marked with `*'.
  550.  
  551.    Here are some commands for marking with `*' (and also for
  552. unmarking).  (*Note Dired Deletion::, for commands to flag and unflag
  553. files.)
  554.  
  555. `m'
  556.      Mark the current file with `*' (`dired-mark').  With a numeric
  557.      argument N, mark the next N files starting with the current file.
  558.      (If N is negative, mark the previous -N files.)
  559.  
  560. `*'
  561.      Mark all executable files with `*' (`dired-mark-executables').
  562.      With a prefix argument, unmark all those files.
  563.  
  564. `@'
  565.      Mark all symbolic links with `*' (`dired-mark-symlinks').  With a
  566.      prefix argument, unmark all those files.
  567.  
  568. `/'
  569.      Mark with `*' all files which are actually directories, except for
  570.      `.' and `..' (`dired-mark-directories').  With a prefix argument,
  571.      unmark all those files.
  572.  
  573. `M-DEL MARKCHAR'
  574.      Remove all marks that use the character MARKCHAR
  575.      (`dired-unmark-all-files').  If you specify RET as MARKCHAR, this
  576.      command removes all marks, no matter what the marker character is.
  577.  
  578.      With a numeric argument, this command queries about each marked
  579.      file, asking whether to remove its mark.  You can answer `y'
  580.      meaning yes, `n' meaning no, `!' to remove the marks from the
  581.      remaining files without asking about them.
  582.  
  583. `c OLD NEW'
  584.      Replace all marks that use the character OLD with marks that use
  585.      the character NEW (`dired-change-marks').  This command is the
  586.      only way to create or use marks other than `*' or `D'.  The
  587.      arguments are single characters--do not use RET to terminate them.
  588.  
  589.      You can use almost any character as a mark character by means of
  590.      this command, to distinguish various classes of files.  If OLD is a
  591.      space (` '), then the command operates on all unmarked files; if
  592.      NEW is a space, then the command unmarks the files it acts on.
  593.  
  594.      To illustrate the power of this command, here is how to put `*'
  595.      marks on all the files that are unmarked, while unmarking all
  596.      those that have `*' marks:
  597.  
  598.           c * t  c SPC *  c t SPC
  599.  
  600. `% m REGEXP RET'
  601.      Mark (with `*') all files whose names match the regular expression
  602.      REGEXP (`dired-mark-files-regexp').
  603.  
  604.      Only the non-directory part of the file name is used in matching.
  605.      Use `^' and `$' to anchor matches.  Exclude subdirectories by
  606.      hiding them (*note Hiding Subdirectories::.).
  607.  
  608. 
  609. File: emacs,  Node: Operating on Files,  Next: Shell Commands in Dired,  Prev: Marks vs Flags,  Up: Dired
  610.  
  611. Operating on Files
  612. ==================
  613.  
  614.    This section describes the basic Dired commands to operate on one
  615. file or several files.  All of these commands are capital letters; all
  616. of them use the minibuffer, either to read an argument or to ask for
  617. confirmation, before they act.  All use the following convention to
  618. decide which files to manipulate:
  619.  
  620.    * If you give the command a numeric prefix argument N, it operates
  621.      on the next N files, starting with the current file.  (If N is
  622.      negative, the command operates on the -N files preceding the
  623.      current line.)
  624.  
  625.    * Otherwise, if some files are marked with `*', the command operates
  626.      on all those files.
  627.  
  628.    * Otherwise, the command operates on the current file only.
  629.  
  630.    Here are the commands that operate on files in this way:
  631.  
  632. `C NEW RET'
  633.      Copy the specified files (`dired-do-copy').  The argument NEW is
  634.      the directory to copy into, or (if copying a single file) the new
  635.      name.
  636.  
  637.      If `dired-copy-preserve-time' is non-`nil', then copying with this
  638.      command sets the modification time of the new file to be the same
  639.      as that of the old file.
  640.  
  641. `R NEW RET'
  642.      Rename the specified files (`dired-do-rename').  The argument NEW
  643.      is the directory to rename into, or (if renaming a single file)
  644.      the new name.
  645.  
  646.      Dired automatically changes the visited file name of buffers
  647.      associated with renamed files so that they refer to the new names.
  648.  
  649. `H NEW RET'
  650.      Make hard links to the specified files (`dired-do-hardlink').  The
  651.      argument NEW is the directory to make the links in, or (if making
  652.      just one link) the name to give the link.
  653.  
  654. `S NEW RET'
  655.      Make symbolic links to the specified files (`dired-do-symlink').
  656.      The argument NEW is the directory to make the links in, or (if
  657.      making just one link) the name to give the link.
  658.  
  659. `M MODESPEC RET'
  660.      Change the mode (also called "permission bits") of the specified
  661.      files (`dired-do-chmod').  This calls the `chmod' program, so
  662.      MODESPEC can be any argument that `chmod' can handle.
  663.  
  664. `G NEWGROUP RET'
  665.      Change the group of the specified files to NEWGROUP
  666.      (`dired-do-chgrp').
  667.  
  668. `O NEWOWNER RET'
  669.      Change the owner of the specified files to NEWOWNER
  670.      (`dired-do-chown').  (On most systems, only the superuser can do
  671.      this.)
  672.  
  673.      The variable `dired-chown-program' specifies the name of the
  674.      program to use to do the work (different systems put `chown' in
  675.      different places).
  676.  
  677. `P COMMAND RET'
  678.      Print the specified files (`dired-do-print').  You must specify the
  679.      command to print them with, but the minibuffer starts out with a
  680.      suitable guess made using the variables `lpr-command' and
  681.      `lpr-switches' (the same variables that `lpr-file' uses; *note
  682.      Hardcopy::.).
  683.  
  684. `Z'
  685.      Compress or uncompress the specified files (`dired-do-compress').
  686.      If the file appears to be a compressed file, it is uncompressed;
  687.      otherwise, it is compressed.
  688.  
  689. `L'
  690.      Load the specified Emacs Lisp files (`dired-do-load').  *Note Lisp
  691.      Libraries::.
  692.  
  693. `B'
  694.      Byte compile the specified Emacs Lisp files
  695.      (`dired-do-byte-compile').  *Note Byte Compilation: (elisp)Byte
  696.      Compilation.
  697.  
  698. 
  699. File: emacs,  Node: Shell Commands in Dired,  Next: Transforming File Names,  Prev: Operating on Files,  Up: Dired
  700.  
  701. Shell Commands in Dired
  702. =======================
  703.  
  704.    The dired command `!' (`dired-do-shell-command') reads a shell
  705. command string in the minibuffer and runs the shell command on all the
  706. specified files.  There are two ways of applying a shell command to
  707. multiple files:
  708.  
  709.    * If you use `*' in the shell command, then it runs just once, with
  710.      the list of file names substituted for the `*'.  The order of file
  711.      names is the order of appearance in the Dired buffer.
  712.  
  713.      Thus, `! tar cf foo.tar * RET' runs `tar' on the entire list of
  714.      file names, putting them into one tar file `foo.tar'.
  715.  
  716.    * If the command string doesn't contain `*', then it runs once *for
  717.      each file*, with the file name added at the end.
  718.  
  719.      For example, `! uudecode RET' runs `uudecode' on each file.
  720.  
  721.    What if you want to run the shell command once for each file but with
  722. the file name inserted in the middle?  Or if you want to use the file
  723. names in a more complicated fashion?  Use a shell loop.  For example,
  724. this shell command would run `uuencode' on each of the specified files,
  725. writing the output into a corresponding `.uu' file:
  726.  
  727.      for file in *; uuencode $file $file >$file.uu; done
  728.  
  729.    The working directory for the shell command is the top level
  730. directory of the Dired buffer.
  731.  
  732.    The `!' command does not attempt to update the Dired buffer to show
  733. new or modified files, because it doesn't really understand shell
  734. commands, and does not know what files the shell command changed.  Use
  735. the `g' command to update the Dired buffer (*note Dired Updating::.).
  736.  
  737. 
  738. File: emacs,  Node: Transforming File Names,  Next: Comparison in Dired,  Prev: Shell Commands in Dired,  Up: Dired
  739.  
  740. Transforming File Names in Dired
  741. ================================
  742.  
  743.    Here are commands that alter file names in a systematic way:
  744.  
  745. `% u'
  746.      Rename each of the selected files to an upper case name
  747.      (`dired-upcase').  If the old file names are `Foo' and `bar', the
  748.      new names are `FOO' and `BAR'.
  749.  
  750. `% l'
  751.      Rename each of the selected files to a lower case name
  752.      (`dired-downcase').  If the old file names are `Foo' and `bar',
  753.      the new names are `foo' and `bar'.
  754.  
  755. `% R FROM RET TO RET'
  756. `% C FROM RET TO RET'
  757. `% H FROM RET TO RET'
  758. `% S FROM RET TO RET'
  759.      These four commands rename, copy, make hard links and make soft
  760.      links, in each case computing the new name by regular expression
  761.      substitution from the name of the old file.
  762.  
  763.    The four regular expression substitution commands effectively perform
  764. `query-replace-regexp' on the selected file names in the Dired buffer.
  765. They read two arguments: a regular expression FROM, and a substitution
  766. pattern TO.
  767.  
  768.    The commands match each "old" file name against the regular
  769. expression FROM, and then replace the matching part with TO.  You can
  770. use `\&' and `\DIGIT' in TO to refer to all or part of the old file
  771. name, as in `query-replace' (*note Query Replace::.).
  772.  
  773.    For example, `% R ^.*$ RET x-\& RET' renames each selected file by
  774. prepending `x-' to its name.  The inverse of this, removing `x-' from
  775. the front of each file name, is also possible: one method is `% R
  776. ^x-.*$ RET \& RET'; another is `% R ^x- RET RET'.  (Use `^' and `$' to
  777. anchor matches that should span the whole filename.)
  778.  
  779.    If the regular expression matches more than once in a file name, only
  780. the first match is replaced.
  781.  
  782.    Normally, the replacement process does not consider the files'
  783. directory names; it operates on the file name within the directory.  If
  784. you specify a prefix argument of zero, then replacement affects the
  785. entire absolute file name including directory name.
  786.  
  787.    Often you will want to apply the command to all files matching the
  788. same REGEXP that you use in the command.  To do this, mark those files
  789. with `% m REGEXP RET', then use the same regular expression in the
  790. command to operate on the files.  To make this easier, the commands to
  791. operate use the last regular expression specified in a `%' command as a
  792. default.
  793.  
  794. 
  795. File: emacs,  Node: Comparison in Dired,  Next: Subdirectories in Dired,  Prev: Transforming File Names,  Up: Dired
  796.  
  797. File Comparison with Dired
  798. ==========================
  799.  
  800.    Here are two Dired commands that compare specified files using
  801. `diff'.
  802.  
  803. `='
  804.      Compare the current file (the file at point) with another file
  805.      (the file at the mark) using the `diff' program (`dired-diff').
  806.      The file at the mark is the first argument of `diff', and the file
  807.      at point is the second argument.
  808.  
  809. `M-='
  810.      Compare the current file with its latest backup file
  811.      (`dired-backup-diff').  If the current file is itself a backup,
  812.      compare it with the file it is a backup of; this way, you can
  813.      compare a file with any backup version of your choice.
  814.  
  815.      The backup file is the first file given to `diff'.
  816.  
  817. 
  818. File: emacs,  Node: Subdirectories in Dired,  Next: Subdirectory Motion,  Prev: Comparison in Dired,  Up: Dired
  819.  
  820. Subdirectories in Dired
  821. =======================
  822.  
  823.    A Dired buffer displays just one directory in the normal case; but
  824. you can optionally include its subdirectories as well.
  825.  
  826.    The simplest way to include multiple directories in one Dired buffer
  827. is to specify the options `-lR' for running `ls'.  (If you give a
  828. numeric argument when you run Dired, then you can specify these options
  829. in the minibuffer.)  That produces a recursive directory listing showing
  830. all subdirectories at all levels.
  831.  
  832.    But usually all the subdirectories are too many; usually you will
  833. prefer to include specific subdirectories only.  You can do this with
  834. the `i' command:
  835.  
  836. `i'
  837.      Insert the contents of a subdirectory later in the buffer.
  838.  
  839.      Use the `i' (`dired-maybe-insert-subdir') command on a line that
  840.      describes a file which is a directory.  It inserts the contents of
  841.      that directory into the same Dired buffer, and moves there.
  842.      Inserted subdirectory contents follow the top-level directory of
  843.      the Dired buffer, just as they do in `ls -lR' output.
  844.  
  845.      If the subdirectory's contents are already present in the buffer,
  846.      the `i' command just moves to it.
  847.  
  848.      In either case, `i' sets the Emacs mark before moving, so `C-x
  849.      C-x' takes you back to the old position in the buffer (the line
  850.      describing that subdirectory).
  851.  
  852.      Use the `l' command (`dired-do-redisplay') to update the
  853.      subdirectory's contents.  Use `k' to delete the subdirectory.
  854.      *Note Dired Updating::.
  855.  
  856. 
  857. File: emacs,  Node: Subdirectory Motion,  Next: Hiding Subdirectories,  Prev: Subdirectories in Dired,  Up: Dired
  858.  
  859. Moving Over Subdirectories
  860. ==========================
  861.  
  862.    When a Dired buffer lists subdirectories, you can use the page motion
  863. commands `C-x [' and `C-x ]' to move by entire directories.
  864.  
  865.    The following commands move across, up and down in the tree of
  866. directories within one Dired buffer.  They move to "directory header
  867. lines", which are the lines that give a directory's name, at the
  868. beginning of the directory's contents.
  869.  
  870. `C-M-n'
  871.      Go to next subdirectory header line, regardless of level
  872.      (`dired-next-subdir').
  873.  
  874. `C-M-p'
  875.      Go to previous subdirectory header line, regardless of level
  876.      (`dired-prev-subdir').
  877.  
  878. `C-M-u'
  879.      Go up to the parent directory's header line (`dired-tree-up').
  880.  
  881. `C-M-d'
  882.      Go down in the directory tree, to the first subdirectory's header
  883.      line (`dired-tree-down').
  884.  
  885. 
  886. File: emacs,  Node: Hiding Subdirectories,  Next: Dired Updating,  Prev: Subdirectory Motion,  Up: Dired
  887.  
  888. Hiding Subdirectories
  889. =====================
  890.  
  891.    "Hiding" a subdirectory means to make it invisible, except for its
  892. header line, via selective display (*note Selective Display::.).
  893.  
  894. `$'
  895.      Hide or reveal the subdirectory that point is in, and move point
  896.      to the next subdirectory (`dired-hide-subdir').  A numeric
  897.      argument serves as a repeat count.
  898.  
  899. `M-$'
  900.      Hide all subdirectories in this Dired buffer, leaving only their
  901.      header lines (`dired-hide-all').  Or, if any subdirectory is
  902.      currently hidden, make all subdirectories visible again.  You can
  903.      use this command to get an overview in very deep directory trees
  904.      or to move quickly to subdirectories far away.
  905.  
  906.    Ordinary Dired commands never consider files inside a hidden
  907. subdirectory.  For example, the commands to operate on marked files
  908. ignore files in hidden directories even if they are marked.  Thus you
  909. can use hiding to temporarily exclude subdirectories from operations
  910. without having to remove the markers.
  911.  
  912.    The subdirectory hiding commands toggle; that is they unhide what was
  913. hidden and vice versa.
  914.  
  915. 
  916. File: emacs,  Node: Dired Updating,  Next: Dired and Find,  Prev: Hiding Subdirectories,  Up: Dired
  917.  
  918. Updating the Dired Buffer
  919. =========================
  920.  
  921.    This section describes commands to update the Dired buffer to reflect
  922. outside (non-Dired) changes in the directories and files, and to delete
  923. part of the Dired buffer.
  924.  
  925. `g'
  926.      Update the entire contents of the Dired buffer (`revert-buffer').
  927.  
  928. `l'
  929.      Update the specified files (`dired-do-redisplay').
  930.  
  931. `k'
  932.      Delete the specified *file lines*--not the files, just the lines
  933.      (`dired-do-kill-lines').
  934.  
  935.    Type `g' (`revert-buffer') to update the contents of the Dired
  936. buffer, based on changes in the files and directories listed.  This
  937. preserves all marks except for those on files that have vanished.
  938. Hidden subdirectories are updated but remain hidden.
  939.  
  940.    To update only some of the files, type `l' (`dired-do-redisplay').
  941. This command applies to the next N files, or to the marked files if
  942. any, or to the current file.  Updating them means reading their current
  943. status from the file system and changing the buffer to reflect it
  944. properly.
  945.  
  946.    If you use `l' on a subdirectory header line, it updates the
  947. contents of the corresponding subdirectory.
  948.  
  949.    To delete the specified *file lines*--not the files, just the
  950. lines--type `k' (`dired-do-kill-lines').  This command applies to the
  951. next N files, or to the marked files if any, or to the current file.
  952.  
  953.    If you kill the line for a file that is a directory, the directory's
  954. contents are also deleted from the buffer.  Typing `C-u k' on the
  955. header line for a subdirectory is another way to delete a subdirectory
  956. from the Dired buffer.
  957.  
  958.    The `g' command brings back any individual lines that you have
  959. killed in this way, but not subdirectories--you must use `i' to
  960. reinsert each subdirectory.
  961.  
  962. 
  963. File: emacs,  Node: Dired and Find,  Prev: Dired Updating,  Up: Dired
  964.  
  965. Dired and `find'
  966. ================
  967.  
  968.    You can select a set of files for display in a Dired buffer more
  969. flexibly by using the `find' utility to choose the files.
  970.  
  971.    To search for files with names matching a wildcard pattern use `M-x
  972. find-name-dired'.  It reads arguments DIRECTORY and PATTERN, and
  973. chooses all the files in DIRECTORY or its subdirectories whose
  974. individual names match PATTERN.
  975.  
  976.    The files thus chosen are displayed in a Dired buffer in which the
  977. ordinary Dired commands are available.
  978.  
  979.    If you want to test the contents of files, rather than their names,
  980. use `M-x find-grep-dired'.  This command reads two minibuffer
  981. arguments, DIRECTORY and REGEXP; it chooses all the files in DIRECTORY
  982. or its subdirectories that contain a match for REGEXP.  It works by
  983. running the programs `find' and `grep'.
  984.  
  985.    The most general command in this series is `M-x find-dired', which
  986. lets you specify any condition that `find' can test.  It takes two
  987. minibuffer arguments, DIRECTORY and FIND-ARGS; it runs `find' in
  988. DIRECTORY, passing FIND-ARGS to tell `find' what condition to test.  To
  989. use this command, you need to know how to use `find'.
  990.  
  991. 
  992. File: emacs,  Node: Calendar/Diary,  Next: GNUS,  Prev: Dired,  Up: Top
  993.  
  994. The Calendar and the Diary
  995. **************************
  996.  
  997.    Emacs provides the functions of a desk calendar, with a diary of
  998. planned or past events.  To enter the calendar, type `M-x calendar';
  999. this displays a three-month calendar centered on the current month, with
  1000. point on the current date.  If you use prefix argument as in `C-u M-x
  1001. calendar', it prompts you for the month and year to be the center of
  1002. the three-month calendar.  The calendar uses its own buffer and the
  1003. major mode is Calendar mode.
  1004.  
  1005.    To exit the calendar, type `q'.
  1006.  
  1007. * Menu:
  1008.  
  1009. * Calendar Motion::       Moving through the calendar; selecting a date.
  1010. * Scroll Calendar::       Bringing earlier or later months onto the screen.
  1011. * Counting Days::         How many days are there between two dates?
  1012. * General Calendar::      Exiting or recomputing the calendar.
  1013. * Holidays::              Displaying dates of holidays.
  1014. * Sunrise/Sunset::        Displaying local times of sunrise and sunset.
  1015. * Lunar Phases::          Displaying phases of the moon.
  1016. * Other Calendars::       Converting dates to other calendar systems.
  1017. * Diary::                 Displaying events from your diary.
  1018. * Appointments::      Reminders when it's time to do something.
  1019. * Daylight Savings::      How to specify when daylight savings time is active.
  1020.  
  1021. 
  1022. File: emacs,  Node: Calendar Motion,  Next: Scroll Calendar,  Up: Calendar/Diary
  1023.  
  1024. Movement in the Calendar
  1025. ========================
  1026.  
  1027.    Calendar mode lets you move in logical units of time such as days,
  1028. weeks, months, and years.  If you move outside the three months
  1029. originally displayed, the calendar display scrolls automatically through
  1030. time.  Moving to a date lets you view its holidays or diary entries,
  1031. convert it to other calendars; moving longer time periods is useful
  1032. simply to scroll the calendar.
  1033.  
  1034. * Menu:
  1035.  
  1036. * Calendar Unit Motion::       Moving by days, weeks, months, and years.
  1037. * Move to Beginning or End::   Moving to start/end of weeks, months, and
  1038.                                  years.
  1039. * Specified Dates::            Moving to the current date or another
  1040.                                  specific date.
  1041.  
  1042. 
  1043. File: emacs,  Node: Calendar Unit Motion,  Next: Move to Beginning or End,  Up: Calendar Motion
  1044.  
  1045. Motion by Integral Days, Weeks, Months, Years
  1046. ---------------------------------------------
  1047.  
  1048.    The commands for movement in the calendar buffer parallel the
  1049. commands for movement in text.  You can move forward and backward by
  1050. days, weeks, months, and years.
  1051.  
  1052. `C-f'
  1053.      Move point one day forward (`calendar-forward-day').
  1054.  
  1055. `C-b'
  1056.      Move point one day backward (`calendar-backward-day').
  1057.  
  1058. `C-n'
  1059.      Move point one week forward (`calendar-forward-week').
  1060.  
  1061. `C-p'
  1062.      Move point one week backward (`calendar-backward-week').
  1063.  
  1064. `M-}'
  1065.      Move point one month forward (`calendar-forward-month').
  1066.  
  1067. `M-{'
  1068.      Move point one month backward (`calendar-backward-month').
  1069.  
  1070. `C-x ]'
  1071.      Move point one year forward (`calendar-forward-year').
  1072.  
  1073. `C-x ['
  1074.      Move point one year backward (`calendar-forward-year').
  1075.  
  1076.    The day and week commands are natural analogues of the usual Emacs
  1077. commands for moving by characters and by lines.  Just as `C-n' usually
  1078. moves to the same column in the following line, in Calendar mode it
  1079. moves to the same day in the following week.  And `C-p' moves to the
  1080. same day in the previous week.
  1081.  
  1082.    The arrow keys are equivalent to `C-f', `C-b', `C-n' and `C-p', just
  1083. as they normally are in other modes.
  1084.  
  1085.    The commands for motion by months and years work like those for
  1086. weeks, but move a larger distance.  The month commands `M-}' and `M-{'
  1087. move forward or backward by an entire month's time.  The year commands
  1088. `C-x ]' and `C-x [' move forward or backward a whole year.
  1089.  
  1090.    The easiest way to remember these commands is to consider months and
  1091. years analogous to paragraphs and pages of text, respectively.  But the
  1092. commands themselves are not quite analogous.  The ordinary Emacs
  1093. paragraph commands move to the beginning or end of a paragraph, whereas
  1094. these month and year commands move by an entire month or an entire
  1095. year, which usually involves skipping across the end of a month or year.
  1096.  
  1097.    All these commands accept a numeric argument as a repeat count.  For
  1098. convenience, the digit keys and the minus sign specify numeric
  1099. arguments in Calendar mode even without the Meta modifier.  For example,
  1100. `100 C-f' moves point 100 days forward from its present location.
  1101.  
  1102. 
  1103. File: emacs,  Node: Move to Beginning or End,  Next: Specified Dates,  Prev: Calendar Unit Motion,  Up: Calendar Motion
  1104.  
  1105. Beginning or End of Week, Month or Year
  1106. ---------------------------------------
  1107.  
  1108.    A week (or month, or year) is not just a quantity of days; we think
  1109. of new weeks (months, years) as starting on particular days.  So
  1110. Calendar mode provides commands to move to the beginning or end of a
  1111. week, month or year:
  1112.  
  1113. `C-a'
  1114.      Move point to beginning of week (`calendar-beginning-of-week').
  1115.  
  1116. `C-e'
  1117.      Move point to end of week (`calendar-end-of-week').
  1118.  
  1119. `M-a'
  1120.      Move point to beginning of month (`calendar-beginning-of-month').
  1121.  
  1122. `M-e'
  1123.      Move point to end of month (`calendar-end-of-month').
  1124.  
  1125. `M-<'
  1126.      Move point to beginning of year (`calendar-beginning-of-year').
  1127.  
  1128. `M->'
  1129.      Move point to end of year (`calendar-end-of-year').
  1130.  
  1131.    These commands also take numeric arguments as repeat counts, with the
  1132. repeat count indicating how many weeks, months, or years to move
  1133. backward or forward.
  1134.  
  1135. 
  1136. File: emacs,  Node: Specified Dates,  Prev: Move to Beginning or End,  Up: Calendar Motion
  1137.  
  1138. Particular Dates
  1139. ----------------
  1140.  
  1141.    Calendar mode provides commands for getting to a particular date
  1142. specified absolutely.
  1143.  
  1144. `g d'
  1145.      Move point to specified date (`calendar-goto-date').
  1146.  
  1147. `o'
  1148.      Center calendar around specified month (`calendar-other-month').
  1149.  
  1150. `.'
  1151.      Move point to today's date (`calendar-current-month').
  1152.  
  1153.    `g d' (`calendar-goto-date') prompts for a year, a month, and a day
  1154. of the month, and then moves to that date.  Because the calendar
  1155. includes all dates from the beginning of the current era, you must type
  1156. the year in its entirety; that is, type `1990', not `90'.
  1157.  
  1158.    `o' (`calendar-other-month') prompts for a month and year, then
  1159. centers the three-month calendar around that month.
  1160.  
  1161.    You can return to today's date with `.' (`calendar-current-month').
  1162.  
  1163. 
  1164. File: emacs,  Node: Scroll Calendar,  Next: Counting Days,  Prev: Calendar Motion,  Up: Calendar/Diary
  1165.  
  1166. Scrolling in the Calendar
  1167. =========================
  1168.  
  1169.    The calendar display scrolls automatically through time when you
  1170. move out of the visible portion.  You can also scroll it manually.
  1171. Imagine that the calendar window contains a long strip of paper with
  1172. the months on it.  Scrolling it means moving the strip so that new
  1173. months become visible in the window.
  1174.  
  1175. `C-x <'
  1176.      Scroll calendar one month forward (`scroll-calendar-left').
  1177.  
  1178. `C-x >'
  1179.      Scroll calendar one month backward (`scroll-calendar-right').
  1180.  
  1181. `C-v'
  1182. `NEXT'
  1183.      Scroll calendar three months forward
  1184.      (`scroll-calendar-left-three-months').
  1185.  
  1186. `M-v'
  1187. `PRIOR'
  1188.      Scroll calendar three months backward
  1189.      (`scroll-calendar-right-three-months').
  1190.  
  1191. `SPC'
  1192.      Scroll the next window (`scroll-other-window').
  1193.  
  1194.    The most basic calendar scroll commands scroll by one month at a
  1195. time.  This means that there are two months of overlap between the
  1196. display before the command and the display after.  `C-x <' scrolls the
  1197. calendar contents one month to the left; that is, it moves the display
  1198. forward in time.  `C-x >' scrolls the contents to the right, which
  1199. moves backwards in time.
  1200.  
  1201.    The commands `C-v' and `M-v' scroll the calendar by an entire
  1202. "screenful"--three months--in analogy with the usual meaning of these
  1203. commands.  `C-v' makes later dates visible and `M-v' makes earlier
  1204. dates visible.  These commands take a numeric argument as a repeat
  1205. count; in particular, since `C-u' (`universal-argument') multiplies the
  1206. next command by four, typing `C-u C-v' scrolls the calendar forward by
  1207. a year and typing `C-u M-v' scrolls the calendar backward by a year.
  1208.  
  1209.    The function keys NEXT and PRIOR are equivalent to `C-v' and `M-v',
  1210. just as they are in other modes.
  1211.  
  1212.    In Calendar mode, you can use `SPC' (`scroll-other-window') to
  1213. scroll the other window.  This is handy when you display a list of
  1214. holidays or diary entries in another window.
  1215.  
  1216. 
  1217. File: emacs,  Node: Counting Days,  Next: General Calendar,  Prev: Scroll Calendar,  Up: Calendar/Diary
  1218.  
  1219. Counting Days
  1220. =============
  1221.  
  1222. `M-='
  1223.      Display the number of days in the current region
  1224.      (`calendar-count-days-region').
  1225.  
  1226.    To determine the number of days in the region, type `M-='
  1227. (`calendar-count-days-region').  The numbers of days printed is
  1228. *inclusive*; that is, it includes the days specified by mark and point.
  1229.  
  1230.