Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!uwm.edu!mrsvr.UUCP!pet16.uucp!hallett From: hallett@pet16.uucp (Jeff Hallett x5163 ) Newsgroups: comp.emacs Subject: Re: Changing rmail reply??? Message-ID: <1712@mrsvr.UUCP> Date: 12 Dec 89 18:00:57 GMT References: <8912112012.AA06265@osnome.che.wisc.edu> Sender: news@mrsvr.UUCP Reply-To: hallett@gemed.ge.com (Jeffrey A. Hallett (414) 548-5163) Organization: GE Medical Systems, Milwaukee, WI Lines: 84 In article <8912112012.AA06265@osnome.che.wisc.edu> epperly@OSNOME.CHE.WISC.EDU (Tom Epperly) writes: >Please don't flame me for asking a stupid question, but how can I >change rmail to prepend "Re: " to the subject when replying? I am not >a LISP expert much less GNU Emacs LISP, but it seems that rmail >deliberately removes "Re: " from the subject line. How do I have it >put one or leave one "Re: " at the beginning? > I modified rmail-reply and load the following file as part of my mail-mode-hook: ----------------------8<------------------- (defun rmail-reply (just-sender) "Reply to the current message. Normally include CC: to all other recipients of original message; prefix argument means ignore them. While composing the reply, use \\[mail-yank-original] to yank the original message into it." (interactive "P") ;;>> this gets set even if we abort. Can't do anything about it, though. (rmail-set-attribute "answered" t) (rmail-display-labels) (let (from reply-to cc subject date to message-id resent-reply-to) (save-excursion (save-restriction (widen) (goto-char (rmail-msgbeg rmail-current-message)) (forward-line 1) (if (= (following-char) ?0) (narrow-to-region (progn (forward-line 2) (point)) (progn (search-forward "\n\n" (rmail-msgend rmail-current-message) 'move) (point))) (narrow-to-region (point) (progn (search-forward "\n*** EOOH ***\n") (beginning-of-line) (point)))) (setq resent-reply-to (mail-fetch-field "resent-reply-to" t) from (mail-fetch-field "from") reply-to (or resent-reply-to (mail-fetch-field "reply-to" nil t) from) cc (cond (just-sender nil) (resent-reply-to (mail-fetch-field "resent-cc" t)) (t (mail-fetch-field "cc" nil t))) subject (or (and resent-reply-to (mail-fetch-field "resent-subject" t)) (mail-fetch-field "subject")) date (cond (resent-reply-to (mail-fetch-field "resent-date" t)) ((mail-fetch-field "date"))) to (cond (resent-reply-to (mail-fetch-field "resent-to" t)) ((mail-fetch-field "to" nil t)) ;((mail-fetch-field "apparently-to")) ack gag barf (t "")) message-id (cond (resent-reply-to (mail-fetch-field "resent-message-id" t)) ((mail-fetch-field "message-id")))))) ; ; The change goes here makes Subject == RE: {previous subject} ; (setq subject (concat "RE: {" (if subject subject '"No Subject") "}")) (mail-other-window nil (mail-strip-quoted-names reply-to) subject (rmail-make-in-reply-to-field from date message-id) (if just-sender nil (let* ((cc-list (rmail-dont-reply-to (mail-strip-quoted-names (if (null cc) to (concat to ", " cc)))))) (if (string= cc-list "") nil cc-list))) (current-buffer)))) --------------8<--------------- -- Jeffrey A. Hallett, PET Software Engineering GE Medical Systems, W641, PO Box 414, Milwaukee, WI 53201 (414) 548-5163 : EMAIL - hallett@gemed.ge.com Est natura hominum novitatis avida