From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: Patch to change mouse binding for html view in gnus Date: Thu, 12 Jul 2007 10:05:50 -0600 Message-ID: References: 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 1184257466 10593 80.91.229.12 (12 Jul 2007 16:24:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Jul 2007 16:24:26 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org To: Katsumi Yamaoka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 12 18:24:25 2007 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 1I91Sn-0007Va-H3 for ged-emacs-devel@m.gmane.org; Thu, 12 Jul 2007 18:24:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I91Sm-00054x-ND for ged-emacs-devel@m.gmane.org; Thu, 12 Jul 2007 12:24:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I91Rc-0004OZ-GQ for emacs-devel@gnu.org; Thu, 12 Jul 2007 12:23:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I91Rb-0004Ni-BK for emacs-devel@gnu.org; Thu, 12 Jul 2007 12:23:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I91Ra-0004Nc-Vz for emacs-devel@gnu.org; Thu, 12 Jul 2007 12:23:07 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I91Ra-0002wT-Fr for emacs-devel@gnu.org; Thu, 12 Jul 2007 12:23:06 -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 l6CGMxmj011190; Thu, 12 Jul 2007 12:23:00 -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 l6CGMxYa032513; Thu, 12 Jul 2007 12:22:59 -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 l6CGMvBo030857; Thu, 12 Jul 2007 12:22:58 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 3D985379892; Thu, 12 Jul 2007 10:05:50 -0600 (MDT) X-Attribution: Tom In-Reply-To: (Katsumi Yamaoka's message of "Wed\, 04 Jul 2007 08\:18\:35 +0900") 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:74691 gmane.emacs.gnus.general:64929 Archived-At: >>>>> "Katsumi" == Katsumi Yamaoka writes: Katsumi> For this reason, I recommend using the function form Katsumi> (lambda (url) (browse-url url) t) Katsumi> rather than just using `browse-url'. I tried: (setq w3m-goto-article-function (lambda (url) (browse-url url) t)) but this fails: fboundp((lambda (url) (browse-url url) t)) w3m-safe-view-this-url() w3m-mouse-safe-view-this-url((mouse-2 (# 436 (111 . 209) -81415166 nil 436 (18 . 16) nil (3 . 1) (6 . 13)))) call-interactively(w3m-mouse-safe-view-this-url) The reason is this code in w3m-safe-view-this-url: (url (or (when (fboundp w3m-goto-article-function) (funcall w3m-goto-article-function url)) So to make this work I had to make a new defun and then setq w3m-goto-article-function to that. Using an anonymous function won't work, due to the fboundp. I didn't look to see whether your patch here fixed this problem or not, I just thought I'd post in case anybody else is trying to set things up this way. >> If you do all your browsing in Emacs then you probably already have >> browse-url-browser-function set as you like... Katsumi> I leave all those as the default and have no problem (Firefox Katsumi> happens to be used by default). I don't always necessarily use Katsumi> emacs-w3m. I use Firefox when purchasing something, manipulating Katsumi> my bank account... ;-) Ok. I suppose this response means you are not swayed by my argument that users should only have to customize in a single place. Tom