Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!YALE.ARPA!ram-ashwin From: ram-ashwin@YALE.ARPA (Ashwin Ram) Newsgroups: comp.emacs Subject: Re: RMAIL forwarding Message-ID: <8710181551.AA01122@ATHENA.CS.YALE.EDU> Date: Sun, 18-Oct-87 11:51:37 EDT Article-I.D.: ATHENA.8710181551.AA01122 Posted: Sun Oct 18 11:51:37 1987 Date-Received: Mon, 19-Oct-87 00:08:43 EDT Sender: daemon@eddie.MIT.EDU Lines: 59 > Anyone have a routine to automatically prepend a "Forwarded message > follows" text line before forwarded text? ... How about one that prepends > "Re:" to the subject of a reply? The addition of "Re: " is pretty easy. Just use: (concat "Re: " (or subject "[none]")) instead of: subject in the call to mail-other-window at the end of the rmail-reply function. ---------- For the forwarded message problem, wrap some code around the original rmail-forward to add whatever you want. E.g., here's code that will wrap a "forwarded message follows/ends" message around the original message, and also set it off from your own comments by inserting a "> " at the beginning of each line of the message. Pick up whatever part of this code you need. (defun rmail-forward-2 () (interactive) (rmail-forward) ; Remove trailing whitespace (purely esthetic). (save-excursion (goto-char (point-max)) (delete-region (point) (progn (re-search-backward "[^ \^I\^L\n]") (end-of-line) (point)))) ; Highlight original message. Wrap "Forwarded message follows/ends" around it. (save-excursion (save-restriction (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (narrow-to-region (point) (point-max)) (insert "Forwarded message follows\n") (while (re-search-forward "^" (point-max) t) (replace-match "> " t t)) (goto-char (point-max)) (insert "\nEnd of forwarded message\n\n")))) (define-key rmail-mode-map "f" 'rmail-forward-2) --------- You can hack rmail-yank-original to insert "> " at the beginning of the original message (instead of just indenting it) in a similar way. When interleaving your reply with the original message, this improves readability considerably. Aside: My feeling is that these behaviors should be controlled via variables. E.g., a rmail-yank-original-prefix that you could set to " " or "> ", and a rmail-reply-subject-prefix that you could set to "Re: " if you wanted. -- Ashwin Ram -- ARPA: Ram-Ashwin@cs.yale.edu UUCP: {decvax,linus,seismo}!yale!Ram-Ashwin BITNET: Ram@yalecs