Gnus 5.x Frequently Asked Questions


Introduction

This is the Gnus Frequently Asked Questions list.

Gnus is a Usenet Newsreader and Electronic Mail User Agent implemented as a part of Emacs. It's been around in some form for over 6 years now, and has been distributed as a standard part of Emacs for much of that time. Gnus 5 is the latest (and greatest) incarnation. The original version was called GNUS, and was written by Masanobu UMEDA. When autumn crept up in '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.

Its biggest strength is the fact that it is extremely customizable. It is somewhat intimidating at first glance, but most of the complexity can be ignored until you're ready to take advantage of it. If you receive a reasonable volume of e-mail (you're on various mailing lists), or you would like to read high-volume mailing lists but cannot keep up with them, then you definitely want to investigate Gnus for reading mail.

This FAQ has a new maintainer. Steve Baur just handed off maintainance of the Gnus FAQ to me, Justin Sheehy. I would like to thank Steve Baur and Per Abrahamsen for doing a wonderful job with this FAQ before me.

If you have a Web browser, the official hypertext version is at: <URL:http://www.ccs.neu.edu/software/gnus/> . This version is much nicer than the unofficial hypertext versions that are archived at Utrecht, Oxford, Smart Pages, Ohio State, and other FAQ archives. See the resources question below if you want information on obtaining it in another format.

The information contained here was compiled with the assistance of the Gnus development mailing list, and any errors or misprints are my (Justin Sheehy's) fault, sorry.

What's changed since last time?

  1. Updated Question 1.1 (Gnus 5.4 has been released)

This file was last modified on January 29, 1997.

------------------------------

Table Of Contents

  1. Installation
  2. Customizing Gnus
  3. Reading News
  4. Reading Mail

1. Installation


Q1.1 What is the latest version of Gnus?

Newsflash! Gnus 5.4 has been released. (January 25, 1997)

Note: There are many questions here whose answers are different with regard to Gnus 5.4.x. Over the next couple of weeks I will try to add these changes, without deleting the old answers (as there is no need to leave Gnus 5.2 users out in the cold). If you have a new, updated for Gnus 5.4 suggestion for any part of the FAQ, feel free to email your suggestions to me at <dworkin@ccs.neu.edu>.

There are many different versions of Gnus available now. The latest (and greatest) general version is 5.4.7. While in alpha testing it was called Red Gnus.

Gnus 5.0.13 is included in the official distribution of Emacs 19.30/19.31 and has a version number of 5.1. Do not attempt to use this release of Gnus with other Emacsen, as the necessary required support has been stripped out of it. Gnus 5.2.38 aka Gnus 5.3 is included in Emacs 19.32. Gnus 5.0.15 is the most recent version that will work with old emacsen like XEmacs 19.13.

Gnus 5.2.25 is included standard with XEmacs 19.14.

Gnus 5.4.7 is the latest version. It has lots of new stuff in it, including new backends for using search engines like Dejanews as a source of articles.

The next experimental version of Gnus has been named Mamey Sapote Gnus. If you really want to know why, take a look at <URL:http://www.miranova.com/~steve/why-mamey-sapote.html>.

Q1.2 Where do I get Gnus?

The latest version is available via anonymous FTP or <URL:ftp://ftp.ifi.uio.no/pub/emacs/gnus/gnus.tar.gz>. You can also fetch it from the North American mirrors: <URL:ftp://ftp.miranova.com/pub/gnus/ifi.uio.no/>, <URL:ftp://ftp.ccs.neu.edu/pub/mirrors/ftp.ifi.uio.no/pub/emacs/gnus/>, <URL:ftp://aphrodite.nectar.cs.cmu.edu/pub/ding-gnus/> or <URL:ftp://ftp.statsci.com/pub/users/scott/ding-gnus/>. The last site should only be used as a last resort.

Or, get it from the South American mirror: <URL:ftp://ftp.unicamp.br/pub/news.software/gnus/>.

Q1.3 Which version of Emacs do I need?

Prior to Gnus 5.2, at least GNU Emacs 19.28, or XEmacs 19.12 was recommended. GNU Emacs 19.25 has been reported to work under certain circumstances, but it doesn't officially work on it. 19.27 has also been reported to work.

Because of Gnus 5.2's use of Common Lisp features present only in late-model emacsen, it will only work with Emacs 19.30 or later, and XEmacs 19.14 or later.

Gnus has been reported to work under VMS, OS/2, and Microsoft Windows NT 3.51, as well as Unix.

OS/2 requires

(setq gnus-score-file-suffix "score")
(setq gnus-adaptive-file-suffix "adapt")
in the user's .gnus.

Ed Mccreary <forge@neosoft.com> writes:
[For Microsoft Windows NT] Be sure to grab the nttcp.exe file needed to perform the winsock communication and configure emacs to use it instead of the default tcp. You will also need to put

(setq tcp-program-name "nttcp")
in your _emacs file.

Jack Vinson <jvinson@cheux.ecs.umass.edu> writes:
Actually, any TCP program will work. I have tcp.exe from the people who are doing win32 ports of Gnu software. I found it at
<URL:ftp://microlib.cc.utexas.edu/microlib/nt/gnu/gnubin.tar.Z>. Be warned that this is a large (7mb) archive of all sorts of stuff, including (for some reason) all the e-lisp files you will ever want. I just downloaded it and extracted the functions I wanted.

Ron Forrester <rjf@infograph.com> writes:
With the release of GNU Emacs 19.31, Microsoft Windows '95 & NT users no longer need nttcp.exe as Emacs now has open-network-stream built in.

Q1.6 How do I unsubscribe from the Mailing List?

Send an e-mail message to <URL:mailto:ding-request@ifi.uio.no> with the magic word unsubscribe somewhere in it, and you will be removed.

If you are reading the digest version of the list, send an e-mail message to <URL:mailto:ding-rn-digests-request@bluesky.net> with unsubscribe as the subject and you will be removed.

Q1.7 How do I run Gnus on both Emacs and XEmacs?

You don't. Gnus is distributed with both emacsen, use the version of Gnus that comes with your emacs.

Q1.8 What resources are available?

There is the newsgroup Gnu.emacs.gnus. Discussion of Gnus 5.x is now taking place there. There is also a mailing list, send mail to ding-request@ifi.uio.no with the magic word subscribe somewhere in it. NOTE: the traffic on this list is heavy so you may not want to be on it (unless you use Gnus as your mailer reader, that is). The mailing list is mainly for developers and testers.

Jason L Tibbitts III <tibbs@hpc.uh.edu> writes:
Archives of the Ding mailing list are easily accessible by using gnus-group-make-archive-group, by default bound to G a in the Group buffer. This presents you with a group containing the 500 most recent articles from the mailing list. When called with a prefix argument, as in C-u G a, the entire (rather huge) archive is fetched. The archives are made available via FTP by Jason Tibbitts (tibbs@uh.edu); complain to him about problems with access. The magic of accessing the archives is provided by Gnus.

A digestified version of the list is available by sending a mail message to <URL:mailto:ding-rn-digests-request@bluesky.net> with the word subscribe in the Subject field. Digests are sent every few days. Archives are available via SmartList commands, just use the above address with a Subject of help to get details.

This mailing list is mirrored on the World Wide Web at
<URL:http://www.miranova.com/gnus-list/>. The archives date back to mid August 1995, are separated by month for access speed, and were assembled with the Hypermail 1.02 utility.

There is a bidirectional Usenet gateway to the mailing list at: <URL:news://sunsite.auc.dk/emacs.ding>.

Gnus has a home World Wide Web page at
<URL:http://www.ifi.uio.no/~larsi/ding.html>. A Gnus tips page exists at
<URL:http://www.fuentez.com/public-info/ding/ding.html>.

Ketil Z Malde <ketil@ii.uib.no> has a page on mail filtering using Gnus:
<URL:http://www.ii.uib.no/~ketil/mailsorting.html>.

There is a Gnus info page at
<URL:http://www.miranova.com/~steve/gnus-local.html>.

Gnus has a write up in the comp.windows.x.apps FAQ at: <URL:http://www.ee.ryerson.ca:8080/~elf/xapps/Q-III.html>.

The Gnus manual is also available on the World Wide Web. The canonical source is in Norway at
<URL:http://www.ifi.uio.no/~larsi/ding-manual/gnus_toc.html>
There are three mirrors in the United States:
<URL:http://www.c2.org/~mrblond/gnus/>
<URL:http://www.miranova.com/gnus-man/>
<URL:http://www.rtd.com/~woo/gnus/>

PostScript copies of the Gnus Reference card are available from
<URL:ftp://ftp.cs.ualberta.ca/pub/oolog/gnus/>. They are mirrored at
<URL:http://www.thphy.uni-duesseldorf.de/~gnu/doc/gnusref/>
in Germany.

An online version of the Gnus FAQ is available at
<URL:http://www.ccs.neu,edu/software/gnus/>. Off-line formats are also available:
ASCII: <URL:ftp://ftp.miranova.com/pub/gnus/gnus-faq>.
PostScript: <URL:ftp://ftp.miranova.com/pub/gnus/gnus-faq.ps>

Q1.9 Gnus hangs on connecting to NNTP server

I am running XEmacs on SunOS and Gnus prints a message about Connecting to NNTP server and then just hangs.

Ben Wing <wing@666.com> writes :
I wonder if you're hitting the infamous libresolv problem. The basic problem is that under SunOS you can compile either with DNS or NIS name lookup libraries but not both. Try substituting the IP address and see if that works; if so, you need to download the sources and recompile.

Q1.10 Mailcrypt 3.4 doesn't work

You are attempting to use the mailcrypt 3.4 distribution with Gnus 5.3. Mailcrypt 3.4 needs some minor patches to work with Gnus 5.[23], that are present in the version of mailcrypt distributed with XEmacs 19.14.

Q1.11 What other packages work with Gnus?

Mailcrypt

Mailcrypt is an Emacs interface to PGP, written by Patrick LoPresti <patl@lcs.mit.edu> and Jin Choi <jin@atype.com>. It works, it installs without hassle, and integrates very easily. Mailcrypt can be obtained from
<URL:http://cag-www.lcs.mit.edu/mailcrypt/>.

Tools for Mime

Tools for Mime is an Emacs MUA interface to MIME written by MORIOKA Tomohiko <morioka@jaist.ac.jp>, and KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>. It can be obtained from
<URL:ftp://ftp.jaist.ac.jp/pub/GNU/elisp/mime/>. It has mirrors at:
<URL:ftp://ftp.nis.co.jp/pub/gnu/emacs-lisp/tm/> (Japan)
<URL:ftp://ftp.nisiq.net/pub/gnu/emacs-lisp/tm/> (USA)
<URL:ftp://ftp.miranova.com/pub/gnus/jaist.ac.jp/> (USA)
<URL:ftp://ftp.unicamp.br/pub/mail/mime/tm/> (Brasil)
<URL:ftp://ftp.th-darmstadt.de/pub/editors/GNU-Emacs/lisp/mime/> (Germany)
<URL:ftp://ftp.tnt.uni-hannover.de/pub/editors/xemacs/contrib/> (Germany).

To use with Gnus add the line

(load "mime-setup")
to your .emacs file before you initialize Gnus.

Group Lens

Group Lens is a collaborative filtering system that helps you work together with other people to find the quality news articles out of the huge volume of news articles generated every day. It was written by Brad Miller <bmiller@cs.umn.edu> as his PhD thesis. It is now distributed as a standard part of Gnus. A copy for Gnus 5 can be obtained at:
<URL:http://www.cs.umn.edu/Research/GroupLens/>. GroupLens has its own FAQ at <URL:http://www.cs.umn.edu/Research/GroupLens/glfaq.html>.

Insidious Big Brother Database

BBDB is a rolodex-like database program for GNU Emacs written by Jamie Zawinski <jwz@netscape.com> of Netscape fame. BBDB can be found at
<URL:ftp://ftp.xemacs.org/pub/bbdb/>. You should also pick up gnus-bbdb from Brian Edmonds:
<URL:http://www.cs.ubc.ca/spider/edmonds/usenet/gnus/gnus-bbdb.el>. Please note that work is underway for a new version of bbdb that contains gnus-bbdb.el.

Q1.12 How do I make Gnus start faster?

Make sure you kill your unsubscribed groups. This will make Gnus start much faster, and keep your .newsrc file sizes down to boot.

Pranav Kumar Tiwari <pktiwari@eos.ncsu.edu> writes :
I posted the same query recently and I got an answer to it. I am going to repeat the answer. What you need is a newer version of gnus, version 5.0.4+. I am using 5.0.12 and it works fine with me with the following settings:

(setq gnus-check-new-newsgroups nil
      gnus-read-active-file 'some
      gnus-nov-is-evil nil
      gnus-select-method '(nntp gnus-nntp-server))
Francesco Potortì <pot@cnuce.cnr.it> writes :
I would rather write: 'ask-server instead of nil. It is more useful to most people, and does not increase the load time too much.

Q1.13 I've upgraded to 5.2 (or greater) and my hooks no longer work

Gnus now uses a combined mode for editing mail and news posts called message-mode. All your hooks must change to reflect this. You can either use gnus-setup.el provided with Gnus 5.2 (please see Q2.12 for details), or you can make the changes by hand.

In particular, mail-mode, news-reply-mode, and news-mode have all been replaced with message-mode.

Q1.14 How do I specify the NNTP server?

There are a variety of ways, all documented in the Gnus user's manual.

  1. (setq gnus-select-method '(nntp "news.somewhere.edu"))
  2. (setq gnus-select-method '(nnspool ""))
  3. If gnus-select-method is not set, Gnus will take a look at the NNTPSERVER environment variable. If that variable isn't set, Gnus will see whether gnus-nntpserver-file (/etc/nntpserver by default) has any opinions on the matter. If that fails as well, Gnus will will try to use the machine that is running Emacs as an NNTP server.
  4. If gnus-nntp-server is set, this variable will override gnus-select-method. You should therefore set gnus-nntp-server to nil, which is what it is by default.
  5. You can also make Gnus prompt you interactively for the name of an NNTP server. If you give a non-numerical prefix to gnus (i.e., C-u M-x gnus), Gnus will let you choose between the servers in the gnus-secondary-servers list (if any).

Q1.15 What is the difference between persistent and unexpirable messages?

Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes: The terms are not synonymous, they are orthogonal.

If you tap * on an article, you have made it persistent. Nothing you ever do, except using the M-* command, will remove it from the cache where it's stored.

If you mark an article with the E mark, (ie., made it expirable), it will be deleted by the mail backend when it reaches a certain age. The persistent copy of the message will not be touched.

The two terms are not related.


2. Customizing Gnus


Q2.2 How do I quote messages?

I see lots of messages with quoted material in them. I am wondering how to have Gnus do it for me.

This is Gnus, so there are a number of ways of doing this. You can use the built-in commands to do this. There are the ``F'' and ``R'' keys from the summary buffer which automatically include the article being responded to. These commands are also selectable as Followup and Yank and Reply and Yank in the Post menu.

C-c C-y grabs the previous message and prefixes each line with `mail-indentation-spaces' spaces or `mail-yank-prefix' if that is non-nil, unless you have set your own `mail-citation-hook', which will be called to do the job.

You might also consider the Supercite package, which allows for pretty arbitrarily complex quoting styles. Some people love it, some people hate it.

Q2.4 Any good suggestions on stuff for an all.SCORE file?

Here is a collection of suggestions from various sources:

From "Dave Disser" <disser@sdd.hp.com>

I like blasting anything without lowercase letters. Weeds out most of the make $$ fast, as well as the lame titles like "IBM" and "HP-UX" with no further description.
 (("Subject"
  ("^\\(Re: \\)?[^a-z]*$" -200 nil R)))

From "Peter Arius" <arius@immd2.informatik.uni-erlangen.de>

The most vital entries in my (still young) all.SCORE:
(("xref"
  ("alt.fan.oj-simpson" -1000 nil s))
 ("subject"
  ("\\<\\(make\\|fast\\|big\\)\\s-*\\(money\\|cash\\|bucks?\\)\\>" -1000 nil r)
  ("$$$$" -1000 nil s)))

From "Per Abrahamsen" <abraham@dina.kvl.dk>

(("subject"
  ;; CAPS OF THE WORLD, UNITE
  ("^..[^a-z]+$" -1 nil R)
  ;; $$$ Make Money $$$ (Try work)
  ("$" -1 nil s)
  ;; I'm important! And I have exclamation marks to prove it!
  ("!" -1 nil s)))

From "heddy boubaker" <boubaker@cenatls.cena.dgac.fr>

I would like to contribute with mine.
(
 (read-only t)
 ("subject"
  ;; ALL CAPS SUBJECTS
  ("^\\([Rr][Ee]: +\\)?[^a-z]+$" -1 nil R)
  ;; $$$ Make Money $$$
  ("$$" -10 nil s)
  ;; Empty subjects are worthless!
  ("^ *\\([(<]none[>)]\\|(no subject\\( given\\)?)\\)? *$" -10 nil r)
  ;; Sometimes interesting announces occur!
  ("ANN?OU?NC\\(E\\|ING\\)" +10 nil r)
  ;; Some people think they're on mailing lists
  ("\\(un\\)?sub?scribe" -100 nil r)
  ;; Stop Micro$oft NOW!!
  ("\\(m\\(icro\\)?[s$]\\(oft\\|lot\\)?-?\\)?wind?\\(ows\\|aube\\|oze\\)?[- ]*\\('?95\\|NT\\|3[.]1\\|32\\)" -1001 nil r)
  ;; I've nothing to buy
  ("\\(for\\|4\\)[- ]*sale" -100 nil r)
  ;; SELF-DISCIPLINED people
  ("\\[[^a-z0-9 \t\n][^a-z0-9 \t\n]\\]" +100 nil r)
  )
 ("from"
  ;; To keep track of posters from my site
  (".dgac.fr" +1000 nil s))
 ("followup"
  ;; Keep track of answers to my posts
  ("boubaker" +1000 nil s))
 ("lines"
  ;; Some people have really nothing to say!!
  (1 -10 nil <=))
 (mark -100)
 (expunge -1000)
 )

From "Christopher Jones" <cjones@au.oracle.com>

The sample all.SCORE files from Per and boubaker could be augmented with:
	(("subject"
	  ;; No junk mail please!
	  ("please ignore" -500 nil s)
	  ("test" -500 nil e))
	)

From "Brian Edmonds" <edmonds@cs.ubc.ca>

Augment any of the above with a fast method of scoring down excessively cross posted articles.
 ("xref"
  ;; the more cross posting, the exponentially worse the article
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+" -1 nil r)
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -2 nil r)
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -4 nil r)
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -8 nil r)
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -16 nil r)
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -32 nil r)
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -64 nil r)
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -128 nil r)
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -256 nil r)
  ("^xref: \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+ \\S-+" -512 nil r))
Or see <URL:http://www.cs.ubc.ca/spider/edmonds/usenet/gnus/SCORE> which also includes pointers to my SMEGHEADS and BLACKLIST files.

From "Hardrock" <dharland@kendaco.telebyte.com>

(Original source unknown, this is used by permission from the Grubor FAQ 2.21).
  ("from"                                                        
   ("Law Doctor" -10000 nil s)
   ("Manus" -10000 nil s)
   ("Grubor" -10000 nil s)
   ("DrG" -10000 nil s))

From "d. hall" <dhall@illusion.apk.net>

Here's an example of using the orphan scoring rule to make reading of large newsgroups more pleasant, in this case comp.lang.c.
(("subject"
  ("windows" -100)
  ("dos" -100))
 (orphan -200)
 (mark-and-expunge -100))

Q2.5 What do I use to yank-through when replying?

You should probably reply and followup with R and F, instead of r and f, which solves your problem. But you could try something like:
(defconst mail-yank-ignored-headers
  "^.*:"
  "Delete these headers from old message when it's inserted in a reply.")

Q2.6 I don't like the default WWW browser

Now when choosing an URL Gnus starts up a W3 buffer, I would like it to always use Netscape (I don't browse in text-mode ;-).

  1. Activate `Customize...' from the `Help' menu.
  2. Scroll down to the `WWW Browser' field.
  3. Click `mouse-2' on `WWW Browser'.
  4. Select `Netscape' from the pop up menu.
  5. Press `C-c C-c'

That's it.

If you are using XEmacs then to specify Netscape do

(setq gnus-button-url 'gnus-netscape-open-url)

Q2.9 How can I make favorite authors be highlighted in the Summary buffer?

Per Abrahamsen <abraham@dina.kvl.dk> writes:
Just increase their score, and they will be highlighted.

You can increase the score of all articles written by Larry Wall in comp.lang.perl by entering the group, find an article written by Larry Wall, and type I A (Increase Author) or even better I a s p (Increase author by substring permanently). You will be prompted with the content of the From header for the current article, so you can edit trim string down to just Larry Wall if you want.

Q2.10 How do I get multiple .signature files?

Kai Grossjohann <grossjoh@charly.informatik.uni-dortmund.de> writes:
(defun my-signature ()
  (cond ((string-match "ding" gnus-newsgroup-name)
         "Signature for Ding")
        ((string-match "^nnml:" gnus-newsgroup-name)
         "Signature for mail groups")
        (t
         "Default signature")))
(setq message-signature 'my-signature)
You get the idea ...

Jack Vinson <jvinson@cheux.ecs.umass.edu> writes:
For multiple signature files, I advise the message-insert-signature function to set message-signature-file to a random file from my signature directory: (I have files that look like sig1 sig2 etc in that directory).

;; random insertion of .signature file
;; Thanks to Glenn R Coombs: glenn@prl.philips.co.uk
(defvar grc-signature-dir   "~/.sig/")
(defvar grc-signature-base  "sig")

(defadvice message-insert-signature (before random-mail-sig-ag act comp)
  "Change the value of message-signature-file each time 
`message-insert-signature' is called."
  (let ((files (file-name-all-completions
                grc-signature-base (expand-file-name grc-signature-dir))))
    (if files (let ((file (nth (random (length files)) files)))
		(setq message-signature-file (concat grc-signature-dir file))
		))))

Ralph Schleicher <rs@purple.UL.BaWue.DE> writes:
Here's a version which will add a fortune cookie to your .signature.

(setq message-signature 'fortune)

(defvar fortune-program nil
  "*Program used to generate epigrams, default \"fortune\".")

(defvar fortune-switches nil
  "*List of extra arguments when `fortune-program' is invoked.")

(defun fortune (&optional long-p)
  "Generate a random epigram.
An optional prefix argument generates a long epigram.
The epigram is inserted at point if called interactively."
  (interactive "*P")
  (let ((fortune-buffer (generate-new-buffer " fortune"))
	(fortune-string "Have an adequate day."))
    (unwind-protect
	(save-excursion
	  (set-buffer fortune-buffer)
	  (apply 'call-process
		 (append (list (or fortune-program "fortune") nil t nil)
			 fortune-switches (list (if long-p "-l" "-s"))))
	  (skip-chars-backward "\n\t ")
	  (setq fortune-string (buffer-substring (point-min) (point))))
      (kill-buffer fortune-buffer))
    (if (interactive-p)
	(insert fortune-string))
    fortune-string))

Bjorn Borud <borud@guardian.no> offers:

(setq message-borud-newsgroup-signature
      '(
	("^no\\.test$"       . "~/.no.test-signatur")
	("^no\\.irc$"        . "~/.no.irc-signature")
	("^no\\.general"     . "~/.no.general-signature")
        ("^no\\.alt\\.frust" . "~/.no.alt.frustrasjoner-signature")
	("^no\\.alt\\."      . "~/.no.alt-signature")
	("www"               . "~/.www-signature")
	("^no\\."            . "~/.no-signature")
	("^alt\\.irc"        . "~/.alt.irc-signature")
	("^alt\\."           . "~/.alt-signature")
	("^comp\\."          . "~/.comp-signature")))

(setq message-borud-default-signature (expand-file-name "~/.signature"))


(defun message-borud-signature (group)
  "Find the signature file that applies to the newsgroup 
specified by GROUP.  If this file is not found return the
value of message-borud-default-signature"
  (let ((tmp message-borud-newsgroup-signature))
    (while (and tmp (not (string-match (caar tmp) group)))
      (setq tmp (cdr tmp)))
    (if tmp
	(cdar tmp)
      message-borud-default-signature)))


;;; Standard stuff

(setq message-signature	
      (lambda ()
	(progn
	  (let 
	      ((sigfile (message-borud-signature gnus-newsgroup-name)))
	    (if (file-exists-p sigfile)
		(save-excursion
		  (progn
		    (goto-char (point-max))
		    (insert "\n\n-- \n")
		    (insert-file-contents sigfile)
		    (goto-char (point-min)))))))))

Q2.11 Gnus and compression hooks

Richard Pieri <ratinox@unilab.dfci.harvard.edu> writes:
I just stumbled into a nasty gotcha, a conflict between Gnus (probably any version) and any on-the-fly file compression hooks. This morning, the code that pulls the system mailbox into a local Incoming file created a file called Incominga003.Z. The problem should be apparent: the .Z extension gets the file flagged as compressed, so the compression code tries to decompress it; since it is not compressed, this fails.

The solution: do not allow periods in the pseudo-random Incoming file names.

Editor's note: Similar behavior has been observed with jka-compr as well.

Q2.12 Using Gnus and Other Packages

Kevin J Hilman <khilman@vision.d.umn.edu> writes:
How do you hook Supercite into September Gnus? Adding sc-cite-original to mail-citation-hook works for VM but not Gnus. There must be some message-mode hook I can add sc-cite-original to, but I cant seem to figure it out.

Steve Baur <steve@miranova.com> writes:
You're probably not using gnus-setup.el, but you should. So long as you have sgnus as a subdirectory of site-lisp in the standard location all you need to do put in your .emacs is:

(setq gnus-use-september t)
(load "/usr/local/share/emacs/site-lisp/sgnus/lisp/gnus-setup.el")
and everything is set up for you.

gnus-setup also handles integration with tm, bbdb, mailcrypt, vm, and mh-e. Set these variable to choose exactly what you want:

gnus-use-tm [t]
Set this if you want MIME support for Gnus
gnus-use-mhe [nil]
Set this if you want to use MH-E for mail reading
gnus-use-rmail [nil]
Set this if you want to use RMAIL for mail reading
gnus-use-sendmail [nil]
Set this if you want to use SENDMAIL for mail reading
gnus-use-vm [nil]
Set this if you want to use the VM package for mail reading
gnus-use-sc [t]
Set this if you want to use Supercite
gnus-use-mailcrypt [t]
Set this if you want to use Mailcrypt for dealing with PGP messages
gnus-use-bbdb [nil]
Set this if you want to use the Big Brother DataBase
gnus-use-september [nil]
Set this if you are using the experimental September Gnus

Q2.13 Changing Mail and News directories

I don't like the default locations for storing Mail and News how do I change them?

The following variables are used at present for News:

Mark Eichin <eichin@cygnus.com> writes

(setq gnus-startup-file "~/.mit-newsrc")
(setq nnml-directory "~/MITmail/")
(setq nnmail-crash-box "~/.mit-gnus-crash-box")
(setq nnml-newsgroups-file 
  (concat (file-name-as-directory nnml-directory) "newsgroups"))

(setq gnus-message-archive-method
      '(nnfolder "archive" 
		 (nnfolder-directory "~/MITmail/archive/")
		 (nnfolder-active-file "~/MITmail/archive/active")
		 (nnfolder-get-new-mail nil)
		 (nnfolder-inhibit-expiry t)))
but that's only for mail, not news.

Q2.14 Gnus colors have problems with my background.

Gnus colors don't look quite right on my background, and it'll take a bit of fiddling to get it right.

Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> writes:
It's quite difficult to come up with a set of colors that work with the entire range of dark backgrounds. The current defaults seem to work quite well on very dark backgrounds (and very light backgrounds), but if you use mid-range background colours, you have to do some fiddling.

Q2.15 How do I customize the Sender: line?

Just change it in the message buffer.

Richard Krehbiel <rich@kastle.com> writes:
The original poster wants to correct a broken Sender: line. If the value that Emacs computes is wrong, (mine is wrong too BTW) then making a right one is better, no?

Per Abrahamsen <abraham@dina.kvl.dk> writes:
No. If you think it serves a useful purpose for the user to change the value of the Sender field, then you do not understand the purpose of that field.

The Sender field contains the following information: The user has customized the from address. Here is the original, uncustomized value. Thus, if you customize the Sender field in any way, it will be wrong.

Q2.16 How do I customize the From: line? (or, how to fix a broken Message-ID:)

How do I change the From: line? I have set gnus-user-from-line to Gail Gurman <gail.gurman@sybase.com>, but XEmacs Gnus doesn't use it. Instead it uses Gail Mara Gurman <gailg@deall> and then complains that it's incorrect. Also, as you perhaps can see, my Message-ID is screwy. How can I change that?

Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> writes:
Set user-mail-address to gail.gurman@sybase.com or mail-host-address to sybase.com.

Andre Deparade <deparade@bartok.informatik.rwth-aachen.de> asked:
What can I do, if I get this 'misconfigured_system_so_shoot_me' Message-ID when I try to post something?

The solution is the same as for the above problem. Set either user-mail-address or mail-host-address to the correct value.

In Gnus 5.4, the error message will be changed to make this fix more obvious. The Message-ID, instead of saying that your system is misconfigured, will tell you to set mail-host-address.

Please note that this also works with ISO-Latin 1 characters like:

(setq user-full-name "Finn Håkansson")

Q2.17 Gnus says my .signature is too long and it isn't

Check for blank lines at the end. Blank lines count as well.

Q2.18 What replaces gnus-author-copy?

The BCC: or Fcc: field still works:
(setq message-default-headers "Fcc: ~/spool/sent.spool\n")
(setq message-default-mail-headers "Fcc: ~/spool/sent-mail.spool\n")
(setq message-default-news-headers "Fcc: ~/spool/sent-news.spool\n")
Replace Fcc: with Bcc: if you wish.

Another possibility is to use the Gcc: header:

(setq gnus-message-archive-method
  `(nnfolder
    "archive"
    (nnfolder-directory ,(nnheader-concat message-directory "archive"))
    (nnfolder-active-file 
     ,(nnheader-concat message-directory "archive/active"))
    (nnfolder-get-new-mail nil)
    (nnfolder-inhibit-expiry t)))

(setq gnus-message-archive-group
  '((if (message-news-p) "misc-news" "misc-mail")))

3. Reading News


Q3.1 How do I convert my kill files to score files?

A kill-to-score translator was written by Ethan Bradford <ethanb@ptolemy.astro.washington.edu>. It is available from
<URL:http://www.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el>

Q3.2 My news server has a lot of groups, and killing groups is painfully slow.

Don't do that then. The best way to get rid of groups that should be dead is to edit your newsrc directly. This problem will be addressed in the near future.

Q3.3 How do I use an NNTP server with authentication?

Put the following into your .gnus:
 (add-hook 'nntp-server-opened-hook 'nntp-send-authinfo)

Q3.4 Not reading the first article.

How do I avoid reading the first article when a group is selected?
  1. Use RET to select the group instead of SPC.
  2. (setq gnus-auto-select-first nil)
  3. elf@mailhost.ee.ryerson.ca (Luis Fernandes) writes:
    This is what I use...customize as necessary...
    
    ;;; Don't auto-select first article if reading sources, or archives or
    ;;; jobs postings, etc. and just display the summary buffer
    (add-hook 'gnus-select-group-hook
    	  (function
    	   (lambda ()
    	     (cond ((string-match "sources" gnus-newsgroup-name)
    		    (setq gnus-auto-select-first nil))
    			   ((string-match "jobs" gnus-newsgroup-name)
    				(setq gnus-auto-select-first nil))
    		   ((string-match "comp\\.archives" gnus-newsgroup-name)
    		    (setq gnus-auto-select-first nil))
    		   ((string-match "reviews" gnus-newsgroup-name)
    		    (setq gnus-auto-select-first nil))
    		   ((string-match "announce" gnus-newsgroup-name)
    		    (setq gnus-auto-select-first nil))
    		   ((string-match "binaries" gnus-newsgroup-name)
    		    (setq gnus-auto-select-first nil))
    		   (t
    		    (setq gnus-auto-select-first t))))))
    
  4. abraham@dina.kvl.dk (Per Abrahamsen) writes:
    Another possibility is to create an `all.binaries.all.SCORE' file like this:
    ((local
      (gnus-auto-select-first nil)))
    
    and insert 
    
    	(setq gnus-auto-select-first t)
    
    in your .gnus.

Q3.5 Why aren't BBDB known posters marked in the summary buffer?

Brian Edmonds <edmonds@cs.ubc.ca> writes:
Due to changes in Gnus 5.0, bbdb-gnus.el no longer marks known posters in the summary buffer. An updated version, gnus-bbdb.el is available at the locations listed below. This package also supports autofiling of incoming mail to folders specified in the BBDB. Extensive instructions are included as comments in the file.

Q3.6 Cross posted articles aren't marked as read

Ralf Helbing <helbing@monet.cs.uni-magdeburg.de> writes:
Why do cross posted articles appear in every group they were posted to instead of only the first one? In other words: how can I have them marked as read in the current group if I read them already in another group?

Gnus will read news overview files to build its article lists for a group. An (unfortunately) optional field contains information about where an article is crossposted to. If this is disabled, then Gnus will not be able to properly deal with crossposts.

Get your system administrator to enable Xref in the news overview files.

Failing that, if you add

(setq nntp-nov-is-evil t)
to your .gnus, Gnus will do The Right Thing with respect to cross posts at the cost of slower group entry and exit.

Q3.7 How do I read already read messages?

Francesco Potortì <pot@cnuce.cnr.it> writes:
Just use C-u SPC or C-u RET for entering the group.

Gnus 5.4 has a more convenient mechanism whereby you can mark individual groups so that they will always show previously read mail with:

(display . all)
in the group parameters.

Q3.8 Evil nntp

Yair Friedman <yair@cs.huji.ac.il> writes:
Does anyone has experience with setting nntp-nov-is-evil to t? What exactly will I gain or lose by setting this variable?

Setting this variable only makes sense if netnews is set up on your system to not provide XREF (cross reference information) in the overview files Gnus reads to build group summaries.

A quick test to see if you need to use it is this (substitute your nntp server, and use the last number returned on the 211 line as the parameter to XOVER):
(Example courtesy of Christopher Davis <ckd@loiosh.kei.com>).

$ telnet news.somewhere.com nntp
LIST overview.fmt

You should see something like the following (on INN systems anyway):

215 Order of fields in overview database.
Subject:
From:
Date:
Message-ID:
References:
Bytes:
Lines:
Xref:full
If the Xref:full is missing, ask your news administrator to add it in.

Assuming you have a broken newsfeed, you gain by setting nntp-nov-is-evil the ability for Gnus to mark all crossposted articles as read the first time you see them. Otherwise, every crossposted article is spam, and you see it over and over again if you also read the other groups it is crossposted to.

You lose the ability to have Gnus fill in old headers to flesh partially read threads with old articles. This may not matter a whole lot if expiration times are short. Building group summaries is also somewhat slower, though if your network connection to the news server is decent this isn't a huge loss.


4. Reading Mail


Q4.1 What does the message Buffer has changed on disk mean in a mail group?

Your filter program should not deliver mail directly to your folders, instead it should put the mail into spool files. Gnus will then move the mail safely from the spool files into the folders. This will eliminate the problem. Look it up in the manual, in the section entitled "Mail & Procmail".

Q4.2 How do you make articles un-expirable?

I am using nnml to read news and have used gnus-auto-expirable-newsgroups to automagically expire articles in some groups (Gnus being one of them). Sometimes there are interesting articles in these groups that I want to keep. Is there any way of explicitly marking an article as un-expirable - that is mark it as read but not expirable?

Use ``u'', ``!'', `d' or `M-u' in the summary buffer. You just remove the `E' mark by setting some other mark. It's not necessary to tick the articles.

Q4.3 How do I delete bogus nnml: groups?

My problem is that I have various mail (nnml) groups generated while experimenting with Gnus. How do I remove them now? Setting the level to 9 does not help. Also gnus-group-check-bogus-groups does not recognize them.

Removing mail groups is tricky at the moment. (It's on the to-do list, though.) You basically have to kill the groups in Gnus, shut down Gnus, edit the active file to exclude these groups, and probably remove the nnml directories that contained these groups as well. Then start Gnus back up again.

Q4.4 What happened to my new mail groups?

I got new mail, but I have never seen the groups they should have been placed in.

They are probably there, but as zombies. Press `A z' to list zombie groups, and then subscribe to the groups you want with `u'. This is all documented quite nicely in the user's manual.

Q4.5 Not scoring mail groups

How do you totally turn off scoring in mail groups?

Use an nnbabyl:all.SCORE (or nnmh, or nnml, or whatever) file containing:

((adapt ignore)
 (local (gnus-use-scoring nil))
 (exclude-files "all.SCORE"))

Q4.6 How to keep groups always visible

How do you keep groups always visible in the Group buffer, whether or not they have any new articles in them?

There is no magic command right now. 5l will list all subscribed groups. This list will get compacted the next time you issue a g command though.

Another trick which almost works is to make sure that you mark an article with ! in every group you want to keep visible. While this works, entering the group with something like M-5 SPC is no longer as convenient.

Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
I've added a gnus-permanently-visible-groups regexp variable to match groups that should always be shown, no matter whether there are unread articles in the groups or not. I've also added a visible group parameter that will have the same effect.

Q4.7 Group renumbering

Thomas Larsen <lath@interlink.no> writes:
I'm usinge the nnml backend to read my mail. To get rid of read mail, I either expire the article or use B DEL. When I have received more than 200 articles in a nnml group, I get prompted for how many articles to show when entering it. The problem is that there are only about 20 articles present in the group and it's quite annoying to get prompted for this every time. Is there a way to fix this without setting gnus-large-group to something very high? Can you somehow renumber the articles in a group? I'm using Gnus 5.2.1.

Colin Rafferty <craffert@spspme.ml.com> writes:
Yes.

Enter the group, mark all articles, and then move them all to the current group. If they were spread out between 1 and 200, they will now all be numbered consecutively starting at 201.

In response to the further question: Can this be done without breaking the xref info?
Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
Well -- if these are Xreffed from a different group, this'll break the Xref info in the other groups. That is, if you (after renumbering the articles) read the articles in a different group, they won't be marked as read in the renumbered group.

Q4.8 Procmail and Gnus

Randal Schwartz <merlyn@stonehenge.com> writes:
With procmail, you cannot write directly into the nnml directories. You must create spool files that will be merged into the nnml directories at times of Gnus' choosing. Asynch delivery just isn't in the cards.

I just posted my setup a week ago. Here it is one more time:

(setq
 gnus-secondary-select-methods '((nnml ""))
 nnmail-use-procmail t
 nnmail-spool-file 'procmail		; same as nnmail-use-procmail :-)
 nnmail-procmail-directory "~/.incoming/"
 nnmail-delete-incoming t
)

And then I have procmail deliver to ~/.incoming/inbox.spool and ~/.incoming/list.traffic.spool and so on. The name before .spool becomes the nnml: folder in which the stuff will end up.

Q4.9 Getting new mail, but not new news

The standard technique is to place all your mail groups at levels 1 or level 2. Then you can do a 2 g, or 1 g which will then only fetch new mail and not bother with new news.

Q4.10 Why can't I move articles?

Steinar Bang <sb@metis.no> writes:
Occasionally I get the message "Can't move article!", when I attempt to move an article from one nnml group to another, using
        B m
in the summary buffer. Other articles can be moved without problem (on a set of process marked articles, some are moved, others are left untouched).

Yair Friedman <yfriedma@JohnBryce.Co.Il> suggests:
What is the value of nnmail-keep-last-article? If it is t and the article is last in the group, you can't move it.

To this, Steinar Bang <sb@metis.no> adds:
You should add that nnmail-keep-last-article can be set specifically for single groups, in the Group Parameters of that group. (ie. if the global setting is t, you can set it to nil for one particular group, by putting

        (nnmail-keep-last-article nil)
in group parameters
        G p
in the *Group* buffer. (It may work the other way around as well, but I haven't actually _verified_ that setting it to t in Group Parameters, will make it leave the last article, when expiring))

This FAQ is Copyright © 1995, 1996 Free Software Foundation. Please send comments, and suggestions to Justin Sheehy <URL:mailto:dworkin@ccs.neu.edu>.