unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "D. Goel" <deego@glue.umd.edu>
Subject: idle-timer clock gets reset upon subprocess output.
Date: 22 Jun 2002 21:15:52 -0400	[thread overview]
Message-ID: <ap3eleylrqv.fsf@poynting.umd.edu> (raw)


;; BUG: i think: idle-timer clock gets reset upon subprocess output. 
;; =================================================================

;; The example in this file displays a bug in idle-timers.  I have
;; observed this bug with all sorts of (a)synchronous processes like
;; those occurring in eshell, ERC etc.

;; Basically, the manual says:

;; ,----
;; | ;  Emacs can do various things while idle: garbage collect, autosave
;; | ;or handle data from a subprocess.  But these interludes during
;; | ;idleness do not interfere with idle timers, because they do not reset
;; | ;the clock of idleness to zero.  An idle timer set for 600 seconds
;; | ;will run when ten minutes have elapsed since the last user command
;; | ;was finished, even if subprocess output has been accepted thousands
;; | ;of times within those ten minutes, even if there have been garbage
;; | ;collections and autosaves.
;; `----


;; However, it seems that the clock does get reset every time a
;; subprocess output results..     I have tested this on emacs21.1 on
;; a dec_alpha. 


;; The function below sets up a 7-second timer, and displays the
;; current time.  And then runs a background process which returns
;; output in 5 seconds.  After the 7-second timer is run, the
;; current-time is displayed again.  The difference between the two
;; displayed times should be 7 seconds, but it is 12 seconds (= 7 +
;; 5)..  IMHO, what happens is that when the process results in an
;; output, the timer-clock gets reset.  Am i misinterpreting things?


;; Save this file to ~/.emacs.timer and do an
;;  emacs21 -q -no-site-file -l ~/.emacs.timer
;;  M-x test-timer




(defun test-timer ()
  (interactive)
  
  ;; get done with dummy stuff and distracting messages
  (require 'eshell)
  (require 'timer)
  (eshell)
  (message "Starting stuff..")
  (switch-to-buffer "*eshell*")
  (goto-char (point-max))
  (insert "echo Dummy input..")
  (eshell-send-input)  
  ;; done with irrelevant messages...
  
  ;; Start a 7-second timer... (which should show time after 7
  ;; seconds... however, it will actually show time after 12 seconds..)
  (run-with-idle-timer  7 nil 
			'(lambda () (interactive)
			   (message 
			    (format-time-string 
			     "7 seconds reached, at %H:%M::%S"))))

  ;; echo the current time...
  (message (format-time-string "Seven-second timer started at: %H:%M::%S"))
  (switch-to-buffer "*eshell*")
  (goto-char (point-max))
  (insert "sleep 5")
  (eshell-send-input))







====================================================

bug-header: -->
In GNU Emacs 21.1.3 (alphaev56-dec-osf4.0f, X toolkit, Xaw3d scroll bars)
 of 2001-10-30 on shorty.csc.umd.edu
configured using `configure  --prefix=/usr/local/gnu --infodir=/usr/local/gnu/info/emacs-21.1 --with-kerberos --with-x --with-x-toolkit=yes --with-xpm --with-jpeg --with-tiff --with-gif --with-png'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

             reply	other threads:[~2002-06-23  1:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-23  1:15 D. Goel [this message]
2002-06-23  1:18 ` idle-timer clock gets reset upon subprocess output D. Goel

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=ap3eleylrqv.fsf@poynting.umd.edu \
    --to=deego@glue.umd.edu \
    /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).