From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: mouse-1-click-follows-link and mime messages Date: Tue, 07 Feb 2006 19:42:14 -0500 Message-ID: <87oe1iwujd.fsf@stupidchicken.com> References: <87acd48bhi.fsf@stupidchicken.com> <87acd3mx3u.fsf@pacem.orebokech.com> <877j86929j.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139360108 6174 80.91.229.2 (8 Feb 2006 00:55:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Feb 2006 00:55:08 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 08 01:55:03 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F6dbj-0001DU-0U for ged-emacs-devel@m.gmane.org; Wed, 08 Feb 2006 01:54:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F6dbi-00058J-2k for ged-emacs-devel@m.gmane.org; Tue, 07 Feb 2006 19:54:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F6dO7-0000d2-FG for emacs-devel@gnu.org; Tue, 07 Feb 2006 19:40:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F6dO2-0000cb-Fc for emacs-devel@gnu.org; Tue, 07 Feb 2006 19:40:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F6dO1-0000cV-1v for emacs-devel@gnu.org; Tue, 07 Feb 2006 19:40:45 -0500 Original-Received: from [18.19.6.82] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F6dRD-0002Wh-HY for emacs-devel@gnu.org; Tue, 07 Feb 2006 19:44:03 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id 78B30120909; Tue, 7 Feb 2006 19:42:14 -0500 (EST) Original-To: emacs-devel@gnu.org In-Reply-To: <877j86929j.fsf@stupidchicken.com> (Chong Yidong's message of "Tue, 07 Feb 2006 18:29:12 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:50177 Archived-At: Chong Yidong writes: > Romain Francoise writes: > >>> With point in the Gnus article window, mouse-1 on links in the article >>> (e.g., mime attachments or URLs) performs the correct action (i.e., >>> opening the attachment or following the URL). >> >>> However, with point is in the Gnus summary window, mouse-1 on the same >>> links does nothing. Mouse-2 works fine. >> >> It's a bug in Emacs due to this change: >> >> 2005-12-27 Richard M. Stallman >> >> * mouse.el (mouse-drag-region-1): When remapping mouse-1 to >> mouse-2, go back to previously selected window, so it's selected >> when mouse-2 command runs. > > Looks like this affects all `link' widgets. For instance, clicking on > the links in the Customize buffer does not work if another window is > selected. I debugged this some more. One way to fix it (without reverting RMS's change) is to change the :follow-link property of the `link' widget: *** /home/cyd/emacs/lisp/wid-edit.el.~1.163.~ 2006-02-07 18:22:31.000000000 -0500 --- /home/cyd/emacs/lisp/wid-edit.el 2006-02-07 19:32:34.000000000 -0500 *************** *** 1754,1760 **** "An embedded link." :button-prefix 'widget-link-prefix :button-suffix 'widget-link-suffix ! :follow-link "\C-m" :help-echo "Follow the link." :format "%[%t%]") --- 1754,1760 ---- "An embedded link." :button-prefix 'widget-link-prefix :button-suffix 'widget-link-suffix ! :follow-link 'widget-button-click :help-echo "Follow the link." :format "%[%t%]") However, another strange bug surfaces if you do this. Do M-x customize in one window, and select another window. Click mouse-1 on "Custom file" in the Customize buffer. With the above patch, this works: the Info file is opened in that window, as expected. Now, hover the mouse over one of the links in the header line. An error is signalled: Debugger entered--Lisp error: (args-out-of-range 1875 1875) get-char-property(1875 follow-link) mouse-on-link-p((# header-line (118 . 13) 0 (#("Next: Face Customization, Prev: Changing a Variable, Up: Easy Customization" 0 6 ... 6 24 ... 24 27 nil 27 33 ... 33 52 ... 52 55 nil 55 59 ... 59 77 ...) . 16) 1875 (16 . -1) nil (6 . 13) (7 . 14))) mouse-fixup-help-message(#("mouse-2: Go to node Face Customization" 0 20 nil 20 38 (font-lock-face info-header-xref mouse-face highlight))) read-event() byte-code("...") (track-mouse (byte-code "...")) (lambda nil (track-mouse (byte-code "...") mouse-drag-track((down-mouse-1 (# 315 (60 . 82) 200741335 nil 315 (8 . 5) nil (4 . 12) (7 . 14))) t) mouse-drag-region((down-mouse-1 (# 315 (60 . 82) 200741335 nil 315 (8 . 5) nil (4 . 12) (7 . 14)))) call-interactively(mouse-drag-region) Any ideas?