From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Function write-region resets idle time
Date: Thu, 11 Jan 2018 22:48:11 +0200 [thread overview]
Message-ID: <83373c3ywk.fsf@gnu.org> (raw)
In-Reply-To: <87fu7ci3ti.fsf@munus.decebal.nl> (message from Cecil Westerhof on Thu, 11 Jan 2018 20:38:17 +0100)
> 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?
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.
> 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?
next prev parent reply other threads:[~2018-01-11 20:48 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 [this message]
[not found] ` <mailman.7229.1515703701.27995.help-gnu-emacs@gnu.org>
2018-01-11 21:24 ` Cecil Westerhof
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83373c3ywk.fsf@gnu.org \
--to=eliz@gnu.org \
--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.
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).