🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

5.32 Bug fix: Empty primary mailbox

#9156
From: Sai Lai Lo
Date: Mon, 09 Mar 1992 14:23
49 lines
2513 bytes
I like to keep my primary inbox empty and save all my messages to other
folders. This causes two problems:

1. vm() chokes when it tries to (vm-preview-current-message) an empty inbox.
2. We use mmdf format and the default for an empty folder is unix format.

Here is the patch to fix the bug:

*** vm-folder.el	Thu Mar  5 10:04:35 1992
--- vm-folder.new.el	Mon Mar  9 12:41:38 1992
***************
*** 1065,1070 ****
--- 1065,1075 ----
  	    (message "Getting new mail from %s... done" (car spool-files))
  	    (setq got-mail t)))
        (setq spool-files (cdr spool-files)))
+ ;; There is a possibility that the primary inbox is empty beforehand. This
+ ;; would cause a problem because vm-get-folder-type called earlier in vm()
+ ;; fail to identitfy the type of the folder. As a fail safe measure, set
+ ;; vm-folder-type here again. 
+     (setq vm-folder-type (vm-get-folder-type))
      got-mail ))
  
  (defun vm-get-new-mail (&optional arg)
***************
*** 1326,1332 ****
  		    (vm-proportion-windows))))
  	(switch-to-buffer (current-buffer)))
        (set-buffer mail-buffer)
!       (vm-preview-current-message)
        (if (and (numberp vm-flush-interval)
  	       (condition-case data
  		   (progn (require 'timer) t)
--- 1331,1337 ----
  		    (vm-proportion-windows))))
  	(switch-to-buffer (current-buffer)))
        (set-buffer mail-buffer)
!       (or (null vm-message-list) (vm-preview-current-message))
        (if (and (numberp vm-flush-interval)
  	       (condition-case data
  		   (progn (require 'timer) t)
--
============================================================================
Sai-Lai Lo	Computer Laboratory	University of Cambridge  U.K.
		Email:	        sll@cl.cam.ac.uk
                UUCP:           ....!uknet!cl.cam.ac.uk!sll
		Voice:		+44-223-334626
		Fax:		+44-223-334678
============================================================================
Technical Details
Message-ID: <SLL.92Mar9142307@ely.uk.ac.cam.cl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!cam-cl!nntp-serv!sll

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,6aab8b74f2939ef5,start
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1992-03-09 07:13:00 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!cam-cl!nntp-serv!sll
From: sll@ely.uk.ac.cam.cl (Sai Lai Lo)
Newsgroups: gnu.emacs.vm.bug
Subject: 5.32 Bug fix: Empty primary mailbox
Message-ID: <SLL.92Mar9142307@ely.uk.ac.cam.cl>
Date: 9 Mar 92 14:23:07 GMT
Sender: news@cl.cam.ac.uk (The news facility)
Distribution: gnu
Organization: Computer Laboratory, University of Cambridge
Lines: 49