--- Begin Message ---
Subject: |
patch for browse-url.el to support remote control of Safari on Mac OS X |
Date: |
Sat, 15 Feb 2003 10:50:18 -0800 |
Hello,
I'm not sure if you're the right person to send this to; I found your
name listed in browse-url.el and I figured you'd know how to get this
integrated.
Anyway here's a quick way to get remote control of a a Safari browser
on Mac OS X from browse-url. I figured others might find it useful as
well.
----
(defun browse-url-mac-safari (url &optional new-window)
(interactive)
(let ((rc (concat "tell application \"Safari\"\n"
"activate\n"
(if new-window
"open location \"%s\"\n"
"set URL of the first document to \"%s\"\n")
"end tell\n")))
(do-applescript
(format rc url))))
----
It should be pretty trivial to modify this to apply to other browsers
as well.
Regards,
-ram
--- End Message ---