* Zone
@ 2002-06-12 7:58 Almer S. Tigelaar
2002-06-12 21:03 ` Zone Thien-Thi Nguyen
0 siblings, 1 reply; 5+ messages in thread
From: Almer S. Tigelaar @ 2002-06-12 7:58 UTC (permalink / raw)
Dear maintainers of my favourite editor,
Using : GNU Emacs 21.1.1 (i386-msvc-nt5.0.2195) of 2002-03-19 on buffy
Description :
I noticed an error in the "zone" package, it seems that the argument to
"zone-when-idle" is not in seconds but in 1/10ths of a second.
Reproduction:
try "M-x zone-when-idle 180"
Sit back and don't touch anything, notice that it zones out after 18
seconds, not 180 as the documentation suggests.
Remarks:
The "run-with-idle-timer" function does not exhibit this malfunction which
suggests that the problem lies within the zone package itself.
Yours sincerely,
Almer S. Tigelaar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Zone
2002-06-12 7:58 Zone Almer S. Tigelaar
@ 2002-06-12 21:03 ` Thien-Thi Nguyen
2002-06-13 20:39 ` Zone Jason Rumney
2002-06-17 18:18 ` Zone Almer S. Tigelaar
0 siblings, 2 replies; 5+ messages in thread
From: Thien-Thi Nguyen @ 2002-06-12 21:03 UTC (permalink / raw)
Cc: bug-gnu-emacs
"Almer S. Tigelaar" <almer@gnome.org> writes:
Using : GNU Emacs 21.1.1 (i386-msvc-nt5.0.2195) of 2002-03-19 on buffy
I noticed an error in the "zone" package, it seems that the argument to
"zone-when-idle" is not in seconds but in 1/10ths of a second.
Reproduction:
try "M-x zone-when-idle 180"
Sit back and don't touch anything, notice that it zones out after 18
seconds, not 180 as the documentation suggests.
i don't have access to that platform to try to debug this.
The "run-with-idle-timer" function does not exhibit this malfunction which
suggests that the problem lies within the zone package itself.
this may be true but it's difficult to tell from the information given.
i suggest trying a more recent emacs. if the problem persists, could you
write a small test case using run-with-idle-timer and describe its behavior
more precisely?
thi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Zone
2002-06-12 21:03 ` Zone Thien-Thi Nguyen
@ 2002-06-13 20:39 ` Jason Rumney
2002-06-13 22:46 ` Zone Richard Stallman
2002-06-17 18:18 ` Zone Almer S. Tigelaar
1 sibling, 1 reply; 5+ messages in thread
From: Jason Rumney @ 2002-06-13 20:39 UTC (permalink / raw)
ttn@glug.org (Thien-Thi Nguyen) writes:
> "Almer S. Tigelaar" <almer@gnome.org> writes:
>
> Using : GNU Emacs 21.1.1 (i386-msvc-nt5.0.2195) of 2002-03-19 on buffy
>
> I noticed an error in the "zone" package, it seems that the argument to
> "zone-when-idle" is not in seconds but in 1/10ths of a second.
> Reproduction:
> try "M-x zone-when-idle 180"
> Sit back and don't touch anything, notice that it zones out after 18
> seconds, not 180 as the documentation suggests.
>
> The "run-with-idle-timer" function does not exhibit this malfunction which
> suggests that the problem lies within the zone package itself.
>
> this may be true but it's difficult to tell from the information given.
>
> i suggest trying a more recent emacs. if the problem persists, could you
> write a small test case using run-with-idle-timer and describe its behavior
> more precisely?
I thought I had reproduced the problem with zone in 21.2 on Windows
2000, and current CVS HEAD on GNU/Linux. But it turns out from
studying the code that my testing methodology was at fault.
My patience does not stretch to 3 minutes, so I first tried 20
seconds. When that worked I tried again with 180, and thought I was
seeing this bug. But in fact, calling zone-when-idle a second time
is a no-op. This was somewhat unexpected, I expected the timer
to be changed to the new value.
--
Jason Rumney
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Zone
2002-06-13 20:39 ` Zone Jason Rumney
@ 2002-06-13 22:46 ` Richard Stallman
0 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2002-06-13 22:46 UTC (permalink / raw)
Cc: gnu-emacs-bug
My patience does not stretch to 3 minutes, so I first tried 20
seconds. When that worked I tried again with 180, and thought I was
seeing this bug. But in fact, calling zone-when-idle a second time
is a no-op.
That is a bug, so I fixed it.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Zone
2002-06-12 21:03 ` Zone Thien-Thi Nguyen
2002-06-13 20:39 ` Zone Jason Rumney
@ 2002-06-17 18:18 ` Almer S. Tigelaar
1 sibling, 0 replies; 5+ messages in thread
From: Almer S. Tigelaar @ 2002-06-17 18:18 UTC (permalink / raw)
Cc: bug-gnu-emacs
Dear Thien-Thi,
(sorry for the late reply)
On Wed, 2002-06-12 at 23:03, Thien-Thi Nguyen wrote:
> I noticed an error in the "zone" package, it seems that the argument to
> "zone-when-idle" is not in seconds but in 1/10ths of a second.
> Reproduction:
> try "M-x zone-when-idle 180"
> Sit back and don't touch anything, notice that it zones out after 18
> seconds, not 180 as the documentation suggests.
>
> i suggest trying a more recent emacs. if the problem persists, could you
> write a small test case using run-with-idle-timer and describe its behavior
> more precisely?
After some tinkering I think i've found the problem. I've tested this with
GNU Emacs 21.2.1
The problem was that the "zone" function calls "zone-when-idle" with
"zone-idle" as argument for the seconds. This doesn't work to well when
a user chooses to invoke the "zone-when-idle" function and pass the
number of seconds to it.
What happens when doing "M-x zone-when-idle" and entering 60 seconds as
idle time is this :
(1) "zone-when-idle" sets up an idle timer which is invoked after 60
seconds.
(2) After 60 seconds of idle time the "zone" function is actually
invoked.
(3) At the end of the "zone" function the "zone-when-idle" function is
called with an argument of "zone-idle" seconds (which is still at
the default value of "20")
(4) "zone-when-idle" sets up an idle timer which is invoked after 20
seconds of idle time.
(5) Now, after 20 seconds of idle time the "zone" function is invoked
again.
Obviously not good, the user would expect the idle timer to trigger
after 60 seconds, not 60 the first time and 20 all other times.
There are a couple of solutions to this problem :
(1) When using the "zone-when-idle" function also set the "zone-idle"
variable, like :
(setq zone-idle 180)
(zone-when-idle 180)
(2) Explicitely set the "zone-idle" variable in the "zone-when-idle"
function (use the value the user passed, the "secs" variable)
(3) Remove the call to "zone-when-idle" at the end of the "zone"
functions, if the idle timer works correctly it should repeat the
invocation every "secs" seconds anyway.
Yours sincerely,
Almer S. Tigelaar
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-06-17 18:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-12 7:58 Zone Almer S. Tigelaar
2002-06-12 21:03 ` Zone Thien-Thi Nguyen
2002-06-13 20:39 ` Zone Jason Rumney
2002-06-13 22:46 ` Zone Richard Stallman
2002-06-17 18:18 ` Zone Almer S. Tigelaar
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).