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: [kzeitler@lucent.com: Re: Crash with mouse-avoidance-mode] Date: Wed, 09 Aug 2006 09:59:42 -0400 Message-ID: <87lkpyhuwh.fsf@stupidchicken.com> References: <17625.8952.768607.630907@kahikatea.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1155132008 22776 80.91.229.2 (9 Aug 2006 14:00:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 9 Aug 2006 14:00:08 +0000 (UTC) Cc: Nick Roberts , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 09 16:00:06 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 1GAobK-0006SV-8u for ged-emacs-devel@m.gmane.org; Wed, 09 Aug 2006 16:00:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAobJ-0002PN-Qp for ged-emacs-devel@m.gmane.org; Wed, 09 Aug 2006 10:00:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GAob7-0002MK-Ah for emacs-devel@gnu.org; Wed, 09 Aug 2006 09:59:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAob6-0002LZ-U3 for emacs-devel@gnu.org; Wed, 09 Aug 2006 09:59:48 -0400 Original-Received: from [18.72.1.2] (helo=south-station-annex.mit.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GAofn-0007b0-TI; Wed, 09 Aug 2006 10:04:40 -0400 Original-Received: from central-city-carrier-station.mit.edu (CENTRAL-CITY-CARRIER-STATION.MIT.EDU [18.7.7.72]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id k79Dxlmi029443; Wed, 9 Aug 2006 09:59:47 -0400 (EDT) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by central-city-carrier-station.mit.edu (8.13.6/8.9.2) with ESMTP id k79Dxk7V026377; Wed, 9 Aug 2006 09:59:46 -0400 (EDT) Original-Received: from cyd (SYDNEYPACIFIC-FOUR-SIXTY-SEVEN.MIT.EDU [18.95.6.212]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id k79DxglR024522; Wed, 9 Aug 2006 09:59:42 -0400 (EDT) Original-Received: from cyd by cyd with local (Exim 3.36 #1 (Debian)) id 1GAob0-0006hC-00; Wed, 09 Aug 2006 09:59:42 -0400 Original-To: Klaus Zeitler In-Reply-To: (Klaus Zeitler's message of "Wed, 09 Aug 2006 11:55:01 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Spam-Score: X-Scanned-By: MIMEDefang 2.42 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:58224 Archived-At: Klaus Zeitler writes: >>>>>> "Nick" == Nick Roberts writes: > Nick> > Nick> I don't know about the haywire bit, maybe it's meant to do that, but > Nick> the crash was related to sit-for which Chong has already fixed. > > No it's not meant to do that. If you try it first with the default > mouse-avoidance-animation-delay (0.01), you'll see how it is supposed > to act. And it does nearly the same with the value I've been using for > a long time (0.1). But with recent changes (I suspect sit-for) sometimes > the mouse pointer keeps jumping around or dithering and will not stop as > long as no new input is entered. Though I'm not sure if this is a Solaris > specific problem or not. I think this is an avoid.el bug that only surfaced with the new sit-for. mouse-avoidance-mode works by activating a timer to run mouse-avoidance-fancy-hook every 0.1 seconds. If the animation delay is long, the timer can run again in the middle of the animation, which nudges the mouse pointer in another random direction. The way to solve this is to introduce a variable mouse-avoidance-animating-pointer which is non-nil while animating the mouse, and making mouse-avoidance-fancy-hook do nothing if mouse-avoidance-animating-pointer is non-nil. (BTW, mouse-avoidance-fancy-hook violates the naming conventions, and should be renamed mouse-avoidance-timer-function.) I'll check in changes to fix these issues shortly.