--- Begin Message ---
Subject: |
[David Charlap <address@hidden>: MacOS X support in browse-url] |
Date: |
Thu, 27 Feb 2003 01:02:21 +0000 |
------- Start of forwarded message -------
X-Coding-System: undecided-unix
Mail-from: From shamino@mindspring.com Sat Feb 22 16:28:11 2003
Date: Sat, 22 Feb 2003 11:28:09 -0500
From: David Charlap <shamino@mindspring.com>
Organization: Citizens for the abolition of the letter 'Q'
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;
rv:1.3b) Gecko/20030212
X-Accept-Language: en-us, en-gb, en
To: Denis Howe <dbh@doc.ic.ac.uk>, bug-gnu-emacs@gnu.org
Subject: MacOS X support in browse-url
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
I'm running Emacs 21.3.50 on MacOS X version 10.2.4.
By default, the (browse-url) function does not work on MacOS X. It
fails to find any browser on the search path (which makes sense, because
there isn't any), and then fails to load w3 (unless you have it installed).
I wrote this small bit of LISP to get it to call the system's "open"
command which, when given a URL, will launch the system-configured web
browser:
(defun browse-url-default-macosx-browser (url &optional new-window)
"Ask MacOS to load URL using the system-default web browser."
(interactive (browse-url-interactive-arg "URL: "))
(start-process "browser" nil "open" url)
)
(setq browse-url-browser-function 'browse-url-default-macosx-browser)
Please review this function and include it in an appropriate way in the
browse-url.el source file of the next Emacs release.
Thanks in advance.
- -- David
------- End of forwarded message -------
--- End Message ---