unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30080: 24.5; write-region can reset idle time
@ 2018-01-11 21:00 Cecil Westerhof
  2018-01-11 23:49 ` Stefan Monnier
  0 siblings, 1 reply; 13+ messages in thread
From: Cecil Westerhof @ 2018-01-11 21:00 UTC (permalink / raw)
  To: 30080


It is possible that write-region resets idle time. As soon as I use
one or both of the following in my .emacs:
    (desktop-save-mode 1)
    (global-auto-revert-mode 1)

The idle time is reset when calling write-region.

To reproduce put one or both into .emacs.
Define the following function:
    (defun write-region-problem ()
      (message (format "Before: %s %s" (current-time) (current-idle-time)))
      (write-region "Just a test\n" nil "~/problem.log" t 0)
      (message (format "After:  %s %s" (current-time) (current-idle-time)))
      )

And execute:
    (setq timer-object (run-with-timer 30 30 'write-region-problem))

You then get output like the following:
    Before: (23127 39977 941713 503000) (0 29 994274 462000)
    After:  (23127 39977 982179 647000) (0 30 34741 483000)
    Before: (23127 40007 940217 421000) (0 29 946739 305000)
    After:  (23127 40007 981669 405000) (0 29 988192 219000)
    Before: (23127 40037 941670 105000) (0 29 944688 557000)
    After:  (23127 40037 991646 30000) (0 29 994665 603000)
    Before: (23127 40067 941685 17000) (0 29 938036 13000)
    After:  (23127 40067 992876 336000) (0 29 989228 329000)
    Before: (23127 40097 939595 311000) (0 29 936576 788000)
    After:  (23127 40097 977542 689000) (0 29 974525 333000)


If both are not defined, you get output like:
    Before: (23127 47206 936031 250000) (0 24 841129 146000)
    After:  (23127 47206 937987 23000) (0 24 843085 910000)
    Before: (23127 47236 936555 313000) (0 54 841653 459000)
    After:  (23127 47236 938648 51000) (0 54 843747 333000)
    Before: (23127 47266 935235 63000) (0 84 840333 256000)
    After:  (23127 47266 937094 166000) (0 84 842192 826000)
    Before: (23127 47296 936545 234000) (0 114 841643 122000)
    After:  (23127 47296 938517 313000) (0 114 843616 494000)


Before 19 December I did not have this problem. So it is recently
introduced.

My version of Emacs:
    GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-12 on hullmann, modified by Debian

-- 
Cecil Westerhof
Senior Software Engineer
M Cecil@Decebal.nl

LinkedIn: http://www.linkedin.com/in/cecilwesterhof





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-01-12 22:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-11 21:00 bug#30080: 24.5; write-region can reset idle time Cecil Westerhof
2018-01-11 23:49 ` Stefan Monnier
2018-01-12  1:36   ` Cecil Westerhof
2018-01-12  9:11     ` Eli Zaretskii
2018-01-12 10:36       ` Cecil Westerhof
2018-01-12 13:53         ` Eli Zaretskii
2018-01-12 14:37           ` Cecil Westerhof
2018-01-12 16:51             ` Glenn Morris
2018-01-12 17:10               ` Cecil Westerhof
2018-01-12 18:22                 ` Stefan Monnier
2018-01-12 22:59                   ` Cecil Westerhof
2018-01-12 14:56     ` Stefan Monnier
2018-01-12 15:11       ` Cecil Westerhof

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).