Subject: bug#7469: 24.0.50; report-emacs-bug is broken again (on Windows)

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Wed, 24 Nov 2010 00:29:32 +0100

Glenn Morris <[email-masked]> writes:

> Not really, more like by default it doesn't even try on Windows and Macs.
> Check the conditions in which send-mail-function defaults to
> mailclient-send-it. I suggest you copy those conditions to the default
> setting of browse-url-browser-function.

Hm...

(defcustom send-mail-function
  (if (and window-system (memq system-type '(darwin windows-nt)))
      'mailclient-send-it
    'sendmail-send-it)

Oh, so the thing is that `mailclient-send-it' itself uses browse-url to
send the message that has already been composed?

Clicking on a mailto: URL (with the current settings) will give you an
Emacs mail buffer (of some sort; depends on your configuration), and
this seems to be the right thing to do, instead of just calling an
external program to compose your mail.

But actually sending the message is a different matter.
`mailclient-send-it' just calls `browse-url' with a mailto: URL with all
the buffer contents and everything to actually send the message.  So
there seems to be two distinct usages for mailto: wrt browse-url: For
composing, and for sending.

Perhaps the right fix here is to alter `mailclient-send-it' to filter
out any mailto: settings in `browse-url-browser-function' before calling
`browse-url'.  I can do that, if that sounds like the right solution.

Otherwise we'll have to split up `browse-url-browser-function' somehow
for the two different mailto: use cases.

-- 
(domestic pets only, the antidote for overdose, milk.)
  [email-masked] * Lars Magne Ingebrigtsen