Edited at

emacsの選択範囲をFireFoxでgoogle検索

More than 5 years have passed since last update.

選択範囲を検索キーワードとして、

そのままfirefoxでgoogle検索結果を開きたかったので作成。


init.el

(defun search-region-by-google ()

"search by google"
(interactive)
(if mark-active
(shell-command-on-region (region-beginning) (region-end) "read WORD ; firefox \"http://www.google.com/search?q=$WORD\"")))
; C-c sに割り当て
(global-set-key "\C-cs" 'search-region-by-google)