Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ukma!uflorida!novavax!hcx1!tom From: tom@ssd.harris.com (Tom Horsley) Newsgroups: comp.emacs Subject: Bug in VM 4.11 Message-ID: Date: 7 Jun 89 11:07:14 GMT Sender: news@hcx1.UUCP Organization: Harris Computer Systems Division Lines: 73 I have been using VM by Kyle E. Jones to read mail for a while now, and I like it, but I have found a slight bug. I tried to mail the bug report, but of course, it bounced, so here it is in comp.emacs: In vm.el in the defun for vm-mode there is a large setq near the beginning. One of the things that this does is (setq require-final-newline nil). Unfortunately, require-final-newline IS NOT a local variable. As it stands now, as soon as you read mail, any other edit sessions are potentially screwed up due to the setting of require-final-newline (this is a real problem when you are editing an SCCS file since SCCS will let you update with a file that does not have a trailing newline, but then you can't get any delta from the file until you go in and fix it by hand then run admin -z). Anyway, this problem is simple to fix by just adding the line: (make-local-variable 'require-final-newline) prior to the setq in vm-mode. P.S. Another handy function I use now that I have gotten all my folders converted back to U**x mail format is: (defun rmail () "Substitute rmail function so I don't accidentially forget to run vm." (interactive) (kill-mail-message) (if current-prefix-arg (call-interactively 'vm-visit-folder) (vm) ) ) This provides a function that acts just like rmail only invokes VM. My reflexes cannot trick me into screwing up my mail now :-). P.P.S. kill-mail-message is a function I wrote that gets "Mail" out of the status line: (defun kill-mail-message () "Kill the Mail message in display-time-string and force redisplay. Return t if there was mail, nil if no mail." (if (string-match "\\(.*\\)Mail\\(.*\\)" display-time-string) (progn (setq display-time-string (concat (substring display-time-string (match-beginning 1) (match-end 1) ) (substring display-time-string (match-beginning 2) (match-end 2) ) ) ) ;; Delete "Mail" from string and force mode line ;; re-display (again) (save-excursion (set-buffer (other-buffer))) (set-buffer-modified-p (buffer-modified-p)) ;; Do redisplay right now, if no input pending. (sit-for 0) t ) nil ) ) -- ===================================================================== usenet: tahorsley@ssd.harris.com USMail: Tom Horsley compuserve: 76505,364 511 Kingbird Circle genie: T.HORSLEY Delray Beach, FL 33444 ======================== Aging: Just say no! ========================