emacs-devel
[Top][All Lists]
Advanced

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

Re: mailclient-send-it usage of browse-url


From: christian.lynbech
Subject: Re: mailclient-send-it usage of browse-url
Date: Wed, 14 Apr 2010 15:07:55 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.95 (gnu/linux)

>>>>> "Jeff" == Jeff Clough <address@hidden> writes:

Jeff> The problem is that there is not one universal way to ask an operating
Jeff> system "How do I send a mail message?" and get an honest answer.  Under
Jeff> Unix, you have tools like sendmail that are virtually guaranteed to be
Jeff> there.  Under Windows, the Mac and other systems, not so much.

I do not about Windows, but on Mac you can (I believe) rely on the
*presence* of sendmail just as much as on other UNIX like systems.

However, it is true that there is higher risk of meeting a
mis-configured sendmail installation on a Mac because this is not
directly the default route out of the box but I believe that to be more
of an historical accident. Sendmail is however a very flexible tool and
it is probably mostly a case of emacs taking more responsability for
setting up the outgoing mail and relying less on the system end
environment defaults (cf. `mail-specify-envelope-from').

UNIX systems have traditionally a well-configured sendmail since this is
the expectation of many things and sendmail used to be the *only* way
out, however this is not always the case and probably will be less so in
the future as more and more users are using graphical clients such as
thunderbird where you configure mail sending directly. On my work PC,
which also runs Linux, I needed to switch emacs to using smtpmail since
local sendmail was not supported nor maintained by IT.

Jeff> A clever way around this is to fire up what Emacs thinks is the system
Jeff> browser and feed it a mailto: link.  It's a hack, but given the
Jeff> alternatives it's probably the right thing.  browse-url should work out
Jeff> of the box on most systems.

I am not contesting the use of mailto:, merely the use of browse-url.

First of all you somehow need to set up browse-url. If it works out of
the box, it only does so because somebody took the time to figure what
the default should be on a Mac. In fact, looking at the default setup
for browse-url on emacs23 , it does not seem to be working out of the
box on a Mac. "browse-url.el" will search for a number of programs such
as firefox or konqueror but not Safari (which is all you can rely on on
a Mac) and if you do not have any of the browsers in your path (perhaps
because you use some desktop environment menu rather than setting up
path), it fails. If you are using emacs-w3m which I think is a quite
reasonable thing to do, the mailto: hack fails.

Secondly, browse-url is a user command and while few people may be as
multi-frame-frenzied as me, there is none the less a significant risk
that the user has tampered with the command.

Thirdly, we are already doing system specific things. Using mailclient
is done specifically for darwin and windows, otherwise the default is
sendmail. If we know we are on darwin, we might as well default to using
the Safari browser, since that has the same prominence on a Mac as
sendmail has on Linux, or even use the "open" command which is supposed
to be able to match file types to applications and then leave the
matching of functionality to application to the system.

My point is that using `browse-url' is a brittle foundation for an
otherwise clever hack. 

In the very least one should consider making the browsing function used
for mailclient configurable and then default to `browse-url-default-browser',
since we are anyway wanting to invoke the *system behaviour* for mailto:.


------------------------+-----------------------------------------------------
Christian Lynbech       | christian #\@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - address@hidden (Michael A. Petonic)




reply via email to

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