From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#12447: 24.1.50; Stuck in garbage collection on OS X Date: Sun, 16 Sep 2012 13:15:52 +0400 Message-ID: <505598C8.8070904@yandex.ru> References: <20120914.230819.731988138196046556.hanche@math.ntnu.no> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347787021 2326 80.91.229.3 (16 Sep 2012 09:17:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Sep 2012 09:17:01 +0000 (UTC) Cc: 12447@debbugs.gnu.org, hanche@math.ntnu.no To: eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 16 11:17:02 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TDAyM-0006yL-M9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Sep 2012 11:17:02 +0200 Original-Received: from localhost ([::1]:52951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDAyI-0006YX-LD for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Sep 2012 05:16:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDAyF-0006Xe-W5 for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 05:16:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDAyE-0006il-Te for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 05:16:55 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDAyE-0006ih-Q3 for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 05:16:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TDAzK-0006vt-A2 for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 05:18:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <20120914.230819.731988138196046556.hanche@math.ntnu.no> Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Sep 2012 09:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12447 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12447-submit@debbugs.gnu.org id=B12447.134778703026592 (code B ref 12447); Sun, 16 Sep 2012 09:18:02 +0000 Original-Received: (at 12447) by debbugs.gnu.org; 16 Sep 2012 09:17:10 +0000 Original-Received: from localhost ([127.0.0.1]:36467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDAyR-0006uk-7F for submit@debbugs.gnu.org; Sun, 16 Sep 2012 05:17:09 -0400 Original-Received: from forward3h.mail.yandex.net ([84.201.187.148]:55791) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDAyM-0006ua-HV for 12447@debbugs.gnu.org; Sun, 16 Sep 2012 05:17:05 -0400 Original-Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward3h.mail.yandex.net (Yandex) with ESMTP id 410EB1360EF5; Sun, 16 Sep 2012 13:15:53 +0400 (MSK) Original-Received: from smtp1h.mail.yandex.net (localhost [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id E63091340267; Sun, 16 Sep 2012 13:15:52 +0400 (MSK) Original-Received: from 5x166x246x245.dynamic.spb.ertelecom.ru (5x166x246x245.dynamic.spb.ertelecom.ru [5.166.246.245]) by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id FpUCdOMP-FqUiYOAN; Sun, 16 Sep 2012 13:15:52 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1347786952; bh=vpZrm0pxqvfQVkwDHNin7qU2VPuEOnpaZb+DIUuJCK0=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: Content-Type:Content-Transfer-Encoding; b=Qg7brloEhfsSAFniwCMwF+RI3Rwqdm+cRs7BSqAZs5iMHQKmj0Dytz+IhUfu6LJsw ts9g0xZ7r3CpmhgFUIqNgeFCWGxJ3GbbAGfPV64wv3p5V0OhzQ9abAK6t4M5F0zq7t XmC5lbMekWXw+QxB+5TFFrDIibhTuFDZECW0iykI= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64405 Archived-At: Eli Zaretskii writes: >> Date: Sat, 15 Sep 2012 16:23:53 +0200 (CEST) >> Cc: jan.h.d@swipnet.se, 12447@debbugs.gnu.org >> From: Harald Hanche-Olsen >> >> For example: Is it okay to set a timer in a timer callback? > > I don't see why not. Setting up a timer just creates a Lisp object > and adds it to the list of timers. The timer will be run the next > time the low-level mechanism, which is part of the Emacs exec loop, > determines that it's ripe. In js2-mode's case, the problem is that 'run-with-idle-timer' makes the created timer run now, not the "next time". Here's an example: (defvar counter 0) (defun foo () (message (format "foo %s" counter)) (incf counter) (run-with-idle-timer 1 nil #'foo)) (foo) I'd expect that either timer would fire once every second (as long as I'm not touching my keyboard), or at least stop firing when I do touch my keyboard (seeing as otherwise Emacs is idle), but instead I just see the timer firing many times a second, the counter runs in the message area, and Emacs doesn't respond to any commands.