From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17392: 24.3.90; cursor blinks faster and faster Date: Sat, 10 May 2014 14:06:38 +0300 Message-ID: <83ppjlvqo1.fsf@gnu.org> References: <87r44b1vrh.fsf@web.de> <8738gq67av.fsf@web.de> <87sioqcx7n.fsf@web.de> <8761lkugic.fsf@web.de> <877g5zygco.fsf@web.de> <87a9au5o8l.fsf@web.de> <8761ld3ota.fsf@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1399720048 16679 80.91.229.3 (10 May 2014 11:07:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 May 2014 11:07:28 +0000 (UTC) Cc: 17392@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 10 13:07:19 2014 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 1Wj57e-0001yI-18 for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 May 2014 13:07:18 +0200 Original-Received: from localhost ([::1]:57172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj57d-0004Fq-DU for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 May 2014 07:07:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj57U-0004Fk-SW for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 07:07:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wj57O-0008Ja-UU for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 07:07:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj57O-0008IS-Rh for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 07:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wj57O-00032s-2h for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 07:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 May 2014 11:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17392 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17392-submit@debbugs.gnu.org id=B17392.139971999211654 (code B ref 17392); Sat, 10 May 2014 11:07:02 +0000 Original-Received: (at 17392) by debbugs.gnu.org; 10 May 2014 11:06:32 +0000 Original-Received: from localhost ([127.0.0.1]:57803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wj56s-00031t-RD for submit@debbugs.gnu.org; Sat, 10 May 2014 07:06:31 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:56512) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wj56p-00031a-Kb for 17392@debbugs.gnu.org; Sat, 10 May 2014 07:06:28 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N5C00700UOPGC00@mtaout29.012.net.il> for 17392@debbugs.gnu.org; Sat, 10 May 2014 14:07:23 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5C007MYUWBTV00@mtaout29.012.net.il>; Sat, 10 May 2014 14:07:23 +0300 (IDT) In-reply-to: <8761ld3ota.fsf@web.de> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:88859 Archived-At: > From: Michael Heerdegen > Date: Sat, 10 May 2014 12:34:09 +0200 > Cc: 17392@debbugs.gnu.org > > In emacs -Q, I did > > --8<---------------cut here---------------start------------->8--- > (progn > (advice-add 'timer-event-handler :before > (lambda (timer) > (unless (or (memq timer timer-list) > (memq timer timer-idle-list)) > (message "This should not happen")))) > (defun provoke (&rest _) > (run-with-idle-timer .001 nil > (lambda () (sit-for 2.)))) > (defadvice handle-switch-frame (after provoke activate) > (provoke))) > --8<---------------cut here---------------end--------------->8--- > > After switching frames a bit, I get "This should not happen". So an > idle blinking timer not in timer-idle-list is called from C with > timer-event-handler. At this point, there is already another blinking > timer in timer-idle-list. timer-event-handler pushes the zombie timer > to timer-idle-list as well, so then we have two of them there etc. See how timers are run by keyboard.c: we first make a copy of the timers' list, and then work on that copy. The comment there says: /* We use copies of the timers' lists to allow a timer to add itself again, without locking up Emacs if the newly added timer is already ripe when added. */ Can this implementation detail explain what you see? Btw, I don't understand what you say here, it sounds a contradiction: > So an idle blinking timer not in timer-idle-list is called from C > with timer-event-handler. At this point, there is already another > blinking timer in timer-idle-list. So is there a blinking time in timer-idle-list, or isn't there? The first sentence seems to say there isn't, but then the next sentence says there is.