From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: mailclient-send-it usage of browse-url Date: Wed, 14 Apr 2010 15:07:55 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: dough.gmane.org 1271250498 19311 80.91.229.12 (14 Apr 2010 13:08:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Apr 2010 13:08:18 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: Jeff Clough Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 14 15:08:15 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O22KF-0001Fz-0G for ged-emacs-devel@m.gmane.org; Wed, 14 Apr 2010 15:08:15 +0200 Original-Received: from localhost ([127.0.0.1]:37829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O22KE-00041T-Dm for ged-emacs-devel@m.gmane.org; Wed, 14 Apr 2010 09:08:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O22K8-0003zS-NF for emacs-devel@gnu.org; Wed, 14 Apr 2010 09:08:08 -0400 Original-Received: from [140.186.70.92] (port=42018 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O22K3-0003tL-Hq for emacs-devel@gnu.org; Wed, 14 Apr 2010 09:08:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O22K1-0007Zd-C6 for emacs-devel@gnu.org; Wed, 14 Apr 2010 09:08:03 -0400 Original-Received: from ebb05.tieto.com ([131.207.168.36]:50721) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O22K1-0007ZF-43 for emacs-devel@gnu.org; Wed, 14 Apr 2010 09:08:01 -0400 X-AuditID: 83cfa824-b7cebae00000797f-72-4bc5be2e011a Original-Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb05.tieto.com (SMTP Mailer) with SMTP id C1.C7.31103.E2EB5CB4; Wed, 14 Apr 2010 16:07:59 +0300 (EEST) Original-Received: from uw000509 (10.48.99.3) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.2.176.0; Wed, 14 Apr 2010 16:07:58 +0300 In-Reply-To: (Jeff Clough's message of "Wed, 14 Apr 2010 14:41:34 +0300") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.95 (gnu/linux) X-Brightmail-Tracker: AAAAARO1VaY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123629 Archived-At: >>>>> "Jeff" == Jeff Clough 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. - petonic@hal.com (Michael A. Petonic)