emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Making 'mailto' org links use gnus styles


From: Bob Newell
Subject: [O] Making 'mailto' org links use gnus styles
Date: Wed, 04 Mar 2015 19:34:36 -1000
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux)

Aloha kakou,

I have some 'mailto' links in an org file in the expected form:

[[mailto:address@hidden

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 *



reply via email to

[Prev in Thread] Current Thread [Next in Thread]