"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:

> Here's a proof-of-concept implementation a little idea of mine for
> effortless information lookup. No hotkeys and stuff needed.
>
> Screenshot: http://img152.imageshack.us/my.php?image=autoinfopk2.jpg
>
> Code: http://www.emacswiki.org/cgi-bin/wiki/autoinfo.el

That's useful.
;; It can display unicode with `w3m-decode-entities-string'.
(defun autoinfo-handle-google-response (status)
  "Handle response returned by Google."
  (message "")
  (let ((response (buffer-string)))
    (funcall autoinfo-show-result-function
             (if (string-match "Definitions of.*?\\(<li>.*?\\)<br>" response)
                 (let ((results (match-string 1 response)))
                   (concat "Definitions by Google:\n"
                   (w3m-decode-entities-string
                         (replace-regexp-in-string "<li>" "\n- " results))))

                 "No definition found"))))


-- 
The opposite of love is not hate;
the opposite of love is solitude.
_______________________________________________
gnu-emacs-sources mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources

Reply via email to