From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Patch to change mouse binding for html view in gnus Date: Sun, 01 Jul 2007 14:42:29 -0600 Message-ID: Reply-To: tromey@redhat.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183323760 10310 80.91.229.12 (1 Jul 2007 21:02:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2007 21:02:40 +0000 (UTC) To: Emacs Hackers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 01 23:02:38 2007 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I56Z2-0005iJ-B0 for ged-emacs-devel@m.gmane.org; Sun, 01 Jul 2007 23:02:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I56Z2-00049D-1P for ged-emacs-devel@m.gmane.org; Sun, 01 Jul 2007 17:02:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I56Yy-00045R-Is for emacs-devel@gnu.org; Sun, 01 Jul 2007 17:02:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I56Yw-00044r-3t for emacs-devel@gnu.org; Sun, 01 Jul 2007 17:02:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I56Yv-00044o-Up for emacs-devel@gnu.org; Sun, 01 Jul 2007 17:02:29 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I56Yv-0000lU-DO for emacs-devel@gnu.org; Sun, 01 Jul 2007 17:02:29 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l61L2SSZ021229 for ; Sun, 1 Jul 2007 17:02:28 -0400 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l61L2Sw9027136 for ; Sun, 1 Jul 2007 17:02:28 -0400 Original-Received: from opsy.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l61L2R5W002799; Sun, 1 Jul 2007 17:02:28 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 97E493780F6; Sun, 1 Jul 2007 14:42:29 -0600 (MDT) X-Attribution: Tom User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74153 Archived-At: I have w3m installed, and so when Gnus sees an HTML message it is displayed via w3m. This is quite nice. However, if I click on a link in an HTML message rendered this way, the target is displayed using w3m. I generally don't want this; I only use w3m in Emacs for specialized things and in other cases I'd rather use my external web browser. This patch changes Gnus to use browse-url rather than w3m for links in buffers it renders. Tom 2007-07-01 Tom Tromey * mm-view.el (mm-inline-text-html-render-with-w3m): Locally set w3m-goto-article-function. cvs diff: Diffing . Index: mm-view.el =================================================================== RCS file: /sources/emacs/emacs/lisp/gnus/mm-view.el,v retrieving revision 1.29 diff -u -r1.29 mm-view.el --- mm-view.el 19 Apr 2007 12:08:53 -0000 1.29 +++ mm-view.el 1 Jul 2007 20:58:45 -0000 @@ -252,6 +252,7 @@ (let ((w3m-safe-url-regexp mm-w3m-safe-url-regexp) w3m-force-redisplay) (w3m-region (point-min) (point-max) nil charset)) + (set (make-local-variable 'w3m-goto-article-function) #'browse-url) (when (and mm-inline-text-html-with-w3m-keymap (boundp 'w3m-minor-mode-map) w3m-minor-mode-map)