Subject: Re: On a lighter side....

From: Joe Hildebrand <[email-masked]>
Date: Mon, 27 Sep 1993 14:58:26 -0400

>> "Jeff" == Jeff Garlough <[email-masked]> writes:
   Jeff> I use MH and like to read it from within emacs. Has anyone
   Jeff> set-up their environment to recive mail notification,
   Jeff> indicating the whether the mail is important or can be viewed
   Jeff> later? (I could probably hack a public version of biff to do
   Jeff> this, but if someone has already invented the wheel ...). Has
   Jeff> anyone made modifications to mh-e.el to handle multiple
   Jeff> folders? What I would like to see is a way to go to the next
   Jeff> unseen message, regardless of the folder it's in.  This
   Jeff> should be priority based, so I see most important unseen
   Jeff> messages first.  I've done this on the command line (and
   Jeff> could send you the code) , but has anyone done it from within
   Jeff> emacs?

I use gnus to read my mail, as well as news.  First create the file
.newsrc-:Mail in your home directory.  Then add the following to your
.emacs file.  This gives you threading by subject, and your mail is
automatically archived.  The message you read are marked as read, and
only the new messages are shown, unless you ask to see them.

In order to get notification of new mail, I use xbiff.  I have it look
at my procmail log file to see when new mail has come in.  You can
probably do that with whatever biff program you want to use.
Alternately, you could have procmail fire off a program whenever mail
is delivered to a specific set of mailboxes.

;---- add to .emacs ------
(setq gnus-default-article-saver (function gnus-summary-save-in-folder)
      gnus-mail-reply-method (function gnus-mail-reply-using-mhe)
      gnus-mail-other-window-method (function gnus-mail-other-window-using-mhe)
      gnus-mail-forward-method (function my-gnus-mail-forward-using-mhe)
      gnus-auto-mail-to-author t
      gnus-save-all-headers nil
      gnus-article-save-directory "~/Mail"
      )

(setq gnus-select-group-hook
      (list
       (function
	(lambda ()
	  ;; First of all, sort by date.
	  (gnus-keysort-headers
	   (function string-lessp)
	   (function
	    (lambda (a)
	      (gnus-sortable-date (gnus-header-date a)))))
	  ;; Then sort by subject string ignoring `Re:'.
	  ;; If case-fold-search is non-nil, case of letters is ignored.
	  (gnus-keysort-headers
	   (function string-lessp)
	   (function
	    (lambda (a)
	      (if case-fold-search
		  (downcase (gnus-simplify-subject (gnus-header-subject a) t))
		(gnus-simplify-subject (gnus-header-subject a) t)))))
	  ))))

(global-set-key "\C-cm"  '(lambda ()
                            (interactive)
                            (setq gnus-nntp-server ":Mail")
                            (gnus) ) )

(global-set-key "\C-cn"  '(lambda ()
                            (interactive)
                            (setq gnus-nntp-server (getenv "NNTPSERVER"))
                            (gnus)) )

----------
Joe Hildebrand                  Fuentez Systems Concepts
[email-masked]              11781 Lee-Jackson Hwy, Suite 700
Software Engineer               Fairfax, VA 22033
                                Phone: (703)273-1447   
                                Fax:   (703)273-2972

Standard disclaimers apply