allanswers.org - Gnus (Emacs Newsreader) FAQ

 Home >  Software >

Gnus (Emacs Newsreader) FAQ

Section 1 of 3 - Prev - Next
All sections - 1 - 2 - 3


Archive-name: gnus-faq      
Posting-frequency: monthly (on or about the 19th)      
Last-modified: Jun 25 12:33   

                      Gnus 5.x Frequently Asked Questions
                                       
------------------------------

Subject: 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 is maintained by 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:
    . 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. No changes this month.
       
   This file was last modified on Jun 25, 2001.
   
------------------------------

Subject: Table Of Contents

    1. Installation
          + Q1.1 What is the latest version?
          + Q1.2 Where do I get Gnus?
          + Q1.3 What Emacs versions are required?
          + Q1.6 Unsubscribing from the mailing list
          + Q1.7 How do I run Gnus on both Emacs and XEmacs?
          + Q1.8 What resources are available?
          + Q1.9 Gnus hangs on connecting to NNTP server.
          + Q1.10 Mailcrypt 3.4 doesn't work
          + Q1.11 What other packages can I use with Gnus?
          + Q1.12 How do I make Gnus start faster?
          + Q1.13 I've upgraded to 5.2 and my hooks no longer work
          + Q1.14 How do I specify the NNTP server?
          + Q1.15 What is the difference between persistent and
            unexpirable messages?
          + Q1.16 Does Gnus have MIME support?
    2. Customizing Gnus
          + Q2.2 How do I quote messages?
          + Q2.4 Any suggestions for all.SCORE?
          + Q2.6 I don't like the default WWW browser
          + Q2.9 Increasing score of favorite authors.
          + Q2.10 Multiple .signatures.
          + Q2.11 Gnus and compression hooks.
          + Q2.12 Using Gnus and other packages.
          + Q2.13 Changing Mail and News directories.
          + Q2.14 Gnus colors have problems with my background color.
          + Q2.15 How do I customize the Sender: line?
          + Q2.16 How do I customize the From: line? (or, how to fix a
            broken Message-ID:)
          + Q2.17 Gnus says my .signature is too long and it isn't
          + Q2.18 What replaces gnus-author-copy?
          + Q2.19 How do I launch Netscape when clicking on an URL?
          + Q2.20 Could I see someone else's ~/.gnus file?
          + Q2.21 Different headers for mail and news
          + Q2.22 Speeding up base64
          + Q2.23 Not viewing HTML
    3. Reading News
          + Q3.1 Kill file to Score file conversion
          + Q3.3 Using an authenticated NNTP server
          + Q3.4 Not reading the first article
          + Q3.5 Why aren't BBDB known posters marked in the summary
            buffer?
          + Q3.6 Cross posted articles aren't marked read.
          + Q3.7 How do I read already read messages?
          + Q3.8 How can nntp be evil?
          + Q3.9 Posting to foreign servers.
          + Q3.10 When I send a post, Gnus just hangs. What's wrong?
    4. Reading Mail
          + Q4.1 What does buffer changed on disk mean?
          + Q4.2 How do you make articles un-expirable?
          + Q4.3 How do I delete bogus nnml: groups?
          + Q4.4 What happened to my new mail groups?
          + Q4.5 Not scoring mail groups
          + Q4.6 How to keep groups always visible?
          + Q4.7 Group renumbering
          + Q4.8 Procmail and Gnus
          + Q4.9 Getting new mail, but not new news
          + Q4.10 Why can't I move articles?
          + Q4.11 Using Gnus for mail and never news
          + Q4.12 Compressed mail files
          + Q4.13 Using an IMAP server
          + Q4.14 Using multiple mail sources
          + Q4.15 Qmail delivery
          + Q4.16 How and why would I want to use pop3.el instead of
            movemail?
          + Q4.17 My splitting rules seem to miss a few messages. Why?
          + Q4.18 What is the difference between total-expire and
            auto-expire?
     _________________________________________________________________
   
------------------------------

                                1. Installation
                                       
------------------------------

Subject: Q1.1 What is the latest version of Gnus?

   Gnus 5.8 has been released!
   
   As of this posting, the latest Gnus version is 5.8.2. Gnus 5.8 should
   still be considered beta at this time, but is in feature-freeze and
   bugs are being actively fixed. Download your copy today.
   
   A warning for upgrading users, however: Due to the many changes in 5.8
   (especially mail sources and MIME) your dotfiles may not be
   forward-compatible. Please read the documentation before you upgrade.
   
   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 and all later versions of Emacs 19.x. Gnus 5.5
   is shipped with Emacs 20.x.
   
   Gnus 5.2.25 is included standard with XEmacs 19.14, Gnus 5.4.37 is
   included with XEmacs 19.15p7, Gnus 5.5 is included with XEmacs 20.4,
   and Gnus 5.6.45 is packaged alongside XEmacs 21.1.7.
   
------------------------------

Subject: Q1.2 Where do I get Gnus?

   The latest version is available via HTTP at
    or anonymous FTP at
   .
   Patches are available at .
   You can also fetch it from the North American mirrors:
   , ,
   , or .
   The last site should only be used as a last resort.
   
   Or, get it from a mirror in South America:
    or Australia:
   .
   
------------------------------

Subject: Q1.3 Which version of Emacs do I need?

   Gnus 5.8.x requires an emacs version that is greater than or equal to
   Emacs 20.x or XEmacs 20.x.
   
   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.13 or later.
   
   Emacs 20.2 has many show-stopping bugs. If you are using Emacs 20.2,
   upgrade to 20.3.
   
   Gnus 5.4 requires emacsen at least as recent as Emacs 19.33 or XEmacs
   19.14.
   
   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  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  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
   . 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  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.
   
------------------------------

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

   Send an e-mail message to  with the
   magic word unsubscribe somewhere in it, and you will be removed.
   
------------------------------

Subject: 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.
   
------------------------------

Subject: 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@gnus.org 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  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.
   
   This mailing list is mirrored on the World Wide Web at
   . There's a pretty handy
   search tool to help you find what you're looking for.
   
   There is a bidirectional Usenet gateway to the mailing list at:
   .
   
   Gnus has a home World Wide Web page at
   .
   
   There is a Gnus info page at
   .
   
   Gnus has a write up in the comp.windows.x.apps FAQ at:
   .
   
   The Gnus manual is also available on the World Wide Web. To find the
   mirror closest to you, go to:
   .
   
   PostScript copies of the Gnus Reference card are available from
   . They are mirrored at
   
   in Germany.
   
   An online version of the Gnus FAQ is available at
   . Off-line formats
   are also available:
   ASCII: .
   PostScript: 
   
   HOWTOs, Tips & Tricks forums, Sample Configurations, Screenshot
   Galleries and tons of angry fruitsalad can be found at
   . This site is also the home of an excellent
   Gnus tutorial.
   
------------------------------

Subject: 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  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.
   
------------------------------

Subject: 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 or later.
   
------------------------------

Subject: Q1.11 What other packages work with Gnus?

  Mailcrypt
  
   Mailcrypt is an Emacs interface to PGP, written by Patrick LoPresti
    and Jin Choi . It works, it installs
   without hassle, and integrates very easily. Mailcrypt can be obtained
   from
   .
   
  Tools for Mime
  
   Tools for Mime is an Emacs MUA interface to MIME written by MORIOKA
   Tomohiko , and KOBAYASHI Shuhei
   .
   
   Note:Do not use TM with Gnus 5.8.x or later. These versions of Gnus
   have native MIME support and should not try to use an external MIME
   library.
   
   It can be obtained from
   . It has mirrors at:
    (Japan)
    (USA)
    (USA)
    (Brasil)
   
   (Germany)
   
   (Germany).
   
   To use with Gnus add the line
(load "mime-setup")

   to your .emacs file before you initialize Gnus.
   
   Alternately, you can use gnus-setup.el to activate tm, bbdb,
   supercite, and other packages. See Question #2.12 for details.
   
   If you are using an XEmacs version of 19.15 or newer, you do not need
   tm as it is now included standard with XEmacs.
   
  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  as his PhD thesis. It is now
   distributed as a standard part of Gnus. A copy for Gnus 5 can be
   obtained at:
   .
   
  Insidious Big Brother Database
  
   BBDB is a rolodex-like database program for GNU Emacs created by Jamie
   Zawinski  of Netscape fame. Jamie has recently given
   his blessing to a new version whose primary maintainer is Ronan Waide
   . This version is the result of the fork that was
   maintained by Matt Simmons for some time. The new home of BBDB is
    and considered official and
   somewhat stable.
   
------------------------------

Subject: 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  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́  writes :
   I would rather write: 'ask-server [for the value of
   gnus-check-new-newsgroups] instead of nil. It is more useful to most
   people, and does not increase the load time too much.
   
------------------------------

Subject: 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.
   
------------------------------

Subject: 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
       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).
       
------------------------------

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

   Lars Magne Ingebrigtsen  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.
   
------------------------------

Subject: Q1.16 Does Gnus have MIME support?

   Gnus 5.8.x has native fully-integrated MIME support.
   
   If you are using an earlier version of Gnus, there are some other
   packages that you can use with Gnus. A link to Tools for MIME can be
   found in the other packages question.
   
   Note: TM will not work in any version of Gnus that has native MIME
   support.
   
------------------------------

                              2. Customizing Gnus
                                       
------------------------------

Subject: 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
   `message-indentation-spaces' spaces or `message-yank-prefix' if that
   is non-nil, unless you have set your own `message-cite-function',
   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.
   
   If you decide to use Supercite, you need to modify more than just
   `mail-citation-hook'. You need something similar to the following:
(autoload 'sc-cite-original     "supercite" "Supercite 3.1" t)
(setq message-cite-function 'sc-cite-original)

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

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

   Here is a collection of suggestions from various sources:
   
  From "Dave Disser" 
  
   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" 
  
   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" 
  
(("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" 
  
   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" 
  
   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" 
  
   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 
   which also includes pointers to my SMEGHEADS and BLACKLIST files.
   
  From "Hardrock" 
  
   (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" 
  
   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))

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

Subject: 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 ;-).
   
   You should set your browse-url-browser-function:
(setq browse-url-browser-function 'browse-url-netscape)

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

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

   Per Abrahamsen  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.
   
------------------------------

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

   Kai Grossjohann  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  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  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  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)))))))))

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

Subject: Q2.11 Gnus and compression hooks

   Richard Pieri  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.
   
   This problem has been fixed in Gnus 5.4.
   
------------------------------

Subject: Q2.12 Using Gnus and Other Packages

   Kevin J Hilman  writes:

Section 1 of 3 - Prev - Next
All sections - 1 - 2 - 3

Back to category Software - Use Smart Search
Home - Smart Search - About the project - Feedback

© allanswers.org | Terms of use

LiveInternet