unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] New function to send a mail to the recipient at point
@ 2008-02-23  0:25 Xavier Maillard
  2008-02-24  9:05 ` Reiner Steib
  0 siblings, 1 reply; 10+ messages in thread
From: Xavier Maillard @ 2008-02-23  0:25 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1727 bytes --]


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 <xma@gnu.org>

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  <xma@gnu.org>
+
+	* mail/rmail.el (rmail-send-mail-at-point): New function. Send an email
+	to the recipient address at point.
+
 2008-02-22  Juanma Barranquero  <lekktu@gmail.com>
 
 	* 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." 
+So, the MIME support is turned off for the moment."
 		rmail-mime-feature))
        (setq rmail-enable-mime nil)))))
 
@@ -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"))))
 \f
 (defun rmail-summary-exists ()
   "Non-nil if in an RMAIL buffer and an associated summary buffer exists.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-02-26  2:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-23  0:25 [PATCH] New function to send a mail to the recipient at point Xavier Maillard
2008-02-24  9:05 ` Reiner Steib
2008-02-24  9:56   ` Leo
2008-02-24 12:33     ` User-Agent header (was: [PATCH] New function to send a mail to the recipient at point) Reiner Steib
2008-02-24 17:49       ` User-Agent header Leo
2008-02-24 18:21       ` User-Agent header (was: [PATCH] New function to send a mail to the recipient at point) Stephen J. Turnbull
2008-02-24 18:41         ` User-Agent header Bill Wohler
2008-02-24 22:44           ` Stephen J. Turnbull
2008-02-26  2:00             ` Xavier Maillard
2008-02-26  2:00   ` [PATCH] New function to send a mail to the recipient at point Xavier Maillard

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).