From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: shortest amount of keystrokes to see URL in an external browser Date: Sat, 25 Jun 2011 01:36:45 +0200 Organization: aich tea tea pea dicky riley dot net Message-ID: References: <874o3eakip.fsf@jidanni.org> Reply-To: help-gnu-emacs@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1308958722 1303 80.91.229.12 (24 Jun 2011 23:38:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2011 23:38:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 25 01:38:38 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 1QaFxN-0003ly-NR for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Jun 2011 01:38:37 +0200 Original-Received: from localhost ([::1]:41094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaFxM-0004Sx-Bn for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jun 2011 19:38:36 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaFvT-0004SY-4z for help-gnu-emacs@gnu.org; Fri, 24 Jun 2011 19:36:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaFvR-0000PK-MS for help-gnu-emacs@gnu.org; Fri, 24 Jun 2011 19:36:38 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:32853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaFvR-0000P9-A6 for help-gnu-emacs@gnu.org; Fri, 24 Jun 2011 19:36:37 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QaFvO-00034M-Sc for help-gnu-emacs@gnu.org; Sat, 25 Jun 2011 01:36:34 +0200 Original-Received: from 85.183.18.158 ([85.183.18.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Jun 2011 01:36:34 +0200 Original-Received: from rileyrg by 85.183.18.158 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Jun 2011 01:36:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 27 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 85.183.18.158 Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:ckDum5m39ClNhYPQMdmxr0AQ46A= 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:81431 Archived-At: jidanni@jidanni.org writes: > "use and external browser" -> > "use an external browser" > dunno if this is any good to you: ,---- | (defun rgr/browse (url) | "If prefix is specified use the system default browser else use the configured emacs one" | (if current-prefix-arg | (if url | (w3m-browse-url url) | (call-interactively 'browse-url)) | (when url (browse-url-generic url)) | )) | | (defun rgr/browse-url (&optional url) | "browse the url passed in" | (interactive) | (setq url (or url (w3m-url-valid (w3m-anchor)) (browse-url-url-at-point) (region-or-word-at-point))) | (setq url (read-string (format "Url \"%s\" :" url) url nil url)) | (rgr/browse url)) | | (global-set-key (kbd "") 'rgr/browse-url) `----