From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Newsgroups: gmane.emacs.help Subject: Re: help reading assembly code Date: Thu, 27 Oct 2011 00:10:55 +0200 Message-ID: <87aa8n1k0g.fsf@micropit.couberia.bzh> References: <87pqhm8tev.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319667088 4861 80.91.229.12 (26 Oct 2011 22:11:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 26 Oct 2011 22:11:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 27 00:11:20 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RJBgt-0004Sm-F9 for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Oct 2011 00:11:19 +0200 Original-Received: from localhost ([::1]:59840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJBgs-00025N-Vt for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Oct 2011 18:11:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJBgo-00024K-56 for help-gnu-emacs@gnu.org; Wed, 26 Oct 2011 18:11:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJBgn-0007T6-3R for help-gnu-emacs@gnu.org; Wed, 26 Oct 2011 18:11:14 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:41229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJBgm-0007T0-RG for help-gnu-emacs@gnu.org; Wed, 26 Oct 2011 18:11:13 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RJBgk-0004R3-QD for help-gnu-emacs@gnu.org; Thu, 27 Oct 2011 00:11:10 +0200 Original-Received: from arennes-359-1-206-2.w2-2.abo.wanadoo.fr ([2.2.69.2]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Oct 2011 00:11:10 +0200 Original-Received: from pmlists by arennes-359-1-206-2.w2-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Oct 2011 00:11:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: arennes-359-1-206-2.w2-2.abo.wanadoo.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:BNrnKuXaePuHzAABORCVDGgHziQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82659 Archived-At: On Mon, Oct 24 2011, Andrea Crotti wrote: > For example it would be nice to have some function which shows me a > reference documentation given the operator. Hello, If you know how to build the right url to the documentation of a given operator, you can just replace the google url with the right one in the following code: --8<---------------cut here---------------start------------->8--- (defun pm/region-or-word (prompt) "Read a string from the minibuffer, prompting with PROMPT. If `transient-mark-mode' is non-nil and the mark is active, it defaults to the current region, else to the word at or before point. This function returns a list (string) for use in `interactive'." (list (read-string prompt (or (and transient-mark-mode mark-active (buffer-substring-no-properties (region-beginning) (region-end))) (current-word))))) (defun pm/google (string) "Ask a WWW browser to google string. Prompts for a string, defaulting to the active region or the current word at or before point." (interactive (pm/region-or-word "Google: ")) (browse-url (concat "http://google.com/search?num=100&q=" string))) --8<---------------cut here---------------end--------------->8--- -- Peter