🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

NOT a bug report - patch to bury primary inbox on quit

#8885
From: Chris Moore
Date: Fri, 27 Nov 1992 11:53
66 lines
3271 bytes
Firstly, I'm sorry if this is an inappropriate place to mail this.  I
searched the info directory for a mailing list and found nothing and the
README only contained this address. (*)

I'm using VM 5.31 (beta).  I became tired of waiting for a long time each
time new mail arrives while VM reads and creates a summary for my rather
large INBOX (I keep pending messages there).

I'm in the habit of hitting 'q' when I've finished with INBOX for a while,
like any other mail buffer.

I thought it would be nice if VM simply bury-buffer'ed the INBOX and INBOX
Summary buffers when vm-quit is called, rather than killing the buffers.

The included unidiff format patch modifies vm-quit to do exactly that.  If
you think this is a good idea, feel free to include it in a future release
of VM.  The function needs re-indenting, since I've wrapped an 'if' around
some of it, and not re-indented it to keep the patch comprehensible.  The
patch worked immediately for me and one other guy who I mailed it to.
That's the extent of the testing I've done on it.

If you like this idea and decide to include it in a future release, it
would probably be best to add an extra variable
(vm-bury-primary-inbox-on-quit, or similar) to allow the user to enable
this feature at will.  Mail me if you want me to send a patch to add the
variable too.

Chris.

(*) 1.  Is 5.31 (beta) current?
    2.  Where should I have mailed this?

-----cut-----8<-----here-----8<--------------8<--------------
--- vm.el.~1~	Tue Jun  9 11:13:45 1992
+++ vm.el	Fri Nov 27 10:02:07 1992
@@ -1214,6 +1214,15 @@
   "Quit VM, saving changes and expunging deleted messages."
   (interactive)
   (vm-select-folder-buffer)
+  (if (string= buffer-file-name (expand-file-name vm-primary-inbox))
+      (let ((mail-buffer (current-buffer)))
+	(vm-save-folder)
+	(if vm-summary-buffer
+	    (progn
+	      (delete-windows-on vm-summary-buffer)
+	      (bury-buffer vm-summary-buffer)))
+	(delete-windows-on mail-buffer)
+	(bury-buffer mail-buffer))
   (if (not (memq major-mode '(vm-mode vm-virtual-mode)))
       (error "%s must be invoked from a VM buffer." this-command))
   (vm-check-for-killed-summary)
@@ -1264,6 +1273,7 @@
 	(set-buffer mail-buffer)
 	(set-buffer-modified-p nil)
 	(kill-buffer (current-buffer))))))
+  )
 
 ;; in support of timer based checkpointing.
 (defun vm-checkpoint-prologue-hook ()

-----cut-----8<-----here-----8<--------------8<--------------
moore@src.bae.co.uk   /      Chris Moore      \
                     / Sowerby Research Centre \
                     \  British Aerospace PLC  /
tel: +44 272 363375   \      BRISTOL, UK      /
Technical Details
Message-ID: <9211271153.AA21062@sun19.src.bae.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!wendy-fate.uu.net!bug-vm

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,d0cb1167d5b1ef1c,start
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1992-11-27 04:26:15 PST
x-gateway: rodan.UU.NET from bug-vm to gnu.emacs.vm.bug; Fri, 27 Nov 1992 07:20:28 EST
Date: Fri, 27 Nov 1992 11:53:01 GMT
From: moore@src.bae.co.uk (Chris Moore)
Message-ID: <9211271153.AA21062@sun19.src.bae.co.uk>
Subject: NOT a bug report - patch to bury primary inbox on quit
Newsgroups: gnu.emacs.vm.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!wendy-fate.uu.net!bug-vm
Sender: bug-vm-request@uunet.uu.net
Lines: 66