From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: customizing double click Date: Sat, 13 Aug 2005 14:11:50 +0300 Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1123933041 25375 80.91.229.2 (13 Aug 2005 11:37:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 13 Aug 2005 11:37:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 13 13:37:18 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E3uJ8-0005ud-Tr for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Aug 2005 13:36:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3uMO-0003zk-Sr for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Aug 2005 07:39:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E3uIH-00032c-1x for help-gnu-emacs@gnu.org; Sat, 13 Aug 2005 07:35:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E3uHg-0002rI-2P for help-gnu-emacs@gnu.org; Sat, 13 Aug 2005 07:34:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3uHf-0002bP-N8 for help-gnu-emacs@gnu.org; Sat, 13 Aug 2005 07:34:39 -0400 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E3uAN-0000DN-4K for help-gnu-emacs@gnu.org; Sat, 13 Aug 2005 07:27:07 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-83-130-249-180.inter.net.il [83.130.249.180]) by romy.inter.net.il (MOS 3.5.8-GR) with ESMTP id CCL24501 (AUTH halo1); Sat, 13 Aug 2005 14:11:46 +0300 (IDT) Original-To: help-gnu-emacs@gnu.org In-reply-to: (message from Rajneesh Hegde on Fri, 12 Aug 2005 20:11:32 -0400) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28695 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28695 > Date: Fri, 12 Aug 2005 20:11:32 -0400 > From: Rajneesh Hegde > > Then I bind as follows: > (define-key LaTeX-mode-map [double-down-mouse-1] 'my-LaTeX-forward-search) > > The problem is that on double-clicking on a word-constituent > character, the double-down event runs the above function (which, as > expected, does nothing) , but the subsequent double-click event > doesn't have the usual effect of selecting the word. > > On the other hand, if I bind my function to [double-mouse-1], it > doesn't even get invoked, although the binding is successful. What am > I missing? Thanks, Does the following excerpt from the ELisp manual help you understand the issue? Before the double-click or double-drag event, Emacs generates a "double-down" event when the user presses the button down for the second time. Its event type contains `double-down' instead of just `down'. If a double-down event has no binding, Emacs looks for an alternate binding as if the event were an ordinary button-down event. If it finds no binding that way either, the double-down event is ignored. To summarize, when you click a button and then press it again right away, Emacs generates a down event and a click event for the first click, a double-down event when you press the button again, and finally either a double-click or a double-drag event.