[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: w3m browser in Emacs
From: |
Richard Riley |
Subject: |
Re: w3m browser in Emacs |
Date: |
Sun, 21 Jun 2009 20:27:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (gnu/linux) |
Joe Fineman <joe_f@verizon.net> writes:
> Sean Sieger <sean.sieger@gmail.com> writes:
>
>> Joe Fineman <joe_f@verizon.net> writes:
>>
>> I have an Emacs command that, when I type C-c g, prompts for a
>> word or phrase & looks it up in Google.
>>
>> May I have it?
>
> (defun google (what)
> "Use google to search for WHAT."
> (interactive "sSearch: ")
> (save-window-excursion
> (delete-other-windows)
> (let ((dir default-directory))
> (w3m-browse-url (concat "http://www.google.com/search?q="
> (w3m-url-encode-string what)))
> (cd dir)
> (recursive-edit))))
>
> (global-set-key "\C-Cg" 'google)
Also see here for using a command to launch a url in the default desktop
browser or in w3m depending on whether you use the prefix (C-u) - also
checks if its an encoded anchor/link in w3m/gnus.
http://richardriley.net/projects/emacs/dotemacs#sec-5
Message not available