[comp.emacs] A problem in GNU's undigest.el

dzzr@beta.UUCP (Douglas J Roberts) (02/10/88)

This morning I pulled an ar.sun-spots digest digest article off the
net to read in GNU, and found that undigestify-rmail-message didn't
recognize it as a digest. The following is a kludge that fixed that
problem, however, I suspect there may be other problems lurking.

From undigest.el:

(defun undigestify-rmail-message ()
  "Break up a digest message into its constituent messages.
Leaves original message, deleted, before the undigestified messages."
  (interactive)
  (widen)
  (let ((buffer-read-only nil)
	(msg-string (buffer-substring (rmail-msgbeg rmail-current-message)
				      (rmail-msgend rmail-current-message))))
    (goto-char (rmail-msgend rmail-current-message))
    (narrow-to-region (point) (point))
    (insert msg-string)
    (narrow-to-region (point-min) (1- (point-max))))
  (let ((error t)
	(buffer-read-only nil))
    (unwind-protect
	(progn
	  (save-restriction
	    (goto-char (point-min))
	    (delete-region (point-min)
			   (progn (search-forward "\n*** EOOH ***\n")
				  (point)))
	    (insert "\^_\^L\n0,unseen,,\n*** EOOH ***\n")
	    (narrow-to-region (point)
			      (point-max))
	    (let* ((fill-prefix "")
		   (case-fold-search t)
		   (digest-name
		    (mail-strip-quoted-names
		     (or (save-restriction
			   (search-forward "\n\n")
			   (narrow-to-region (point-min) (point))
			   (goto-char (point-max))
			   (or 
			     (mail-fetch-field "Reply-To")
			     (mail-fetch-field "To")
							 ;;
			     (mail-fetch-field "From"))) ;; <-- ADD THIS LINE
							 ;;
			   (error "Message is not a digest (Mail Header Problem)"))))) 

	.
	.
	.

REST OF FUNCTION

--Doug
===============================================================
Douglas Roberts
Los Alamos National Laboratory
(505)667-4569
dzzr@lanl.gov
===============================================================

-- 

	Doug Roberts
	Los Alamos National Laboratory
	dzzr@lanl.gov