changeset 101954:a7b2ac5493bd

(rmail-show-message-verbose-min): New option. (rmail-show-message): Conditionally show start and finish in echo area.
author Richard M. Stallman <rms@gnu.org>
date Thu, 12 Feb 2009 04:01:02 +0000
parents 7abfdad8fc00
children 0273f3af7765
files lisp/mail/rmail.el
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Thu Feb 12 03:30:26 2009 +0000
+++ b/lisp/mail/rmail.el	Thu Feb 12 04:01:02 2009 +0000
@@ -2503,6 +2503,11 @@
       (or (not content-type-header)
 	  (string-match text-regexp content-type-header)))))
 
+(defcustom rmail-show-message-verbose-min 200000
+  "Message size at which to show progress messages for displaying it."
+  :type 'integer
+  :group 'rmail)
+
 (defun rmail-show-message (&optional msg)
   "Show message MSG (default: current message) using `rmail-view-buffer'.
 Return text to display in the minibuffer if MSG is out of
@@ -2532,6 +2537,8 @@
 	(rmail-swap-buffers-maybe)
 	(setq beg (rmail-msgbeg msg)
 	      end (rmail-msgend msg))
+	(when (> (- end beg) rmail-show-message-verbose-min)
+	  (message "Showing message %d" msg))
 	(narrow-to-region beg end)
 	(goto-char beg)
 	(setq body-start (search-forward "\n\n" nil t))
@@ -2598,7 +2605,9 @@
 	(rmail-display-labels)
 	(rmail-swap-buffers)
 	(setq rmail-buffer-swapped t)
-	(run-hooks 'rmail-show-message-hook)))
+	(run-hooks 'rmail-show-message-hook)
+	(when (> (- end beg) rmail-show-message-verbose-min)
+	  (message "Showing message %d...done" msg))))
     blurb))
 
 (defun rmail-copy-headers (beg end &optional ignored-headers)