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] Add mailer as a candidate for browse-url-default-browser Date: Tue, 26 Feb 2008 03:00:24 +0100 Organization: GNU's Not UNIX! Message-ID: <200802260200.m1Q20OBP006845@localhost.localdomain> Reply-To: Xavier Maillard NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1203993444 19468 80.91.229.12 (26 Feb 2008 02:37:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2008 02:37:24 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 26 03:37:49 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 1JTphS-0006je-N5 for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2008 03:37:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTpgw-0004TT-RW for ged-emacs-devel@m.gmane.org; Mon, 25 Feb 2008 21:37:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JTpeG-0002TC-UH for emacs-devel@gnu.org; Mon, 25 Feb 2008 21:34:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JTpeD-0002PL-UK for emacs-devel@gnu.org; Mon, 25 Feb 2008 21:34:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTpeC-0002Ow-QA for emacs-devel@gnu.org; Mon, 25 Feb 2008 21:34:24 -0500 Original-Received: from master.uucpssh.org ([193.218.105.66]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JTpeC-0007wc-9A for emacs-devel@gnu.org; Mon, 25 Feb 2008 21:34:24 -0500 Original-Received: by master.uucpssh.org (Postfix, from userid 10) id B0A5DC778A; Tue, 26 Feb 2008 03:32:40 +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 m1Q20ULo006866 for ; Tue, 26 Feb 2008 03:00:30 +0100 Original-Received: (from xma@localhost) by localhost.localdomain (8.14.1/8.13.8/Submit) id m1Q20OBP006845; Tue, 26 Feb 2008 03:00:24 +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=-1.441, required 4.6, autolearn=not spam, ALL_TRUSTED -1.44, 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:90466 Archived-At: Hi, this is another test at trying to have the possibility to send an email to a recipient at point. This one is a one-line patch that just add `browse-url-mail' as the first candidate in the function `browser-url-default-browser' function. Here is the proposed changelog entry plus the change. 2008-02-25 Xavier Maillard * net/browse-url.el (browse-url-default-browser): Add support to send an email to the recipient at point (if found). --- browse-url.el.~1.73.~ 2008-01-08 21:45:53.000000000 +0100 +++ browse-url.el 2008-02-25 23:50:33.000000000 +0100 @@ -874,10 +874,12 @@ When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'. -The order attempted is gnome-moz-remote, Mozilla, Firefox, -Galeon, Konqueror, Netscape, Mosaic, Lynx in an xterm, and then W3." +The order attempted is mailer (if qualified), gnome-moz-remote, +Mozilla, Firefox, Galeon, Konqueror, Netscape, Mosaic, Lynx in an +xterm, and then W3." (apply (cond + ((thing-at-point 'email) 'browse-url-mail) ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) ((executable-find browse-url-mozilla-program) 'browse-url-mozilla) ((executable-find browse-url-firefox-program) 'browse-url-firefox) What do you think of this one ? I tested it very quickly and it works for me. Xavier -- http://www.gnu.org http://www.april.org http://www.lolica.org