Article View: gnu.emacs.bug
Article #1694Unsent mail messages should be "protected"
From: Ashwin Ram
Date: Wed, 17 May 1989 18:48
Date: Wed, 17 May 1989 18:48
45 lines
2368 bytes
2368 bytes
GNU Emacs 18.52.26 of Thu May 4 1989 on leo.ring.cs.yale.edu (Domain/OS)
A mail message that is currently being composed should be "protected" in the
sense that:
1. If you M-x kill-emacs while the message is being composed, Emacs should
prompt you with "modified buffers exist, do you really want to exit" just
like with other buffers that you don't want to clobber accidently.
2. If you start composing a new message using M-x mail, and a previous unsent
message exists (as indicated by the presence of the ~/#%*mail* file),
Emacs should not clobber the old message. Instead, it should either (a)
prompt you with "unsent message exists, erase it" or (b) use a different
name for the checkpoint file.
Also, while I'm at it, the following modification to mail allows the user to
compose >1 message at a time. If you M-x mail while a mail message is being
composed, you are prompted with "unsent message exists, erase it". If you
say "y", the old message is clobbered; if you say "n", a new mail buffer is
set up for you. The arguments are the same as in the standard release.
;; Ashwin Ram, 5/17/89.
(defun mail (&optional noerase to subject in-reply-to cc replybuffer)
(interactive "P")
(switch-to-buffer "*mail*")
(if (not noerase)
(progn
(if (or (not (buffer-modified-p))
(y-or-n-p "Unsent message being composed; erase it? "))
(erase-buffer)
(progn (bury-buffer)
(switch-to-buffer (generate-new-buffer "*mail*"))))
(setq default-directory (expand-file-name "~/"))
(auto-save-mode auto-save-default)
(mail-mode)
(mail-setup to subject in-reply-to cc replybuffer)
t)))
Feel free to add this to the distribution if you like it.
-- Ashwin.
ARPA: Ram-Ashwin@cs.yale.edu
UUCP: {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin
BITNET: Ram@yalecs
Technical Details
Message-ID:
<8905171848.AA07393@ATHENA.CS.YALE.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!YALE.EDU!ram-ashwinShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!YALE.EDU!ram-ashwin From: ram-ashwin@YALE.EDU (Ashwin Ram) Newsgroups: gnu.emacs.bug Subject: Unsent mail messages should be "protected" Message-ID: <8905171848.AA07393@ATHENA.CS.YALE.EDU> Date: 17 May 89 18:48:54 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 45