🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

M-x vm behavior

#9319
From: STEVE TYNOR
Date: Tue, 28 Jan 1992 20:28
42 lines
1821 bytes
VM 4.41, Epoch 3.2

I've just switched to VM from RMAIL and find the way successive calls to
vm opens multiple buffers on a single mailbox annoying - attached is a
fix, but are there plans to enhance vm to (optionally?) provide this
functionality?  (I find fseting functions distasteful...).

Thanks,
Steve

;;; $Id: sdt-vm.el,v 1.2 92/01/24 10:41:17 tynor Exp $

;; Functions to make `M-x vm' reuse the folder if it already exists (i.e. make
;; `M-x vm' work more like `M-x rmail'
;;
;; Steve Tynor
;; January 1992

(defun sdt:make-vm-reuse-folder ()
  "Make `vm' invoke `sdt:vm' - only the first invocation has any effect.
See `sdt:vm' for details."
  (cond ((not (fboundp 'sdt:original-vm))
	 (fset 'sdt:original-vm (symbol-function 'vm))
	 (fset 'vm (symbol-function 'sdt:vm))
	 ))
  )

(defun sdt:vm (&optional folder)
  "Like the default function `vm', but if the primary-inbox has already been 
visited, just revisits it and checks for new mail (same behavior as RMAIL).
This prevents multiple buffers of the primary-inbox."
  (interactive)
  (let ((buf (get-buffer (or folder
			     (file-name-nondirectory vm-primary-inbox)))))
    (cond (buf
	   (switch-to-buffer buf)
	   (vm-get-new-mail))
	  (t 
	   (sdt:original-vm folder))
	  )
    )
  )
Technical Details
Message-ID: <TYNOR.92Jan28152828@hydra.gatech.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!gatech!prism!hydra.gatech.edu!tynor

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,d0f52c807f8e96a3,start
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1992-01-28 12:51:25 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!gatech!prism!hydra.gatech.edu!tynor
From: tynor@hydra.gatech.edu (STEVE TYNOR)
Newsgroups: gnu.emacs.vm.bug
Subject: M-x vm behavior
Message-ID: <TYNOR.92Jan28152828@hydra.gatech.edu>
Date: 28 Jan 92 20:28:28 GMT
Sender: tynor@prism.gatech.EDU
Organization: Georgia Tech Research Institute
Lines: 44