pan@panda.Stanford.EDU (Doug Pan) (02/26/91)
My mhe (mh within gnuemacs) +inbox window refuses to show any more
messages that have a message number greater than 9999. I can still
use 'inc' to deposit new messages into my Mail/inbox directory.
However, no message after 10000 inclusive show up in the window. The
'scan' command doesn't bring in these new messages either. I probably
need to fix a default value somewhere. Any suggestions?
--
Douglas Pan pan@lurch.stanford.edu (415) 725-3652
Computer Systems Lab, CIS 35, Stanford University, CA 94305-4070 taylor@THINK.COM (David Taylor) (02/26/91)
<Date: 25 Feb 91 19:03:38 GMT
<From: Doug Pan <agate!shelby!cascade.stanford.edu!panda.Stanford.EDU!pan@ucbvax.berkeley.edu>
<
<My mhe (mh within gnuemacs) +inbox window refuses to show any more
<messages that have a message number greater than 9999. I can still
<use 'inc' to deposit new messages into my Mail/inbox directory.
<However, no message after 10000 inclusive show up in the window. The
<'scan' command doesn't bring in these new messages either. I probably
<need to fix a default value somewhere. Any suggestions?
The easiet solution is to just pack the folder so that you're below
10000. Or rename the folder and start a new one. Seriously!
Failing that, to fix scan is easy -- grab a copy of your scan format file
and change a 4 to a 5, then you'll be safe until you reach 100,000. I
believe you want to change a %4(msg) to a %5(msg). Look at mh-format(5)
for details.
Fixing mh-e.el is harder -- there are several places where 4 columns for
the message number is hardcoded. Here's the "diff -c" output. [I don't
know where the let/let* change at lines 295-308 came from -- it seems
like a no-op to me since there's only one variable...]
Good luck.
*** /usr/local/lib/gmacs/lisp/mh-e.el Thu Oct 1 12:09:47 1987
--- mh-e.el Wed Aug 1 23:53:31 1990
***************
*** 86,92 ****
;;; Real constants:
! (defvar mh-cmd-note 4 "Offset to insert notation")
(defvar mh-invisible-headers
"^Received: \\|^Message-Id: \\|^Remailed-\\|^Via: \\|^Mail-from: \\|^Return-Path: \\|^In-Reply-To: \\|^Resent-"
--- 86,92 ----
;;; Real constants:
! (defvar mh-cmd-note 5 "Offset to insert notation")
(defvar mh-invisible-headers
"^Received: \\|^Message-Id: \\|^Remailed-\\|^Via: \\|^Mail-from: \\|^Return-Path: \\|^In-Reply-To: \\|^Resent-"
***************
*** 96,102 ****
"Regexp specifying the beginning of the wrapper around a letter returned
by the mail system.")
! (defvar mh-good-msg-regexp "^....[^D^]"
"Regexp specifiying the scan lines that are 'good' messages")
--- 96,102 ----
"Regexp specifying the beginning of the wrapper around a letter returned
by the mail system.")
! (defvar mh-good-msg-regexp "^.....[^D^]"
"Regexp specifiying the scan lines that are 'good' messages")
***************
*** 295,308 ****
(defun mh-edit-again (msg)
"Clean-up a draft or a message previously sent and make it resendable."
(interactive (list (mh-get-msg-num t)))
! (let ((from-folder mh-current-folder)
! (draft (cond ((and mh-draft-folder (equal from-folder mh-draft-folder))
! (find-file (format "%s%d" mh-folder-filename msg))
! (buffer-name))
! (t
! (mh-read-draft "clean-up"
! (format "%s%d" mh-folder-filename msg)
! nil)))))
(mh-clean-msg-header (point-min)
"^Date:\\|^Received:\\|^Message-Id:\\|^From:"
nil)
--- 295,308 ----
(defun mh-edit-again (msg)
"Clean-up a draft or a message previously sent and make it resendable."
(interactive (list (mh-get-msg-num t)))
! (let* ((from-folder mh-current-folder)
! (draft (cond ((and mh-draft-folder (equal from-folder mh-draft-folder))
! (find-file (format "%s%d" mh-folder-filename msg))
! (buffer-name))
! (t
! (mh-read-draft "clean-up"
! (format "%s%d" mh-folder-filename msg)
! nil)))))
(mh-clean-msg-header (point-min)
"^Date:\\|^Received:\\|^Message-Id:\\|^From:"
nil)
***************
*** 811,817 ****
(if current-prefix-arg
(mh-read-seq "Undo" mh-narrowed-to-seq)
(mh-get-msg-num t))))
! (cond ((looking-at "^....D")
(cond (prefix-provided
(mapc (function (lambda (msg)
(setq mh-delete-list
--- 811,817 ----
(if current-prefix-arg
(mh-read-seq "Undo" mh-narrowed-to-seq)
(mh-get-msg-num t))))
! (cond ((looking-at "^.....D")
(cond (prefix-provided
(mapc (function (lambda (msg)
(setq mh-delete-list
***************
*** 824,830 ****
(mh-remove-msg-from-seq msg-or-seq 'deleted)
(mh-notate msg-or-seq ? mh-cmd-note))))
! ((looking-at "^....\\^")
(cond (prefix-provided
(mapc (function (lambda (msg)
(mapc (function
--- 824,830 ----
(mh-remove-msg-from-seq msg-or-seq 'deleted)
(mh-notate msg-or-seq ? mh-cmd-note))))
! ((looking-at "^.....\\^")
(cond (prefix-provided
(mapc (function (lambda (msg)
(mapc (function
***************
*** 881,887 ****
"Delete the MESSAGE."
(save-excursion
(mh-goto-msg msg nil)
! (if (looking-at "....\\^")
(error "Message %d is refiled. Undo refile before deleting." msg))
(push msg mh-delete-list)
(mh-add-msg-to-seq msg 'deleted t)
--- 881,887 ----
"Delete the MESSAGE."
(save-excursion
(mh-goto-msg msg nil)
! (if (looking-at ".....\\^")
(error "Message %d is refiled. Undo refile before deleting." msg))
(push msg mh-delete-list)
(mh-add-msg-to-seq msg 'deleted t)
***************
*** 892,898 ****
"Refile the MESSAGE in the FOLDER."
(save-excursion
(mh-goto-msg msg nil)
! (cond ((looking-at "....D")
(error "Message %d is deleted. Undo delete before moving." msg))
(t
(if (not (memq destination mh-refile-list))
--- 892,898 ----
"Refile the MESSAGE in the FOLDER."
(save-excursion
(mh-goto-msg msg nil)
! (cond ((looking-at ".....D")
(error "Message %d is deleted. Undo delete before moving." msg))
(t
(if (not (memq destination mh-refile-list))
***************
*** 1212,1220 ****
(case-fold-search nil))
(goto-char (point-min))
(while (if remove-all-flags
! (re-search-forward "^....\\D\\|^....\\^\\|^....\\+\\|.....%"
nil t)
! (re-search-forward "^....\\+" nil t))
(delete-backward-char 1)
(insert " ")))))
--- 1212,1220 ----
(case-fold-search nil))
(goto-char (point-min))
(while (if remove-all-flags
! (re-search-forward "^.....\\D\\|^.....\\^\\|^.....\\+\\|......%"
nil t)
! (re-search-forward "^.....\\+" nil t))
(delete-backward-char 1)
(insert " ")))))
***************
*** 1227,1233 ****
(forward-line -1)
(message "No current message"))
(t
! (mh-notate curmsg ?+ 4)
(recenter 0)
(mh-maybe-show curmsg)))))
--- 1227,1233 ----
(forward-line -1)
(message "No current message"))
(t
! (mh-notate curmsg ?+ mh-cmd-note)
(recenter 0)
(mh-maybe-show curmsg)))))
***************
*** 1971,1979 ****
(defun mh-msg-search-pat (n)
"Return a search pattern for message N in the scan listing."
! (cond ((< n 10) (format "^[^0-9][^0-9][^0-9]%d" n))
! ((< n 100) (format "^[^0-9][^0-9]%d" n))
! ((< n 1000) (format "^[^0-9]%d" n))
(t (format "^%d" n))))
--- 1971,1980 ----
(defun mh-msg-search-pat (n)
"Return a search pattern for message N in the scan listing."
! (cond ((< n 10) (format "^[^0-9][^0-9][^0-9][^0-9]%d" n))
! ((< n 100) (format "^[^0-9][^0-9][^0-9]%d" n))
! ((< n 1000) (format "^[^0-9][^0-9]%d" n))
! ((< n 10000) (format "^[^0-9]%d" n))
(t (format "^%d" n))))
***************
*** 2153,2156 ****
(define-key mh-pick-mode-map "\C-C\C-Fs" 'mh-to-field)
(define-key mh-pick-mode-map "\C-C\C-Ft" 'mh-to-field)
(define-key mh-pick-mode-map "\C-C\C-W" 'mh-check-whom)
-
--- 2154,2156 ----
David
--
David Taylor
taylor@think.com, ...{ames,bloom-beacon,harvard}!think!taylorgildea@EXPO.LCS.MIT.EDU (Stephen Gildea) (02/28/91)
The diffs posted by David Taylor for mh-e.el are for an old version of mh-e.el. (He doesn't way what version of Emacs, but it's certainly not the current one, 18.57.) The newest mh-e is much easier to customize for different scan formats. All you will have to change is some defvars. < Stephen