[Top][All Lists]

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

Re: Bug in Carbon port: browse-url-default-macosx-browser

From: David Reitter
Subject: Re: Bug in Carbon port: browse-url-default-macosx-browser
Date: Thu, 24 Nov 2005 22:32:19 +0000

On 24 Nov 2005, at 21:03, Stefan Monnier wrote:

1. I installed my customized Emacs on a newly installed OSX 10.4.3, which defines html as an allowable extension in its Info.plist. This could
   have been Smultron or BBEdit or whatever alternatively.
LaunchServices seemed to think that this was supposed to be the default handler for HTML files now - if you opened them, they're not displayed in the browser, but in the editor. When I chose "view buffer contents"
   in html mode, this didn't work as intended.

I'm not sure I understand correctly. Are you saying that installing Emacs causes it to become the default handler for HTML files? If so, it sounds
like a bug to me.

I don't know about Emacs, as I installed Aquamacs Emacs.
But I don't think there is a bug, it's just normal OS X behavior. Either way, it's not the bug I'm trying to fix here.

And that is what browse-url should do when browse-url-browser- function is
set to 'browse-url-default-macosx-browser.  And mind you, it is this
symbol and not something like 'browse-url-default-html-file-handler.

I understand the difference, of course. I'm just trying to understand why it's so important: while it's a valid config, it shouldn't be the default.

Well, I don't know how important it is, but what I do know is that out-of-the-box, HTML previewing may silently fail or start up the wrong program. I've had people complain, and I've seen it happen myself. The reason why it works in most cases is that most people have HTML files linked to some browser by default.

The other case where the browser preview will fail completely is when the user saves an html-mode buffer to a file with a totally different extension, say, .shtml or something with a typo. Then, browse-url will definitely open the wrong application!

The bug is due a flaw in the implementation of browse-url-default- macosx-browser. I already said what the mistake is (using "open" to open a URL of the form file:// ).

What application is associated with HTML is pretty much up to the user. They can set that up in Finder. What the default is is up to LaunchServices AFAIK and not a matter of the application side of things, so that's nothing I'm worrying about right now.

reply via email to

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