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: Fri, 20 Nov 2009 17:26:12 -0500
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

On 11/20/2009 4:50 PM, Chong Yidong wrote:
Ken Brown <address@hidden> writes:

Now that you're preparing for emacs 23.2, could you please apply the
cygwin patches that I submitted last June?

Thanks, I've checked in your changes, except for the following:

--- origsrc/lisp/net/browse-url.el      2009-11-20 11:34:25.000000000 -0500
+++ src/lisp/net/browse-url.el  2009-11-20 11:35:28.000000000 -0500
@@ -693,7 +693,9 @@
          (cond ((not (buffer-modified-p)))
                (browse-url-save-file (save-buffer))
                (t (message "%s modified since last save" file))))))
-  (browse-url (browse-url-file-url file))
+  (if (eq system-type 'cygwin)
+      (shell-command (concat "cygstart " (shell-quote-argument file)))
+    (browse-url (browse-url-file-url file)))
   (run-hooks 'browse-url-of-file-hook))

I still don't understand why cygwin needs special handling when, e.g.,
the other Windows ports don't.  Could you explain?

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.

Ken

Without my patch,





reply via email to

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