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 t-mouse Date: Mon, 19 Mar 2007 23:17:12 +1200 Message-ID: <17918.28984.190415.507648@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> 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 1174303051 5869 80.91.229.12 (19 Mar 2007 11:17:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Mar 2007 11:17:31 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org, rms@gnu.org, bojohan+news@dd.chalmers.se To: storm@cua.dk (Kim F. Storm) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 19 12:17: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 1HTFrg-0002KM-Ol for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2007 12:17:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTFt9-0007hp-WA for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2007 06:18:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HTFt7-0007hG-8g for emacs-devel@gnu.org; Mon, 19 Mar 2007 07:18:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HTFt5-0007h3-Ip for emacs-devel@gnu.org; Mon, 19 Mar 2007 07:18:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTFt5-0007gy-F0 for emacs-devel@gnu.org; Mon, 19 Mar 2007 06:18:51 -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 1HTFrY-0003bx-Gg; Mon, 19 Mar 2007 07:17:17 -0400 Original-Received: from kahikatea.snap.net.nz (245.63.255.123.dynamic.snap.net.nz [123.255.63.245]) by viper.snap.net.nz (Postfix) with ESMTP id 800263D8139; Mon, 19 Mar 2007 23:17:14 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 91C554F72F; Mon, 19 Mar 2007 23:17:13 +1200 (NZST) In-Reply-To: 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:68094 Archived-At: > > When is this condition needed? I couldn't get it to fail on a graphical > > display. > > I don't recall why I made the check for input-pending-p, but > it looks like it is meant to catch a double click on a link - > i.e. so that a double-click does not follow the link. > > But that doesn't really work - and it also seems that the test could > potentially make the whole feature unstable, as other unrelated input > events could accidentally prevent the mouse click from following the link. > > So I think we can just remove the test. That would be good. The client program mev, used by t-mouse, outputs time information which isn't currently used in t-mouse.el. The patch below allows Emacs to follow the delay specified by mouse-1-click-follows-link in a console. -- Nick http://www.inet.net.nz/~nickrob *** t-mouse.el 20 Jan 2007 20:58:47 +1300 1.7 --- t-mouse.el 19 Mar 2007 23:08:57 +1200 *************** For example, \"2\" for /dev/tty2." *** 134,147 **** (defun t-mouse-make-event-element (x-dot-y-avec-time) (let* ((x-dot-y (nth 0 x-dot-y-avec-time)) (x (car x-dot-y)) (y (cdr x-dot-y)) (w (window-at x y)) (ltrb (window-edges w)) (left (nth 0 ltrb)) ! (top (nth 1 ltrb))) ! (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)))))) ;;; This fun is partly Copyright (C) 1994 Per Abrahamsen (defun t-mouse-make-event () --- 134,152 ---- (defun t-mouse-make-event-element (x-dot-y-avec-time) (let* ((x-dot-y (nth 0 x-dot-y-avec-time)) + (time (nth 1 x-dot-y-avec-time)) (x (car x-dot-y)) (y (cdr x-dot-y)) (w (window-at x y)) (ltrb (window-edges w)) (left (nth 0 ltrb)) ! (top (nth 1 ltrb)) ! (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) time) ! event)) ;;; This fun is partly Copyright (C) 1994 Per Abrahamsen (defun t-mouse-make-event ()