unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Cecil Westerhof <Cecil@decebal.nl>
To: 30080@debbugs.gnu.org
Subject: bug#30080: 24.5; write-region can reset idle time
Date: Thu, 11 Jan 2018 22:00:51 +0100	[thread overview]
Message-ID: <87fu7cnm9o.fsf@munus.decebal.nl> (raw)


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





             reply	other threads:[~2018-01-11 21:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 21:00 Cecil Westerhof [this message]
2018-01-11 23:49 ` bug#30080: 24.5; write-region can reset idle time 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

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=87fu7cnm9o.fsf@munus.decebal.nl \
    --to=cecil@decebal.nl \
    --cc=30080@debbugs.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 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).