all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Riley <rileyrgdev@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: w3m browser in Emacs
Date: Sun, 21 Jun 2009 20:27:46 +0200	[thread overview]
Message-ID: <h1lu32$jvf$4@news.eternal-september.org> (raw)
In-Reply-To: ud48y7ebm.fsf@verizon.net

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


  reply	other threads:[~2009-06-21 18:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.925.1245377754.2239.help-gnu-emacs@gnu.org>
2009-06-19  3:15 ` w3m browser in Emacs Xah Lee
2009-06-19  8:00   ` Thierry Volpiatto
     [not found]   ` <mailman.938.1245398850.2239.help-gnu-emacs@gnu.org>
2009-06-19 15:59     ` Xah Lee
2009-06-19 22:07       ` jidanni
2009-06-19 21:51   ` Joe Fineman
2009-06-20 13:58     ` Sean Sieger
     [not found]     ` <mailman.995.1245506343.2239.help-gnu-emacs@gnu.org>
2009-06-20 22:03       ` Joe Fineman
2009-06-21 18:27         ` Richard Riley [this message]
2009-06-22 21:49           ` jidanni
2009-06-19  2:15 Will Willis
2009-06-19  4:37 ` prad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='h1lu32$jvf$4@news.eternal-september.org' \
    --to=rileyrgdev@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.