From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#7802: bug #7802: 24.0.50; Extraneous `mouse-3' event when do `double-mouse-3' Date: Wed, 12 Jan 2011 23:15:22 -0800 Message-ID: <701ADC457873416A99F98E84AF89B0EB@us.oracle.com> References: <6AF23E536D254FC88C35DA0BEC775C1A@us.oracle.com><7EB632A3268149CA89DA1D58C8046A01@us.oracle.com><9496EDBB00F3470E9417340D3CDBA5E1@us.oracle.com><87tyhje666.fsf@gnu.org><0BC7B2E648C8499CAC13F1D3D3A7A72E@us.oracle.com><87oc7qeong.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294903651 2433 80.91.229.12 (13 Jan 2011 07:27:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 13 Jan 2011 07:27:31 +0000 (UTC) Cc: 7802@debbugs.gnu.org To: "'Chong Yidong'" , "'Jason Rumney'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 13 08:27:26 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PdHag-0005W1-6I for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jan 2011 08:27:26 +0100 Original-Received: from localhost ([127.0.0.1]:38316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdHaf-000192-Je for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jan 2011 02:27:25 -0500 Original-Received: from [140.186.70.92] (port=48939 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdHXh-0000Cc-Cf for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 02:24:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdHXf-00006g-4F for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 02:24:21 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdHXf-00006b-2b for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 02:24:19 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PdHJr-0004Hk-GV; Thu, 13 Jan 2011 02:10:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jan 2011 07:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7802 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7802-submit@debbugs.gnu.org id=B7802.129490258016439 (code B ref 7802); Thu, 13 Jan 2011 07:10:03 +0000 Original-Received: (at 7802) by debbugs.gnu.org; 13 Jan 2011 07:09:40 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdHJU-0004H6-3x for submit@debbugs.gnu.org; Thu, 13 Jan 2011 02:09:40 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdHJQ-0004Gq-6e for 7802@debbugs.gnu.org; Thu, 13 Jan 2011 02:09:38 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p0D7H4Om002918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Jan 2011 07:17:06 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p0D5lINP023603; Thu, 13 Jan 2011 07:17:03 GMT Original-Received: from abhmt007.oracle.com by acsmt355.oracle.com with ESMTP id 921489351294902924; Wed, 12 Jan 2011 23:15:24 -0800 Original-Received: from dradamslap1 (/10.159.242.207) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 12 Jan 2011 23:15:24 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Acuy47JdWB49pO9TQhuQy3QG+nsl+AACIqZA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 13 Jan 2011 02:10:03 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43327 Archived-At: > It's cleaner to let the calling Elisp code worry about this. > That is to say, the caller can bind the first click to a command > that starts up a timer to execute the "single click" action after > a short period, and bind the double click to a command that > cancels that timer. > > I vaguely recall that we used to try to separate single clicks from > double-click, and the resulting user experience was rather > poor. So it should not be the default, but rather anyone who > cares about this issue can do as described above. Oh, sure, that's easy to say. But not feasible in practice - might as well rewrite everything, not to mention having user code implement the distinction of single-click from double-click each time. If you want to understand the context, it is simple. The code is here: http://www.emacswiki.org/emacs/download/mouse3.el The case in question is explained in the Commentary's `Note:'. It is the case of setting `mouse3-second-click-default-command' to `mouse3-kill/delete-region' and `mouse3-double-click-command' to `mouse3-region-popup-menu', that is, opposite to their default values in the file. You can also try the code to understand what is involved - very simple and nothing else to load. The default values do what I suggested in the 11/30 emacs-devel thread "Variable behavior for `mouse-3' second click at same spot" (which evoked zero response). That was a followup to the 11/05 thread "`mouse-save-then-kill' changes" which also went nowhere. What this bug is about is the opposite approach to the default behavior in file mouse3.el: have a double-click open a menu and a second single-click in place do what it does in emacs -Q (delete the region). Doing what you suggest would mean redefining `mouse-save-then-kill' completely (since the first click is then involved in implementing the timeout), and it would take away any flexibility. And this is just one example (use case) of the general problem. Are you sure about your "I vaguely recall"? I am not aware that we ever, ever separated the two like you say. That's certainly not the case at least as far back as Emacs 20. Why not try it (implement a real single/double click distinction) and _see_ if the delay is bothersome in practice, instead of presuming that it is? As I said: d> Try and see. In Emacs we can put such things under the control of the d> individual user. It should be possible to use both approaches, with a d> user option deciding. Once implemented it should be easy enough d> to conditionally ignore the timeout and get the current behavior. You are both just assuming that the effect would be undesirable, with no demonstration. Why not let the user decide? It seems to me that something _is not_ a single click if enough time has not elapsed to distinguish it from a double-click. That seems definitional, to me - I don't see how anything else makes sense. Otherwise, you never, ever know whether the intention was a single-click. There is then no such thing as a single or double click. Assuming that anytime the mouse gets clicked we want to invoke the single-click action seems aberrant and perverse to me. Microsoft (apparently) notwithstanding.