🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #9221

Re: How to use VM with alternative mailboxes?

#9221
From: Rich Kaul
Date: Wed, 04 Mar 1992 00:44
75 lines
3918 bytes
(try this again -- sorry if you see a repeat, my news is somewhat flakey)

In article <p0msrINNgsr@hilbert.math.ksu.edu> tar@math.ksu.edu (Tim Ramsey) writes:
   I'm using VM 5.32beta with Emacs 18.58.  I use Elm's "filter" program
   to classify incoming mail and stuff it into one of three mailboxes:
   /usr/spool/mail/tar (my system mailbox), ~/Mail/work (high priority
   mail) and ~/Mail/mail.lists (junk mail).

I can relate.  I use a similar method, but I use a perl script in my
~/.forward file so that my system mailbox isn't touched except when
really important mail comes in -- it makes xbiff useful again.
Otherwise mail gets classified by sender and destination.

   I have no problems using VM
   to read my system mailbox, but using it to read my ~/Mail mailboxes
   doesn't work so well.

I have found that it's easier to use a separate directory for the
incoming mailboxes so I know when I have new mail in the various
catagories I use for mail.  Then I create separate a vm-primary-inbox
for each classification .  Then the perl script drops each bit of mail
in ~/Mail/incoming/boxname (where boxname is a classification scheme
like "system", "connectionists", etc) and have inboxes like
~/Mail/SYSBOX.  Then in my ~/.vm file I have lots of things like:

;; Upon startup in vm-mode, I want to bind keys to make getting at
;; sub-mailboxes easier.  This should do it.
(setq vm-mode-hooks
  '(lambda()
    (make-local-variable 'version-control)
    (setq version-control 'never)	; keep minimal backups
    (local-unset-key "\C-cn")
    (local-set-key "\C-cn" 'vm-normal)
    (local-unset-key "\C-cp")
    (local-set-key "\C-cp"	'vm-personal)
    (local-unset-key "\C-c\C-f")
    (local-set-key "\C-cc"	'vm-connect)
    (local-unset-key "\C-cs")
    (local-set-key "\C-cs"	'vm-system)
    (local-unset-key "\C-cm")
    (local-set-key "\C-cm"	'vm-misc)))

(defun vm-normal ()
  "Set up reading from the default mail box"
  (interactive)
  (setq vm-primary-inbox "~/Mail/IMPBOX")
  (setq vm-spool-files (list (expand-file-name "/var/spool/mail/kaul")))
  (vm-visit-folder "~/Mail/IMPBOX"))
  
(defun vm-personal ()
  "Set up reading of the personal mail buffer"
  (interactive)
  (setq vm-primary-inbox "~/Mail/PBOX")
  (setq vm-spool-files (list (expand-file-name "~/Mail/incoming/personal")))
  (vm-visit-folder "~/Mail/PBOX"))

(defun vm-system ()
  "Set up reading of the system messages mail buffer"
  (interactive)
  (setq vm-primary-inbox "~/Mail/SYSBOX")
  (setq vm-spool-files (list (expand-file-name "~/Mail/incoming/system")))
  (vm-visit-folder "~/Mail/SYSBOX"))

... etc ...

Works like a champ.  I switch between mailboxes with ^C s, ^C m, etc.
And I don't even lose any mail :-)

If you want the perl mail filter or more details on .vm mechanism I
use, drop me a line and I'll forward them to you.  If you have any
suggestions on a better/cleaner mechanism, I'd like to hear them also.
--
Rich Kaul                  | "A NeXT is the only Unix workstation where you
kaul@ee.eng.ohio-state.edu | sit a salesman down and expect him to do any
kaul.2@osu.edu		   | work." -- a certain MorningStar programmer
Technical Details
Message-ID: <KAUL.92Mar3194425@amazon.ee.eng.ohio-state.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!ee.eng.ohio-state.edu!kaul
References: <p0msrINNgsr@hilbert.math.ksu.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,309a564d2a891328
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1992-03-03 16:54:46 PST
Newsgroups: gnu.emacs.vm.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!ee.eng.ohio-state.edu!kaul
From: kaul@ee.eng.ohio-state.edu (Rich Kaul)
Subject: Re: How to use VM with alternative mailboxes?
In-Reply-To: tar@math.ksu.edu's message of 3 Mar 1992 14:17:31 -0600
Message-ID: <KAUL.92Mar3194425@amazon.ee.eng.ohio-state.edu>
Sender: news@ee.eng.ohio-state.edu
Organization: Ohio State University Electrical Engineering
References: <p0msrINNgsr@hilbert.math.ksu.edu>
Date: Wed, 4 Mar 1992 00:44:25 GMT