[Top][All Lists]

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

Re: Cygwin patches

From: Chong Yidong
Subject: Re: Cygwin patches
Date: Sun, 22 Nov 2009 18:03:08 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Ken Brown <address@hidden> writes:

> Thanks for the suggestion.  My revised patch is attached.  If it looks
> OK, could someone please check it in?

Your patch looks incorrect.  It's not your job to add the "file://"
part; that's done in the rest of the function.  Does this corrected
patch do the right thing on cygwin?

--- browse-url.el.orig  2009-11-21 12:33:40.000000000 -0500
+++ browse-url.el       2009-11-22 07:38:25.890761600 -0500
@@ -699,6 +699,10 @@
 (defun browse-url-file-url (file)
   "Return the URL corresponding to FILE.
 Use variable `browse-url-filename-alist' to map filenames to URLs."
+  (if (eq system-type 'cygwin)
+      (let ((winfile (with-output-to-string
+              (call-process "cygpath" nil standard-output nil "-m" file))))
+       (setq file (substring winfile 0 -1))))
   (let ((coding (and (default-value 'enable-multibyte-characters)
                     (or file-name-coding-system

reply via email to

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