Skip to content

Instantly share code, notes, and snippets.

@lamdor
Created January 2, 2014 16:00
Show Gist options
  • Select an option

  • Save lamdor/8221371 to your computer and use it in GitHub Desktop.

Select an option

Save lamdor/8221371 to your computer and use it in GitHub Desktop.
(defun browse-url-chrome-new-window (url &optional new-window)
(interactive (browse-url-interactive-arg "URL: "))
(do-applescript (format "
tell application \"Google Chrome\"
make new window
activate
set URL of active tab of first window to \"%s\"
end tell
" url)))
(setq browse-url-browser-function 'browse-url-chrome-new-window)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment