mernst@theory.lcs.mit.edu (Michael Ernst) (02/03/90)
;; If there is no "from" field, (mail-fetch-field "from") returns nil, ;; which mail-strip-quoted-names can't deal with. This modification ;; provides an explicit check. (defun gnus-convert-article-to-rmail () "Convert article in current buffer to Rmail message format." (let ((buffer-read-only nil)) ;; Insert special header of Unix mail. (goto-char (point-min)) (insert "From " (let ((from-field (mail-fetch-field "from"))) (or (if from-field (mail-strip-quoted-names from-field)) "unknown")) " " (current-time-string) "\n") ;; ``Quote'' "\nFrom " as "\n>From " ;; (note that this isn't really quoting, as there is no requirement ;; that "\n[>]+From " be quoted in the same transparent way.) (while (search-forward "\nFrom " nil t) (forward-char -5) (insert ?>)) ;; Convert article to babyl format. (rmail-convert-to-babyl-format) )) --------------------------------------------------------------------------- The "if from-field" might not be necessary, but I didn't bother to check. In any case, this works. -Michael Ernst mernst@theory.lcs.mit.edu