home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.emacs
- Path: sparky!uunet!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!Germany.EU.net!ira.uka.de!slsvaat!josef!kanze
- From: kanze@us-es.sel.de (James Kanze)
- Subject: Re: Emacs & mail
- In-Reply-To: campo@sunthpi3.difi.unipi.it's message of Mon, 23 Nov 1992 19:38:09 GMT
- Message-ID: <KANZE.92Nov23162812@slsvhat.us-es.sel.de>
- Sender: news@us-es.sel.de
- Organization: SEL
- References: <1992Nov20.164126.17154@lynx.dac.northeastern.edu>
- <OSHINS.92Nov21132152@wolf.cs.washington.edu>
- <CAMPO.92Nov23143809@sunthpi3.difi.unipi.it>
- Date: 23 Nov 92 16:28:11
- Lines: 58
-
- In article <CAMPO.92Nov23143809@sunthpi3.difi.unipi.it>
- campo@sunthpi3.difi.unipi.it (Massimo Campostrini) writes:
-
- |> Is there any way to use emacs to reply to e-mail and include the previous
- |> message? Want i really want is emacs to insert some type of marker, such
- |> as the `>` before every line of the previous message. I know that elm
- |> does this but i don't have access to it anymore.
-
- |> If you reply to a message using Emacs, you can include the original
- |> message by typing C-c C-y, which is bound to mail-yank-original. This
- |> puts four spaces in front of every line instead of a '>'. But you can
- |> get rid of this by using C-u C-c C-y.
- |> If anyone knows of a way to change this to a '>' I would be
- |> interested.
-
- I picked this up off the net a while back, and it seems to work pretty
- good for me. I didn't note who posted it, so I can't give credit.
-
- Regrettably, I'm not proficient enough in elisp to modify it. I'd
- like it to also reformat paragraphs (the equivalent of M-q) before
- inserting the |>.
- --
- James Kanze GABI Software, Sarl.
- email: kanze@us-es.sel.de 8 rue du Faisan
- 67000 Strasbourg
- France
- --------------cut here---------------
-
- ;; The following hook is used so that mail yank indentation will
- ;; use the conventional "|> " string, instead of just indenting.
- ;; --------------------------------------------------------------------------
- (setq mail-setup-hook
- (setq news-reply-mode-hook
- '(lambda ()
- (defvar mail-yank-indent-string "|> ")
-
- (defun mail-yank-original (arg)
- (interactive "P")
- (if mail-reply-buffer
- (let ((start (point)))
- (delete-windows-on mail-reply-buffer)
- (insert-buffer mail-reply-buffer)
- (mail-yank-clear-headers start (mark))
- (mail-yank-indent start)
- (exchange-point-and-mark)
- (if (not (eolp)) (insert ?\n)))))
-
- (defun mail-yank-indent (start)
- (save-excursion
- (goto-char start)
- (while (re-search-forward "^" (point-max) t)
- (replace-match mail-yank-indent-string))
- (goto-char start)
- (while (re-search-forward
- (concat "^" mail-yank-indent-string "[ \t]*$")
- (point-max) t)
- (replace-match "")))) )))
-
-