From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.devel Subject: [PATCH] New function to send a mail to the recipient at point Date: Sat, 23 Feb 2008 01:25:03 +0100 Organization: GNU's Not UNIX! Message-ID: <200802232244.m1NMiK5I014327@localhost.localdomain> Reply-To: Xavier Maillard NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.5.2.2" X-Trace: ger.gmane.org 1203809612 3917 80.91.229.12 (23 Feb 2008 23:33:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Feb 2008 23:33:32 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 24 00:33:58 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JT3sO-0004tS-OE for ged-emacs-devel@m.gmane.org; Sun, 24 Feb 2008 00:33:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JT3rt-0006z3-3L for ged-emacs-devel@m.gmane.org; Sat, 23 Feb 2008 18:33:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JT3ro-0006wz-Gb for emacs-devel@gnu.org; Sat, 23 Feb 2008 18:33:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JT3rn-0006vS-1q for emacs-devel@gnu.org; Sat, 23 Feb 2008 18:33:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JT3rm-0006vP-SR for emacs-devel@gnu.org; Sat, 23 Feb 2008 18:33:14 -0500 Original-Received: from master.uucpssh.org ([193.218.105.66]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JT3rm-0005m8-Do for emacs-devel@gnu.org; Sat, 23 Feb 2008 18:33:14 -0500 Original-Received: by master.uucpssh.org (Postfix, from userid 10) id 64802C7A21; Sun, 24 Feb 2008 00:32:35 +0100 (CET) Original-Received: from localhost.localdomain (IDENT:1000@localhost [127.0.0.1]) by localhost.localdomain (8.14.1/8.13.8) with ESMTP id m1NMiLlI014330 for ; Sat, 23 Feb 2008 23:44:21 +0100 Original-Received: (from xma@localhost) by localhost.localdomain (8.14.1/8.13.8/Submit) id m1NMiK5I014327; Sat, 23 Feb 2008 23:44:20 +0100 User-Agent: Rmail in GNU Emacs 23.0.60.2 on GNU/Linux Jabber-ID: xma01@jabber.fr X-uucpssh: Found to be clean X-uucpssh-SpamCheck: not spam, SpamAssassin (not cached, score=-3.737, required 4.6, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.58, BAYES_00 -2.60, DATE_IN_PAST_12_24 1.25, SPF_HELO_PASS -0.00) X-uucpssh-From: xma@gnu.org X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90182 Archived-At: This is a multi-part message in MIME format. --------------1.5.2.2 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: quoted-printable here is a very small function I find very convenient. If it can be of any help/interest to the project, fell free to install it. Signed-off-by: Xavier Maillard diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7d3ba62..4fd162a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-02-23 Xavier Maillard + + * mail/rmail.el (rmail-send-mail-at-point): New function. Send an email + to the recipient address at point. + 2008-02-22 Juanma Barranquero =20 * faces.el (font-weight-table): Fix value of `semi-light'. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index e36b988..679ee56 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -775,7 +775,7 @@ isn't provided." by setting `rmail-enable-mime' to non-nil, the required feature `%s' (the value of `rmail-mime-feature') is not available in the current session. -So, the MIME support is turned off for the moment."=20 +So, the MIME support is turned off for the moment." rmail-mime-feature)) (setq rmail-enable-mime nil))))) =20 @@ -4022,6 +4022,15 @@ specifying headers which should not be copied into= the new message." (insert "BCC: " (user-login-name) "\n")))) (goto-char (point-min)) (mail-position-on-field (if resending "Resent-To" "To") t)))))) + +(defun rmail-send-mail-at-point () + "Edit a mail message to the recipient found at point." + (interactive) + (require 'thingatpt) + (let ((to (thing-at-point 'email))) + (if to + (mail nil to) + (error "No email found at point")))) =0C (defun rmail-summary-exists () "Non-nil if in an RMAIL buffer and an associated summary buffer exists= . --------------1.5.2.2--