help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function write-region resets idle time


From: Cecil Westerhof
Subject: Re: Function write-region resets idle time
Date: Thu, 11 Jan 2018 22:24:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Cecil Westerhof <Cecil@decebal.nl>
>> Date: Thu, 11 Jan 2018 20:38:17 +0100
>> 
>> And when I use:
>>     (setq timer-object (run-with-timer 30 30 'only-message))
>> 
>> I get:
>>     Only message: (23127 48054 400127 610000) (0 29 996735 28000)
>>     Only message: (23127 48084 396995 23000) (0 59 993602 312000)
>>     Only message: (23127 48114 400137 106000) (0 89 996744 686000)
>>     Only message: (23127 48144 400100 220000) (0 119 996707 561000)
>>     Only message: (23127 48174 400122 394000) (0 149 996729 864000)
>> 
>> So again, ONLY calling write-region does rest idle time.
>
> With the original code you posted, I don't see the problem: the
> idle-time advances by 30 sec every 30 sec.  I tried on 2 different
> systems, one of them GNU/Linux, the other MS-Windows, and I see
> consistent behavior on both.
>
> So it's something specific to your system.  Somehow, write-region
> causes Emacs on your system to receive some input event, and that
> event resets the idleness time.  Is what you see in "emacs -Q"?  If
> not, maybe you have something like global auto-revert-mode set, in
> which case you get inotify event whenever you write to a file.  Or
> maybe some D-bus service does something similar?

Yes, that is one of the two things that gives the problem. As soon as
I have one or both of the two following in my .emacs I get this
behaviour:
    (desktop-save-mode 1)
    (global-auto-revert-mode 1)


> In general, idle time is very fragile, and gets reset on any input
> event.  For example, I have focus-follows-mouse in my window manager,
> and just moving the mouse into the Emacs frame resets the idle time on
> that system, as expected.

Until now I did not have a problem with it. I used it with Gnus to do
things that potentially take a lot of time only when I have been idle
for a period of time.

Until recently I did not have problems with this.


>> The behaviour changed (for me) on the 19th of December.
>
> I don't understand this: you said you are using Emacs 24.5, so what
> could have changed your Emacs on that date?

I do not know. I do regularly my updates and I suppose that I did an
update on that day and that this changed the functionality of Emacs.

I have used this functionality for about five years without a problem.


I already reported it as a bug.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


reply via email to

[Prev in Thread] Current Thread [Next in Thread]