From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#4951: 23.1.50; browse-url-default-windows-browser bug + patch Date: Wed, 18 Nov 2009 14:00:13 +0100 Message-ID: References: <4B038C0D.8020707@f2s.com> Reply-To: Lennart Borgman , 4951@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1258550935 22822 80.91.229.12 (18 Nov 2009 13:28:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Nov 2009 13:28:55 +0000 (UTC) Cc: 4951@emacsbugs.donarmstrong.com To: Jason Rumney Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 18 14:28:48 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NAkaU-0004Ue-Ai for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Nov 2009 14:28:46 +0100 Original-Received: from localhost ([127.0.0.1]:39432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAkaT-00051d-Nw for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Nov 2009 08:28:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAkZG-0003vX-LY for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2009 08:27:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAkZB-0003to-2P for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2009 08:27:29 -0500 Original-Received: from [199.232.76.173] (port=51379 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAkZA-0003tl-UQ for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2009 08:27:24 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34916) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NAkZA-00009G-EQ for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2009 08:27:24 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAIDRKv4018602; Wed, 18 Nov 2009 05:27:21 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAIDA5FT017121; Wed, 18 Nov 2009 05:10:05 -0800 Resent-Date: Wed, 18 Nov 2009 05:10:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Lennart Borgman Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 18 Nov 2009 13:10:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4951 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4951-submit@emacsbugs.donarmstrong.com id=B4951.125854924015793 (code B ref 4951); Wed, 18 Nov 2009 13:10:05 +0000 Original-Received: (at 4951) by emacsbugs.donarmstrong.com; 18 Nov 2009 13:00:40 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-gx0-f226.google.com (mail-gx0-f226.google.com [209.85.217.226]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAID0c10015790 for <4951@emacsbugs.donarmstrong.com>; Wed, 18 Nov 2009 05:00:39 -0800 Original-Received: by gxk26 with SMTP id 26so966832gxk.1 for <4951@emacsbugs.donarmstrong.com>; Wed, 18 Nov 2009 05:00:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=9PZdCdTu30SXbTYoQYCxk8u+5gt4HlQVs+UXGsCqvaQ=; b=GyMR4fWjZvKEibHDqRDi9E6PcPv9+uGAIStYlMPtq916NQld8YDN+IUBEAGkW2IuRr 4cRH6dha/a5qyux9f2XNXERCB0blwhErVlAE39tWcwAtKvXAC+Jt7Tg/ZTfoNaC+jC17 uAOxyrOJW8GZ51JghmgVmIunpEU3b37vG6Yjw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=NSa+BV8Qd9z3BrUf3bF41J4rFeghfOcrnq4G97F+UuLDP42B7+slpZYHejclIVRNC5 eBR2kmgb1k2JaPejyzj6rAfRV4Y7GIkeKwq/eqENf2RBxyKdF9zxCR+D7IMj36uYNkGm CyKl8uCyshxliiDnvUh4D4y53C3Xn+UQKfi/k= Original-Received: by 10.101.189.3 with SMTP id r3mr2250999anp.105.1258549233104; Wed, 18 Nov 2009 05:00:33 -0800 (PST) In-Reply-To: <4B038C0D.8020707@f2s.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 18 Nov 2009 08:27:29 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32685 Archived-At: On Wed, Nov 18, 2009 at 6:54 AM, Jason Rumney wrote: > Lennart Borgman wrote: >> >> On Wed, Nov 18, 2009 at 4:35 AM, Stefan Monnier >> wrote: >> >>>> >>>> browse-url-default-windows-browser does not work any longer. =C2=A0I a= m >>>> unsure when it stopped working, but on at least Windows XP the >>>> attached patch seems necessary. =C2=A0Could we please apply this as so= on as >>>> possible so it will get tested? >>>> >>> >>> Could you explain why it's necessary? =C2=A0I mean I understand you say= that >>> the current doesn't work, but I'd like to understand why it doesn't wor= k. >>> >> >> No, I do not understand why it is necessary ... ;-) >> >> There are two changes: >> >> 1) file: =3D> file:/// >> >> This was discussed some time ago (a yr or two?) and it looks like this >> is a more correct syntax for the file URL. >> > > Is it actually needed, or is this purely an aesthetic thing? The RFCs are > not clear whether either is more correct, as the file: scheme is not > explicitly defined, and not all URL schemes require a server to be specif= ied > before the file path. As far as I can tell, either option is accepted by > Windows itself, but if the association passes the URL intact rather than > after converting to a file argument by Windows, then there may be > applications that accept one but not the other. > > IIRC the main reason for using file: rather than file:/// was that if the > same code is used on all platforms, then the former works, while the latt= er > does not (too many / when combined with posix paths). =C2=A0But as this i= s now in > a (windows-nt msdos cygwin) conditional, that is not really important, an= d > we should use what works. This is perhaps not needed, but it seems more consistent and I therefore thinks that there is a better chance that this works. (I have been using this very long, but I can't remember any more why I switched.) >> 2) Changing the verb to w32-shell-execute (ShellExecute) from "open" >> to nil is for some reason I do not know necessary. The answer to why >> hides deep within the w32 registry and maybe some knowledgeable >> persons at MS... It might be a mismatch of some kind, I don't know. I >> believe the verbs are not that well thought out and used all the time. >> Probably the registry entry has taken over from the program code >> (which give users and other programs better possibilities). >> > > It is likely a misconfiguration on your system. "open" is the standard ve= rb > for opening files, and should avoid the security problems associated with > using nil for executable file types where the system's default action is > something other than "open". You might be right. I thought that file:/// was special and would always be opened in a web browser, but that is maybe not at all true. I do not know how Windows handles this. Are there any special w32 registry entries for file: that you are aware of? Just looking at Explorer under Tools - Folder Options and then File Types it looks like the file:/// URL is not handled special since there is no entry there for this URL type, but that is not correct. It is handled specially. Here are some tests I have made: (w32-shell-execute "open" "c:/some/file.html") ;; OK (w32-shell-execute nil "file:c:/some/file.html") ;; OK (w32-shell-execute nil "file:///c:/some/file.html") ;; OK (w32-shell-execute "open" "file:///c:/some/file.html") ;; Doesn't work (w32-shell-execute "open" "file:c:/some/file.html") ;; Doesn't work