Emacs Lisp: remove-emails, function for mutt email client to anonymize forwarded messages

Emacs Lisp: remove-emails, function for mutt email client to anonymize forwarded messages

This function is helpful when writing emails with mutt or maybe other email clients that are using Emacs editor for text or mail message composition. It removes all emails displayed from buffer. At some occasions user may want to forward email messages from other people without revealing their email addresses. The mutt email client usually displayes email addresses in this format and all such addresses may be easily removed with this interactive command.

(defun remove-emails ()
  "Removes all <example@example.com> emails from buffer. At some
occasions user may want to forward email messages from other
people without revealing their email addresses. mutt email client
usually displayes email addresses in this format
<USER@EXAMPLE.COM> and all such addresses may be easily removed
with this command."
  (interactive)
  (save-excursion
    (goto-char (point-min))
    (let ((match (re-search-forward "<.*@.*>")))
      (replace-match ""))))

Leave Your Comment or Contact GNU.Support

Contact GNU.Support now. There is a simple rule at GNU.Support: if we can help you, we do, whenever and wherever necessary, and it's the way we've been doing business since 2002, and the only way we know


Full name:


E-mail:


Message: