[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r107890: Adapt browse-url.el to i
From: |
Katsumi Yamaoka |
Subject: |
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r107890: Adapt browse-url.el to improvements in Cygwin's cygstart utility. |
Date: |
Mon, 16 Apr 2012 16:28:04 +0900 |
User-agent: |
Gnus/5.130004 (真 Gnus v0.4) Emacs/24.1.50 (i686-pc-cygwin) |
Ken Brown wrote:
> ------------------------------------------------------------
> revno: 107890
> committer: Ken Brown <address@hidden>
> branch nick: trunk
> timestamp: Fri 2012-04-13 11:15:42 -0400
> message:
> Adapt browse-url.el to improvements in Cygwin's cygstart utility.
> * lisp/net/browse-url.el (browse-url-file-url): Remove Cygwin hack;
> this is no longer needed now that cygstart understands file://
> URLs.
> (browse-url-filename-alist): For the same reason, don't modify
> file:// URLs on Cygwin.
> modified:
> lisp/ChangeLog
> lisp/net/browse-url.el
Hi,
This is neither a bug report nor a complaint. I may be worrying
unduly, but...
By the change, a way for Cygwin users to view file:// urls by
using a non-default browser was lost, since cygstart only runs
the default Windows browser. I like firefox but some web pages
support only IE, so mainly for the office work I don't set firefox
as the default browser (similarly I use Gnus for personal mails
but use Outlook for the office work). My Emacs configuration:
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program
"/cygdrive/c/Program Files/Mozilla Firefox/firefox.exe")
Ok, the following advice helps:
(defadvice browse-url-file-url (after convert-filename-for-cygwin activate)
"Convert filename to the one that Cygwin understands."
(when (string-match "\\`file:///" ad-return-value)
(setq ad-return-value
(concat (substring ad-return-value 0 (match-end 0))
(substring (with-output-to-string
(call-process "cygpath" nil
standard-output
nil "-m"
(substring ad-return-value
(1- (match-end 0)))))
0 -1)))))
FYI, Gnus still uses cygpath for converting link file names in
a html file that `gnus-article-browse-html-parts' generates.
Regards,