Last active
December 17, 2015 11:49
-
-
Save youpy/5605265 to your computer and use it in GitHub Desktop.
Expand abbreviations from the content of active tab on Google Chrome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; dabbrev-expand | |
;; chrome のタブから補完 | |
;; require clome-cli (https://github.com/prasmussen/chrome-cli) | |
(defadvice dabbrev-expand (around dabbrev-expand-chrome) | |
"Expand abbreviations from the content of active tab on Google Chrome" | |
(setq buf (get-buffer-create "*chrome-active-tab-content*")) | |
(with-current-buffer buf | |
(erase-buffer) | |
(call-process "chrome-cli" nil buf nil "execute" "document.body.innerText")) | |
ad-do-it) | |
(ad-activate-regexp "dabbrev-expand-chrome") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment