From: Cecil Westerhof <Cecil@decebal.nl>
To: help-gnu-emacs@gnu.org
Subject: Re: Function write-region resets idle time
Date: Thu, 11 Jan 2018 22:24:28 +0100 [thread overview]
Message-ID: <87bmi0nl6b.fsf@munus.decebal.nl> (raw)
In-Reply-To: mailman.7229.1515703701.27995.help-gnu-emacs@gnu.org
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
next prev parent reply other threads:[~2018-01-11 21:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 17:43 Function write-region resets idle time Cecil Westerhof
2018-01-11 18:05 ` Eli Zaretskii
[not found] ` <mailman.7219.1515693952.27995.help-gnu-emacs@gnu.org>
2018-01-11 19:14 ` Cecil Westerhof
2018-01-11 19:38 ` Cecil Westerhof
2018-01-11 20:48 ` Eli Zaretskii
[not found] ` <mailman.7229.1515703701.27995.help-gnu-emacs@gnu.org>
2018-01-11 21:24 ` Cecil Westerhof [this message]
2018-01-11 19:40 ` Stefan Monnier
[not found] ` <mailman.7223.1515699746.27995.help-gnu-emacs@gnu.org>
2018-01-11 20:45 ` Cecil Westerhof
2018-01-12 23:08 ` Cecil Westerhof
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bmi0nl6b.fsf@munus.decebal.nl \
--to=cecil@decebal.nl \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.