unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [kzeitler@lucent.com: Re: Crash with mouse-avoidance-mode]
@ 2006-08-08 23:40 Richard Stallman
  2006-08-08 23:49 ` Nick Roberts
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2006-08-08 23:40 UTC (permalink / raw)


Would someone please investigate this and DTRT?

------- Start of forwarded message -------
To: rms@gnu.org
Subject: Re: Crash with mouse-avoidance-mode
From: Klaus Zeitler <kzeitler@lucent.com>
Date: Tue, 08 Aug 2006 11:49:29 +0200
In-Reply-To: <E1GAIpZ-0003dk-PE@fencepost.gnu.org> (Richard Stallman's message of "Tue, 08 Aug 2006 00:04:37 -0400")
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4

>>>>> "Richard" == Richard Stallman <rms@gnu.org> writes:
    Richard> 
    Richard> Can you tell us a precise recipe for reproducing this?

Nearly precise :-).

1. emacs -Q
2. (setq mouse-avoidance-animation-delay 0.1)
3. M-x mouse-avoidance-mode proteus
4. Move cursor carefully/slowly close to mouse pointer so that avoidance-mode
   will try to move the pointer away. I need only about 3 or 4 tries till the
   animation goes haywire and the mouse pointer starts jumping around


- -- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
- ---
To invent, you need a good imagination and a pile of junk. -- Thomas Edison
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kzeitler@lucent.com: Re: Crash with mouse-avoidance-mode]
  2006-08-08 23:40 [kzeitler@lucent.com: Re: Crash with mouse-avoidance-mode] Richard Stallman
@ 2006-08-08 23:49 ` Nick Roberts
  2006-08-09  9:55   ` Klaus Zeitler
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Roberts @ 2006-08-08 23:49 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman writes:
 > Would someone please investigate this and DTRT?
 > 
 > ------- Start of forwarded message -------
 > To: rms@gnu.org
 > Subject: Re: Crash with mouse-avoidance-mode
 > From: Klaus Zeitler <kzeitler@lucent.com>
 > Date: Tue, 08 Aug 2006 11:49:29 +0200
 > In-Reply-To: <E1GAIpZ-0003dk-PE@fencepost.gnu.org> (Richard Stallman's message of "Tue, 08 Aug 2006 00:04:37 -0400")
 > MIME-Version: 1.0
 > Content-Type: text/plain; charset=us-ascii
 > X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
 > 	version=3.0.4
 > 
 > >>>>> "Richard" == Richard Stallman <rms@gnu.org> writes:
 >     Richard> 
 >     Richard> Can you tell us a precise recipe for reproducing this?
 > 
 > Nearly precise :-).
 > 
 > 1. emacs -Q
 > 2. (setq mouse-avoidance-animation-delay 0.1)
 > 3. M-x mouse-avoidance-mode proteus
 > 4. Move cursor carefully/slowly close to mouse pointer so that avoidance-mode
 >    will try to move the pointer away. I need only about 3 or 4 tries till the
 >    animation goes haywire and the mouse pointer starts jumping around

I don't know about the haywire bit, maybe it's meant to do that, but the
crash was related to sit-for which Chong has already fixed.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kzeitler@lucent.com: Re: Crash with mouse-avoidance-mode]
  2006-08-08 23:49 ` Nick Roberts
@ 2006-08-09  9:55   ` Klaus Zeitler
  2006-08-09 13:59     ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: Klaus Zeitler @ 2006-08-09  9:55 UTC (permalink / raw)
  Cc: rms, emacs-devel

>>>>> "Nick" == Nick Roberts <nickrob@snap.net.nz> 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.

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Pardon this quote. Database under reconstruction.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kzeitler@lucent.com: Re: Crash with mouse-avoidance-mode]
  2006-08-09  9:55   ` Klaus Zeitler
@ 2006-08-09 13:59     ` Chong Yidong
  2006-08-09 14:54       ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2006-08-09 13:59 UTC (permalink / raw)
  Cc: Nick Roberts, rms, emacs-devel

Klaus Zeitler <kzeitler@lucent.com> writes:

>>>>>> "Nick" == Nick Roberts <nickrob@snap.net.nz> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kzeitler@lucent.com: Re: Crash with mouse-avoidance-mode]
  2006-08-09 13:59     ` Chong Yidong
@ 2006-08-09 14:54       ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2006-08-09 14:54 UTC (permalink / raw)
  Cc: Klaus Zeitler, Nick Roberts, rms, emacs-devel

> 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.

Or to turn this repeated timer into a one-shot timer which is manually
re-created at the end of the animation step, so that the 0.1s refers not to
the interval between the beginning of each animation step but between the
end of one and the beginning of the next.


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-08-09 14:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-08 23:40 [kzeitler@lucent.com: Re: Crash with mouse-avoidance-mode] Richard Stallman
2006-08-08 23:49 ` Nick Roberts
2006-08-09  9:55   ` Klaus Zeitler
2006-08-09 13:59     ` Chong Yidong
2006-08-09 14:54       ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).