From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: gmane.emacs.help Subject: Re: Function write-region resets idle time Date: Thu, 11 Jan 2018 22:24:28 +0100 Organization: Decebal Computing Message-ID: <87bmi0nl6b.fsf@munus.decebal.nl> References: <87r2qw9tpi.fsf@munus.decebal.nl> <87a7xki4xk.fsf@munus.decebal.nl> <87fu7ci3ti.fsf@munus.decebal.nl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515706144 16610 195.159.176.226 (11 Jan 2018 21:29:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Jan 2018 21:29:04 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 11 22:29:00 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZkPB-0003oW-KE for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Jan 2018 22:28:57 +0100 Original-Received: from localhost ([::1]:44388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZkR9-0001Yf-8L for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Jan 2018 16:30:59 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 65 Original-Injection-Info: reader02.eternal-september.org; posting-host="3ce06bae44728319efebd29f38d163ca"; logging-data="11934"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+y0a9sXL7WXu6MG0XHjfo/472WQvQQvB4=" Cancel-Lock: sha1:ofd2Z/dlY/gJdhJzDNanaAxQ+IY= sha1:T6CwkfgKZt2fCprfpetQy94F80A= Original-Xref: usenet.stanford.edu gnu.emacs.help:221547 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115664 Archived-At: Eli Zaretskii writes: >> From: Cecil Westerhof >> 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