From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: mouse-1-click-follows-link with xt-mouse (was: with t-mouse) Date: Wed, 21 Mar 2007 12:49:12 +1200 Message-ID: <17920.33032.840044.978947@kahikatea.snap.net.nz> References: <87mz2tqhhn.fsf@pacem.orebokech.com> <878xeayadw.fsf@pacem.orebokech.com> <87649eaqti.fsf@wigwam.brockman.se> <877itezkg9.fsf@stupidchicken.com> <17918.26352.744588.929984@kahikatea.snap.net.nz> <17918.28984.190415.507648@kahikatea.snap.net.nz> <17919.4822.767974.760203@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1174438174 11473 80.91.229.12 (21 Mar 2007 00:49:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Mar 2007 00:49:34 +0000 (UTC) To: rms@gnu.org, storm@cua.dk, cyd@stupidchicken.com, bojohan+news@dd.chalmers.se, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 21 01:49:26 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 1HTp12-0004RE-NT for ged-emacs-devel@m.gmane.org; Wed, 21 Mar 2007 01:49:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTp2e-0008LU-Nv for ged-emacs-devel@m.gmane.org; Tue, 20 Mar 2007 19:51:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HTp2c-0008LN-6C for emacs-devel@gnu.org; Tue, 20 Mar 2007 20:51:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HTp2a-0008L7-Q6 for emacs-devel@gnu.org; Tue, 20 Mar 2007 20:51:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTp2a-0008L4-K4 for emacs-devel@gnu.org; Tue, 20 Mar 2007 19:51:00 -0500 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HTp0w-0001G9-5n; Tue, 20 Mar 2007 20:49:18 -0400 Original-Received: from kahikatea.snap.net.nz (62.61.255.123.dynamic.snap.net.nz [123.255.61.62]) by viper.snap.net.nz (Postfix) with ESMTP id 77B633D9F6C; Wed, 21 Mar 2007 12:49:15 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 37CBE4F71C; Wed, 21 Mar 2007 12:49:14 +1200 (NZST) In-Reply-To: <17919.4822.767974.760203@kahikatea.snap.net.nz> X-Mailer: VM 7.19 under Emacs 22.0.95.6 X-detected-kernel: Linux 2.4-2.6 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:68190 Archived-At: > > Thanks, and please install your patch. > > > > Is this issue settled? > > Mouse clicks on an xterm don't seem to carry timestamp information (or, at > least xt-mouse.el doesn't extract it) so I suggest adding the patch below to > the manual. xterm-mouse-mode is currently turned off by default, so I > think it's reasonable to keep mouse-1-click-follows-link in this case. Actually the patch below seems to work for xt-mouse.el. The timestamp isn't computed directly from the mouse click, but for a value of many (450) milliseconds it seems good enough. Shall I install it? -- Nick http://www.inet.net.nz/~nickrob *** xt-mouse.el 21 Jan 2007 23:13:01 +1300 1.34 --- xt-mouse.el 21 Mar 2007 12:40:38 +1200 *************** *** 124,129 **** --- 124,131 ---- (let* ((type (- (xterm-mouse-event-read) #o40)) (x (- (xterm-mouse-event-read) #o40 1)) (y (- (xterm-mouse-event-read) #o40 1)) + (time (current-time)) + (timestamp (+ ( * (nth 1 time) 1000 ) (/ (nth 2 time) 1000))) (mouse (intern ;; For buttons > 3, the release-event looks ;; differently (see xc/programs/xterm/button.c, *************** *** 145,154 **** xterm-mouse-y y) (setq last-input-event ! (if w ! (list mouse (posn-at-x-y (- x left) (- y top) w t)) ! (list mouse ! (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w t)))))))) ;;;###autoload (define-minor-mode xterm-mouse-mode --- 147,159 ---- xterm-mouse-y y) (setq last-input-event ! (list mouse ! (let ((event (if w ! (posn-at-x-y (- x left) (- y top) w t) ! (append (list nil 'menu-bar) ! (nthcdr 2 (posn-at-x-y x y w t)))))) ! (setcar (nthcdr 3 event) timestamp) ! event))))) ;;;###autoload (define-minor-mode xterm-mouse-mode