;; I'm-feeling-lucky
(defun eww-im-feeling-lucky (search-term)
"Google I'm feeling lucky."
(interactive (list (smart/read-from-minibuffer "Google Search Term (I'm Feeling Lucky!)")))
;; Keep on burying the current buffer if it turns out to be an eww buffer.
(while (string-match "^eww$\|^eww<[[:digit:]]+>$" (buffer-name))
(bury-buffer))
;; Start a new eww search.
(eww search-term)
(sleep-for 0.1)
;; https://stackoverflow.com/questions/16877882/how-to-access-google-search-im-feeling-lucky-functionality-using-api
(eww-browse-url (concat (eww-current-url) "&btnI")))
;; I'm-feeling-lucky (defun eww-im-feeling-lucky (search-term) "Google I'm feeling lucky." (interactive (list (smart/read-from-minibuffer "Google Search Term (I'm Feeling Lucky!)"))) ;; Keep on burying the current buffer if it turns out to be an eww buffer. (while (string-match "^eww$\|^eww<[[:digit:]]+>$" (buffer-name)) (bury-buffer)) ;; Start a new eww search. (eww search-term) (sleep-for 0.1) ;; https://stackoverflow.com/questions/16877882/how-to-access-google-search-im-feeling-lucky-functionality-using-api (eww-browse-url (concat (eww-current-url) "&btnI")))