emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Making 'mailto' org links use gnus styles
@ 2015-03-05  5:34 Bob Newell
  2015-03-05  9:51 ` Rasmus
  0 siblings, 1 reply; 3+ messages in thread
From: Bob Newell @ 2015-03-05  5:34 UTC (permalink / raw)
  To: emacs-orgmode

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 *

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

* Re: Making 'mailto' org links use gnus styles
  2015-03-05  5:34 Making 'mailto' org links use gnus styles Bob Newell
@ 2015-03-05  9:51 ` Rasmus
  2015-03-05 20:00   ` Bob Newell
  0 siblings, 1 reply; 3+ messages in thread
From: Rasmus @ 2015-03-05  9:51 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Bob Newell <bobnewell@bobnewell.net> writes:

> It just seems like there should be an easier/better way. Haved I failed
> to find something simple?

Have you configured mail-user-agent?

—Rasmus

-- 
Not everything that goes around comes back around, you know

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

* Re: Making 'mailto' org links use gnus styles
  2015-03-05  9:51 ` Rasmus
@ 2015-03-05 20:00   ` Bob Newell
  0 siblings, 0 replies; 3+ messages in thread
From: Bob Newell @ 2015-03-05 20:00 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

>
> Have you configured mail-user-agent?

mail-user-agent was set to message-user-agent. Changing it to
gnus-user-agent solved the problem within org-mode, so for the purposes
of this mailing list, your idea is excellent. Thanks!

-- 
Bob Newell
Honolulu, Hawai`i
* Sent via Ma Gnus 0.12-Emacs 24.3-Linux Mint 17 *

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

end of thread, other threads:[~2015-03-05 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05  5:34 Making 'mailto' org links use gnus styles Bob Newell
2015-03-05  9:51 ` Rasmus
2015-03-05 20:00   ` Bob Newell

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).