home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / gnu-emacs-faq / part5 < prev   
Encoding:
Text File  |  1995-07-25  |  19.5 KB  |  466 lines

  1. Subject: GNU Emacs FAQ (5/5, 152-177): Mail and News
  2. Newsgroups: gnu.emacs.help,comp.emacs,gnu.emacs.gnus,news.answers,comp.answers
  3. From: sbyrnes@rice.edu (Steven Byrnes)
  4. Date: Tue, 4 May 1993 02:52:18 GMT
  5.  
  6. Archive-Name: GNU-Emacs-FAQ/part5
  7. Last-Modified: Sat, 6 Mar 1993 21:13:32 GMT
  8. Last-Posted: Tue, 4 May 1993 02:52:18 GMT
  9.  
  10.                        GNU Emacs FAQ: Mail and News
  11.  
  12. This portion of the GNU Emacs FAQ list is cross-posted to `gnu.emacs.gnus'
  13. because many of the questions herein deal with GNUS.  See `gnu.emacs.help' for
  14. the rest of the FAQ list.
  15.  
  16. If you are viewing this text in a GNU Emacs Buffer, you can type "M-2 C-x $" to
  17. get an overview of just the questions.  Then, when you want to look at the text
  18. of the answers, just type "C-x $".
  19.  
  20. To search for a question numbered XXX, type "M-C-s ^XXX:", followed by a C-r if
  21. that doesn't work, then type ESC to end the search.
  22.  
  23. A `+' in the 78th column means something was inserted on the line.  A `-' means
  24. something was deleted and a `!' means some combination of insertions and
  25. deletions occurred.
  26.  
  27. Full instructions for getting the latest FAQ are in question 22.  Also see the
  28. `Introduction to news.answers' posting in the `news.answers' newsgroup, or send
  29. e-mail to `mail-server@rtfm.mit.edu' with `help' on a body line, or use FTP,
  30. WAIS, or Prospero to rtfm.mit.edu.
  31.  
  32.  
  33.  
  34. Mail and News
  35.  
  36. 152: How do I change the included text prefix in mail/news followups?
  37.   
  38.   Many people want Emacs to prefix included text with something like ` > '
  39.   instead of with three spaces.  One way is to change the code of the
  40.   function `mail-yank-original' in lisp/sendmail.el that prefixes with
  41.   spaces.  A more flexible solution is to use Supercite, which provides wide
  42.   configurability in how you format included text in replies.  See question
  43.   107.  Both of these solutions work for RMAIL and GNUS.
  44.   
  45.   A related problem is how to prevent Emacs from including various headers
  46.   of the replied-to message.  For this, you should set the value of
  47.   mail-yank-ignored-headers, which takes a regexp value.
  48.   
  49. 153: How do I save a copy of outgoing mail?
  50.   
  51.   Two methods:
  52.   
  53.   1. (setq mail-self-blind t) will result in a `BCC:' header line with your
  54.      address being added to mail composition buffers.  This will cause the
  55.      mail system to send a copy of the mail back to you.
  56.   
  57.   2. (setq mail-archive-file-name (expand-file-name "~/outgoing")) will
  58.      result in an `FCC:' header line with the pathname of ~/outgoing being
  59.      added to mail composition buffers.  When you send the mail, Emacs will
  60.      save a copy of the mail in the file ~/outgoing and then strip off the
  61.      `FCC:' line before actually sending.
  62.   
  63.      WARNING: There is a bug in Emacs 18.58 that prevents mail readers such
  64.      as RMAIL from reading the saved mail messages individually.  See
  65.      question 155.
  66.   
  67.      WARNING: If you are visiting the file ~/outgoing at the time you send
  68.      the mail, this can cause a variety of horrible problems.  Jamie
  69.      Zawinski has written a solution for this.
  70.   
  71.   It does not work to put `set record filename' in the .mailrc file.
  72.   
  73. 154: Why doesn't Emacs expand my aliases when sending mail?
  74.   
  75.   * You must separate multiple addresses in the headers of the mail buffer
  76.     with commas.  This is because Emacs supports RFC822 standard addresses
  77.     like this one:
  78.   
  79.       To: Willy Smith <wks@xpnsv.lwyrs.com>
  80.   
  81.     However, you do not need to separate addresses with commas in your
  82.     .mailrc file.
  83.   
  84.     WARNING: Emacs breaks up aliases in the .mailrc file into multiple
  85.     addresses both on commas and on whitespace, regardless of any use of
  86.     quotes.  This is probably a bug.  You can get around this by directly
  87.     setting the value of mail-aliases.
  88.   
  89.   * Emacs normally only reads the `.mailrc' file once per session, when you
  90.     start to compose your first mail message.  If you edit .mailrc, you can
  91.     type "M-ESC (build-mail-aliases) RET" to make Emacs reread .mailrc.
  92.     (You have to include the parentheses where they are shown!)
  93.   
  94.   * Emacs does not interpret vendor-specific additions to the format of the
  95.     .mailrc file such as the `source' command.  It also ignores any `set'
  96.     commands.  The only commands it looks at are `alias' and `group'
  97.     commands.
  98.   
  99. 155: Why does RMAIL think all my saved messages are one big message?
  100.   
  101.   There is a bug for FCC-ed messages in Emacs 18.58 where it adds a timezone
  102.   on the "From " line after the year instead of before the year.  (Before it
  103.   didn't add the timezone at all.)  This is incompatible with the standard
  104.   format for the "From " line, and RMAIL in particular can no longer
  105.   distinguish between the messages.  Karl Berry <karl@cs.umb.edu>, Felix Lee
  106.   <flee@cs.psu.edu>, Nick Gianniotis <nico@japan.sbi.com> and many
  107.   others have all posted patches for this.  Karl's is the simplest and just
  108.   stops Emacs from adding the timezone:
  109.   
  110.     >*** ./ORIG/sendmail.el    Tue Jan 28 16:22:56 1992
  111.     >--- ./sendmail.el    Thu May 14 18:23:48 1992
  112.     >***************
  113.     >*** 285,287 ****
  114.     >        (insert "\nFrom " (user-login-name) " "
  115.     >!           (current-time-string) " " timezone "\n")
  116.     >        (insert-buffer-substring rmailbuf)
  117.     >--- 285,287 ----
  118.     >        (insert "\nFrom " (user-login-name) " "
  119.     >!           (current-time-string) "\n")
  120.     >        (insert-buffer-substring rmailbuf)
  121.   
  122. 156: How can I sort the messages in my RMAIL folder?
  123.   
  124.   Use rmailsort.el by Masanobu Umeda.
  125.   
  126. 157: Why does RMAIL need to write to /usr/spool/mail?
  127.   
  128.   This is the behavior of the `movemail' program which RMAIL uses.  This
  129.   indicates that movemail is configured to use lock files.
  130.   
  131.   RMS writes:
  132.   
  133.     Certain systems require lock files to interlock access to mail files.
  134.     On these systems, movemail must write lock files, or you risk losing
  135.     mail.  You simply must arrange to let movemail write them.
  136.   
  137.     Other systems use the flock system call to interlock access.  On these
  138.     systems, you should configure movemail to use flock.
  139.   
  140. 158: How do I recover my mail files after RMAIL munges their format?
  141.   
  142.   Users who just want to try RMAIL out to see how it works end up trapped
  143.   using it because saved mail in their `mbox' file has been converted into
  144.   an incompatible format (BABYL) that only RMAIL understands.  RMAIL
  145.   provides no obvious way to reverse this transformation.  Kyle Jones has
  146.   aptly named this "the great Emacs Mail Eating Monster".  To convert a mail
  147.   file back to standard Unix format, there are several methods:
  148.   
  149.   * Use the rmail-output ("C-o") command within RMAIL on each message in the
  150.     file.  First use M-x rmail or M-x rmail-input to visit the RMAIL file in
  151.     Rmail mode.  Type "1 j" to go to the first message.  Use the C-o command
  152.     to output the message to a Unix format file.  Type "n" to go to the next
  153.     message.  Repeat.
  154.   
  155.   * If the file contains hundreds of messages, you may not want to repeat
  156.     this for all of them.  Instead of the above, after getting to the first
  157.     message type this (where "mbox" is the file you want to put the messages
  158.     in):
  159.   
  160.       C-x ( C-o mbox RET M-s ^From: RET M-0 C-x )
  161.   
  162.     (The rmail-search command ("M-s") is used instead of just "n" because it
  163.     is the only command which will cause an error when it reaches the last
  164.     message in the file, which is necessary to terminate the keyboard macro.
  165.     This will fail if there are messages in the file that don't have a
  166.     `From:' header.  This assumes rmail-delete-after-output is nil.)
  167.   
  168.     It is wise to save a copy of the RMAIL file first, in case you make a
  169.     mistake.
  170.   
  171.   * There are software packages available for converting files or even
  172.     entire directories of BABYL files to standard Unix format.  These are
  173.     helpful in this situation, but are intended mainly for people who have
  174.     used RMAIL for a long time and are converting to some other mail reader.
  175.     Lookup `rmail', `vm', and `babyl' in the Emacs Lisp Archive (see
  176.     question 89).
  177.   
  178.   You may wish to disable RMAIL to avoid accidentally destroying your mbox
  179.   file (I have this in my .emacs):
  180.   
  181.     (put 'rmail 'disabled t)        ; avoid mbox destruction
  182.   
  183. 159: How do I make Emacs automatically start my mail/news reader?
  184.   
  185.   Example:
  186.   
  187.     emacs -f gnus
  188.   
  189.   Also:
  190.   
  191.     alias gnus 'emacs -f gnus'
  192.   
  193.   It is probably unwise to automatically start your mail or news reader from
  194.   your .emacs file.  This would cause problems if you needed to run two
  195.   copies of Emacs at one time.  Also, this would make it difficult for you
  196.   to start Emacs quickly when you needed to.
  197.   
  198. 160: How do I read news under Emacs?
  199.   
  200.   There are at least three news reading packages that operate inside Emacs.
  201.   `rnews' comes with Emacs.  GNUS and Gnews come separately.  rnews will
  202.   be replaced by GNUS in Emacs 19.
  203.   
  204.   rnews works only with a local news spool directory.  Both GNUS and Gnews
  205.   handle reading news remotely via NNTP in addition to reading from a local
  206.   news spool.  GNUS supports reading mail stored in MH folders or articles
  207.   saved by GNUS.
  208.   
  209.   Gnews is styled after `rn' and seems to work like RMAIL.  GNUS feels more
  210.   like VM.  People have complained that GNUS uses a lot of CPU time (it
  211.   does).  Some people have complained that Gnews is slower than GNUS.
  212.   
  213.   For more information about GNUS, see question 108.
  214.   
  215.   Gnews was written by Matthew P. Wiener <weemba@libra.wistar.upenn.edu>.
  216.   The latest version seems to be 2.0, posted October 3, 1988.  Matthew
  217.   posted some fixes on October 26, 1988.  Gnews does not appear to have been
  218.   supported after this date.  In particular, it has been reported that Gnews
  219.   does not work with Emacs 18.57.  There is a newsgroup for Gnews called
  220.   gnu.emacs.gnews.
  221.   
  222. 161: Why does `rnews' say "No News is good news" when there is news?
  223.   
  224.   rnews doesn't speak NNTP.  You may need to use GNUS or Gnews.
  225.   
  226. 162: Why doesn't GNUS work anymore via NNTP?
  227.   
  228.   There is a bug in NNTP version 1.5.10, such that when multiple requests
  229.   are sent to the NNTP server, the server only handles the first one before
  230.   blocking waiting for more input which never comes.  NNTP version 1.5.11
  231.   claims to fix this.
  232.   
  233.   You can work around the bug inside Emacs like this:
  234.   
  235.     (setq nntp-maximum-request 1)
  236.   
  237.   I also have a patch for NNTP 1.5.10 by Mike Pelletier
  238.   <stealth@engin.umich.edu> that is based on the timeout code that was in
  239.   1.5.9.  However, please try to upgrade to 1.5.11 first.
  240.   
  241.   You can find out what version of NNTP your news server is running by
  242.   telnetting to the NNTP port (usually 119) on the news server machine (ie.,
  243.   `telnet server-machine 119').  The server should give its version number
  244.   in the welcome message.  Type `quit' to get out.
  245.   
  246. 163: How do I view text with embedded underlining (eg., ClariNews)?
  247.   
  248.   Underlining appears like this:
  249.   
  250.     _^Hu_^Hn_^Hd_^He_^Hr_^Hl_^Hi_^Hn_^Hi_^Hn_^Hg
  251.   
  252.   You can destructively remove underlining with M-x ununderline-region.
  253.   
  254.   For ClariNews articles, clari-clean.el by David N. Blank-Edelman
  255.   <dnb@meshugge.media.mit.edu> will remove both underlining and overstriking
  256.   automatically.
  257.   
  258. 164: When I try to post a long article in GNUS (about 10K or longer), I get
  259.  the error, "Writing to process: no more processes, nntpd"
  260.   
  261.   Upgrade to Emacs 18.58 or higher.
  262.   
  263. 165: How do I save all the items of a multi-part posting in GNUS?
  264.   
  265.   Use gnus-mark.el by Jamie Zawinski <jwz@lucid.com>.
  266.   
  267. 166: Why does GNUS put the subjects in replies beyond the 80th column?
  268.   
  269.   This is a feature.  If you set gnus-thread-hide-subject to non-nil, GNUS
  270.   will only display the subject of the first posting in a thread, even if
  271.   some of the replies use different subjects.  It hides the subjects by
  272.   putting them past the edge of the window and setting truncate lines to t.
  273.   
  274.   If your screen looks messed up, then for some reason truncate-lines in
  275.   your `*Subject*' buffer has been set to nil.  It should be set to t.
  276.   
  277.   (I have an enhancement to GNUS 3.13 that will make it only hide the subject
  278.   of a posting when it is unchanged from the followed-up-to posting.  Thus,
  279.   you can use the subject hiding feature and still know when someone changes
  280.   the subject.  (I have forgotten who originally gave me the idea for this.))
  281.   
  282. 167: Why is GNUS so slow to start up?
  283.   
  284.   GNUS does several things that take quadratic time of the number of
  285.   newsgroups that are listed in .newsrc.  The quick fix for this is to
  286.   remove all the newsgroups in which you have no interest from your .newrc
  287.   file by using GNUS's C-k command in the `*Newsgroup*' buffer after
  288.   displaying all newsgroups with the L command.  If you were to directly
  289.   edit your .newsrc to remove the newsgroups, GNUS would add them back.
  290.   
  291.   GNUS uses a quadratic algorithm to check for duplicates when the .newsrc
  292.   file is newer than the .newsrc.el file (ie., you edited your .newsrc).
  293.   GNUS uses a quadratic algorithm to check for new newsgroups every time it
  294.   connects to the news server.  {There may be other quadratic algorithms
  295.   that I am not aware of.}
  296.   
  297.   You can speed up GNUS by using the C-k command in the *Newsgroup* buffer
  298.   to remove newsgroups from your .newsrc file.
  299.   
  300.   Of course, GNUS will run faster if you make sure it is byte-compiled.
  301.   
  302.   Felix Lee wrote some enhancements called `gnus-speedups.el' that fix some
  303.   of the problems.  See the Emacs Lisp Archive.
  304.   
  305. 168: How do I catch up all newsgroups in GNUS?
  306.   
  307.   In the `*Newsgroup*' buffer, type the following magical incantation:
  308.   
  309.     M-< C-x ( C-@ c y C-u C-@ C-e C-f C-f M-0 C-x )
  310.   
  311.   Leave off the "M-<" if you only want to catch up from point to the end of
  312.   the `*Newsgroup' buffer.
  313.   
  314. 169: Why can't I kill in GNUS on the Newsgroups/Keywords/Control line?
  315.   
  316.   GNUS 3.14.1 will complain that the `Newsgroups:', `Keywords:', and
  317.   `Control:' headers are `Unknown header field's.
  318.   
  319.   For the `Newsgroups:' header, there is an easy workaround: kill on the
  320.   `Xref' header instead, which will be present on any cross-posted article.
  321.   
  322.   If you really want to kill on one of these headers, you can do it like
  323.   this:
  324.   
  325.     (gnus-kill nil "^Newsgroups: .*\\(bad\\.group\\|worse\\.group\\)")
  326.   
  327.   Various people (eg., Greg Holley <holley@acuson.com>) have posted
  328.   solutions to allow more efficient killing on these headers than the
  329.   preceding solution.  Masanobu Umeda plans to fix this problem.
  330.   
  331. 170: How do I get rid of flashing messages in GNUS for slow connections?
  332.   
  333.   GNUS outputs "NNTP: Reading..." message and then clears them, over and
  334.   over.  In version 3.14.1 there is a variable named nntp-debug-read that
  335.   can help.  Johan Vromans <jv@mh.nl> wrote a fix.  Others have also written
  336.   fixes.
  337.   
  338. 171: Why is catch up slow in Gnews/GNUS?
  339.   
  340.   Because GNUS is marking crosspostings read.  {I think it should do this at
  341.   the time the article is read to spread out the load.  Maybe someone will
  342.   write the code to do this.}
  343.   
  344. 172: Why does GNUS hang for a long time when posting?
  345.   
  346.   David Lawrence <tale@uunet.uu.net> explains:
  347.   
  348.     The problem is almost always interaction between NNTP and C News.  NNTP
  349.     POST asks C News's inews to not background itself but rather hang around
  350.     and give its exit status so it knows whether the post was successful.
  351.     (That wait will on some systems not return the exit status of the
  352.     waited for job is a different sort of problem.)  It ends up taking a
  353.     long time because inews is calling relaynews, which often waits for
  354.     another relaynews to free the lock on the news system so it can file the
  355.     article.
  356.   
  357.     My preferred solution is to change inews to not call relaynews, but
  358.     rather use newsspool.  This loses some error-catching functionality, but
  359.     is for the most part safe as inews will detect a lot of the errors on
  360.     its own.  The C News folks have sped up inews, too, so speed should look
  361.     better to most folks as that update propagates around.
  362.   
  363. 173: Why don't my news postings in GNUS get past the local machine?
  364.   
  365.   Three possible reasons: local distribution, C News date problem (see
  366.   question 174, and the path problem.  This piece of code may fix the path
  367.   problem for you:
  368.   
  369.     (setq gnus-use-generic-path t)
  370.   
  371. 174: Why is the GNUS-generated `Date:' header invalid?
  372.   
  373.   GNUS generates `Date:' headers without time zones.  C-News's `inews'
  374.   doesn't replace it with a valid header, but will generate it if not
  375.   already there.  If it is invalid, the article will not be forwarded
  376.   properly.  Quick fix:
  377.   
  378.     (defun gnus-inews-date () nil)
  379.   
  380.   This is not fixed as of GNUS 3.14.1.
  381.   
  382. 175: Why doesn't GNUS generate the `Lines:' header?
  383.   
  384.   GNUS was written for B news, which would generate the `Lines:' header.  C
  385.   news doesn't.  There is a comment in C news's `inews' that you can
  386.   uncomment to enable this functionality.  Or you can have GNUS generate the
  387.   header, for example:
  388.   
  389.     ;; idea by jbryans@beach.csulb.edu (Jack Bryans)
  390.     (defun add-lines-header ()
  391.       ;; Count the number of lines in the current posting and insert the
  392.       ;; header line Lines into the message.
  393.       (save-excursion
  394.         (goto-char (point-min))
  395.         (if (search-forward "\n\n") ;; ***** I suspect this is wrong *****
  396.           (let ((lines (count-lines (point) (point-max))))
  397.             (forward-line -1)
  398.             (insert-string "Lines: " lines "\n")))))
  399.   
  400.   Mike Williams <mike-w@cs.aukuni.ac.nz> has written something similar.
  401.   
  402.   Ronald Florence <ron@mlfarm.com> has a patch for GNUS that makes it
  403.   calculate the `Lines:' header for incoming articles when necessary that
  404.   works for sites with local news spools.
  405.   
  406.   David Lawrence <tale@uunet.uu.net> says that GNUS 3.14.1 generates Lines
  407.   if gnus-news-system is Cnews.
  408.   
  409. 176: Why do I get "Cannot open load file" "nntp" when compiling GNUS?
  410.   
  411.   Specifically, the error message is this:
  412.   
  413.     Error occurred processing gnus.el: File error (("Cannot open load file" "nntp"))
  414.   
  415.   This means that nntp.el is not in Emacs's load-path, which is easy to
  416.   happen when compiling using the Makefile.
  417.   
  418.   Easiest solution: set EMACSLOADPATH in Makefile (idea from Glenn Gribble
  419.   <glenn@netcom.com>):
  420.   
  421.     EMACSLOADPATH=/usr/local/emacs/lisp:.
  422.     ELC= env EMACSLOADPATH=$(EMACSLOADPATH) emacs -batch -f batch-byte-compile
  423.   
  424.   Another solution, in hack.el put this:
  425.   
  426.     (defun gross-hack () (setq load-path (cons "/directory" load-path)))
  427.   
  428.   Then in Makefile:
  429.   
  430.     ELC= emacs -batch -l hack.el -f gross-hack -f batch-byte-compile
  431.   
  432. 177: How do I kill all articles in GNUS but those matching a pattern?
  433.   
  434.   Example:
  435.   
  436.     ;; kill everything
  437.     (gnus-kill "subject" "" nil nil)
  438.     ;; then restore stuff by our favorite poster
  439.     (gnus-kill "from" "good-guy"
  440.                (function
  441.                 (lambda ()
  442.                   (if (eq ?X (char-after (save-excursion
  443.                                            (beginning-of-line 1)
  444.                                            (point))))
  445.                       (gnus-Subject-clear-mark-forward 1))))
  446.                t)
  447.   
  448.  
  449.  
  450. ----------------------------------------------------------------------
  451. Copyright (C) 1990, 1991, 1992 Joseph Brian Wells
  452. Copyright (C) 1992, 1993 Steven Byrnes
  453.  
  454. This list of frequently asked questions about GNU Emacs with answers
  455. ("FAQ") may be translated into other languages, transformed into other
  456. formats (e.g. Texinfo, Info, WWW, WAIS, etc.), and updated with new
  457. information.  The same conditions apply to any derivative of the FAQ as
  458. apply to the FAQ itself.  Every copy of the FAQ must include this notice
  459. or an approved translation, information on who is currently maintaining
  460. the FAQ and how to contact them (including their e-mail address), and
  461. information on where the latest version of the FAQ is archived (including
  462. FTP information).  The FAQ may be copied and redistributed under these
  463. conditions, except that the FAQ may not be embedded in a larger literary
  464. work unless that work itself allows free copying and redistribution.
  465.  
  466.