From: Bob Newell <bobnewell@bobnewell.net>
To: emacs-orgmode@gnu.org
Subject: Making 'mailto' org links use gnus styles
Date: Wed, 04 Mar 2015 19:34:36 -1000 [thread overview]
Message-ID: <87wq2wf1n7.fsf@bobnewell.net> (raw)
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 *
next reply other threads:[~2015-03-05 5:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 5:34 Bob Newell [this message]
2015-03-05 9:51 ` Making 'mailto' org links use gnus styles Rasmus
2015-03-05 20:00 ` Bob Newell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wq2wf1n7.fsf@bobnewell.net \
--to=bobnewell@bobnewell.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).