bug-gnu-emacs
[Top][All Lists]
Advanced

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

[Ram Krishnan <address@hidden>] patch for browse-url.el to support remot


From: Dave Love
Subject: [Ram Krishnan <address@hidden>] patch for browse-url.el to support remote control of Safari on Mac OS X
Date: 17 Feb 2003 23:11:50 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

--- 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 ---

reply via email to

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