From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Newell Subject: Making 'mailto' org links use gnus styles Date: Wed, 04 Mar 2015 19:34:36 -1000 Message-ID: <87wq2wf1n7.fsf@bobnewell.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTOQu-0003iG-Tk for emacs-orgmode@gnu.org; Thu, 05 Mar 2015 00:34:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTOQl-00069c-0O for emacs-orgmode@gnu.org; Thu, 05 Mar 2015 00:34:52 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:36940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTOQk-00068I-Pg for emacs-orgmode@gnu.org; Thu, 05 Mar 2015 00:34:42 -0500 Received: by pdbnh10 with SMTP id nh10so37643214pdb.4 for ; Wed, 04 Mar 2015 21:34:41 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Aloha kakou, I have some 'mailto' links in an org file in the expected form: [[mailto:bobnewell@bobnewell.net]] C-c C-o also does as expected, bringing up a blank email to the addressee in question. But it uses 'browse-url' to do so, and just brings up a simple mail interface, when I'd like to have my gnus interface (with my BCCs, sig, etc.). I am able to get this to work (and at the same time work with mailto links in w3m buffers) with the following kludge that I threw together this afternoon (coded below and yes, it's a horror story). It just seems like there should be an easier/better way. Haved I failed to find something simple? I'm posting here as I encountered this with org-mode. Unsure if it should (also) go in the 'gnus' groups. ---- (setq browse-url-mailto-function 'rjn-browse-url-mailto) (defvar rjn-mail-addr) (defvar rjn-mail-subject) (defun rjn-browse-url-mailto (messy-mail-addr &optional whatever) "Fix for url-browse and w3m mailto to work with gnus styles" (setq rjn-mail-addr (replace-regexp-in-string "mailto:" "" messy-mail-addr)) (string-match "?subject=.*" rjn-mail-addr) (setq rjn-mail-subject (match-string 0 rjn-mail-addr)) (setq rjn-mail-subject (replace-regexp-in-string "?subject=" "" rjn-mail-subject)) (setq rjn-mail-addr (replace-regexp-in-string "?subject=.*" "" rjn-mail-addr)) (gnus-msg-mail rjn-mail-addr rjn-mail-subject) ) ---- Bob Newell Honolulu, Hawai`i * Sent via Ma Gnus 0.12-Emacs 24.3-Linux Mint 17 *