Skip to content

Instantly share code, notes, and snippets.

@satyr
Created September 12, 2009 23:51
Show Gist options
  • Select an option

  • Save satyr/186012 to your computer and use it in GitHub Desktop.

Select an option

Save satyr/186012 to your computer and use it in GitHub Desktop.
(defun moz-exec (code)
(with-open-stream (mozrepl (connect "localhost" 4242))
(read-line mozrepl nil)
(princ code mozrepl)
(while (read-char-no-hang mozrepl nil))))
(defun run-ubiquity (in) (interactive "sUbiquity: ")
(moz-exec (concat "with(opener||self){minimize();restore();"
(format nil "gUbiquity.preview('~{\\u~4,'0X~}');"
(map 'list 'char-unicode in))
"focus()}\n")))
(global-set-key #\C-\, 'run-ubiquity)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment