Google Region
Somehow, this didn't occur to me until today: it would be really great to select some text and enter a key command to search for that text on google. It may have taken me a long time to realize I wanted something like that, but I've used it today more times than I'd like to admit.
Anyways, here's how to make that happen in emacs, complete with a "control-c g" shortcut.
;; google-region
(defun google-region (&optional flags)
"Google the selected region"
(interactive)
(let ((query (buffer-substring (region-beginning) (region-end))))
(browse-url (concat "http://www.google.com/search?ie=utf-8&oe=utf-8&q=" query))))
;; press control-c g to google the selected region
(global-set-key (kbd "C-c g") 'google-region)
Jul
02
I don’t know if this will last. But it’s pretty cool.
Jun
28
Shifd from emacs
I made a little extension for emacs so that I could shifd things directly from inside the editor. Here's a video of it in action. If you're interested in the extension, let me know. I can make it available.
Emacs and Shifd from Ted Roden on Vimeo.
Flickr Comments