emacs-devel
[Top][All Lists]
Advanced

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

Re: Cygwin patches


From: Ken Brown
Subject: Re: Cygwin patches
Date: Sat, 21 Nov 2009 07:12:04 -0500
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

On 11/21/2009 3:12 AM, Eli Zaretskii wrote:
Date: Fri, 20 Nov 2009 17:26:12 -0500
From: Ken Brown <address@hidden>
Cc: Emacs <address@hidden>

Cygwin provides a linux-like environment for Windows, but it doesn't provide its own web browser. So it's natural for a cygwin user to just want to use the default Windows browser. And cygwin provides the "cygstart" command precisely to make this sort of thing easy. Thus

   cygstart /unix/style/path/to/file.html

will open file.html in the default Windows browser. Cygstart takes care of converting the path to a form that Windows understands. Without my patch, (browse-url-file-url file) returns a URL that doesn't get correctly converted.

I think that the right fix would be in browse-url-file-url, so that it
does return a correctly converted URL.  Using cygstart directly in
browse-url-of-file deviates too much from what other platforms do --
they all invoke the browser in browse-url.  Such a deviation could
mean maintenance headaches in the future.  For example, browse-url
takes care of setting the environment for the process being invoked,
while your patch short-circuits that for Cygwin.

OK, that makes sense. I'll figure out how to patch browse-url-file-url instead. But it will still mean cygwin-specific code in that function. Is that acceptable?

[BTW, Lennart's suggestion that the cygwin-specific code should be moved to browse-url doesn't work. In fact, browse-url works fine on cygwin as is; it just needs to be given a good URL.]

Ken





reply via email to

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