Article View: gnu.emacs.vm.bug
Article #9033Re: patch to get new mail when vm-primary-inbox runs vm-mode from auto-mode-alist
From: Jerry
Date: Thu, 18 Jun 1992 07:09
Date: Thu, 18 Jun 1992 07:09
45 lines
2530 bytes
2530 bytes
Kyle Jones on June 17 wrote:
*> Joe Wells writes:
> > jerry@math.ep.utexas.edu (Jerry) writes:
> >
> > If vm-primary-inbox matches an entry in auto-mode-alist to run
> > vm-mode, it wouldn't get any new mail. Here's a fix:
> >
> > Ah! I always wondered why that stopped working! Thanks!
*>
*> I thought I had mentioned that I made that not work on purpose.
*> I believe the auto-save file for the primary inbox will be
*> discarded if you get new mail via the call to vm-mode in the
*> auto-folder-alist.
Here's the corresponding code from vm-folder.el:
(if (or (and vm-primary-inbox-p
;; We demand full-startup and first-time here
;; to make sure that vm-mode being in the
;; auto-mode-alist doesn't cause an auto
;; save file to be ignored. Otherwise an auto
;; save file might be ignored on an "M-x vm"
;; if vm-mode were in in the auto-folder-alist.
full-startup
first-time
(not vm-folder-read-only)
(not auto-save-newer)
(vm-get-spooled-mail))
first-time
;; If the message list is empty, take a second look: the
;; buffer may have been encrypted the first time around.
;; This is a concession to users who use crypt.el and put
;; vm-mode into auto-mode-alist.
(null vm-message-list))
I thought the (not auto-save-newer) took care of that possibility. I
did test this several times; each time I got a "Not checking for new
mail... auto save file is newer; consider M-x recover-file" when doing
M-x vm. And full-startup is nil whenever vm-primary-inbox has already
been loaded so I won't lose in case of an awkwardly timed auto-save.
Also, when doing C-x C-f `vm-primary-inbox', I get the usual "Auto
save file is newer; consider M-x recover-file" since vm-mode just does
(vm (current-buffer)).
-Jerry
Technical Details
Message-ID:
<9206180709.AA11213@banach.math.ep.utexas.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!wendy-fate.uu.net!bug-vmReferences:
<9206160824.AA07877@banach.math.ep.utexas.edu> <9206180229.AA07299@wendy-fate.UU.NET> <JBW.92Jun17221711@bigbird.bu.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,c2e297c65edb3e4 X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1992-06-17 16:27:46 PST Newsgroups: gnu.emacs.vm.bug Sender: bug-vm-request@uunet.uu.net Date: Thu, 18 Jun 92 01:09:24 MDT From: jerry@math.ep.utexas.edu (Jerry) Message-ID: <9206180709.AA11213@banach.math.ep.utexas.edu> Subject: Re: patch to get new mail when vm-primary-inbox runs vm-mode from auto-mode-alist References: <9206160824.AA07877@banach.math.ep.utexas.edu> <9206180229.AA07299@wendy-fate.UU.NET> <JBW.92Jun17221711@bigbird.bu.edu> Path: arc1-ca.pugleaf.net!sparky!uunet!wendy-fate.uu.net!bug-vm Lines: 45