From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time Date: Thu, 23 Apr 2015 07:59:15 +0200 Message-ID: <87oamfwfkc.fsf@gnu.org> References: <87a8y0iji1.fsf@gnu.org> <837ft44fnf.fsf@gnu.org> <87y4ljgb01.fsf_-_@gnu.org> <83bnif3ks4.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429768827 26668 80.91.229.3 (23 Apr 2015 06:00:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Apr 2015 06:00:27 +0000 (UTC) Cc: 20404@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 23 08:00:16 2015 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 1YlABM-0006AB-6b for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Apr 2015 08:00:16 +0200 Original-Received: from localhost ([::1]:38161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlABL-0004o3-23 for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Apr 2015 02:00:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlABE-0004ne-Pm for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 02:00:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlABB-00032X-4S for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 02:00:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlABB-000322-27 for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 02:00:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YlABA-0007RO-Dh for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 02:00:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Apr 2015 06:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20404-submit@debbugs.gnu.org id=B20404.142976876028523 (code B ref 20404); Thu, 23 Apr 2015 06:00:04 +0000 Original-Received: (at 20404) by debbugs.gnu.org; 23 Apr 2015 05:59:20 +0000 Original-Received: from localhost ([127.0.0.1]:36980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YlAAR-0007Pz-TN for submit@debbugs.gnu.org; Thu, 23 Apr 2015 01:59:20 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:54136) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YlAAP-0007Pm-2x for 20404@debbugs.gnu.org; Thu, 23 Apr 2015 01:59:18 -0400 Original-Received: from thinkpad-t440p (dhcp18.uni-koblenz.de [141.26.71.18]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id DAC171A854C; Thu, 23 Apr 2015 07:59:15 +0200 (CEST) In-Reply-To: <83bnif3ks4.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 23 Apr 2015 00:39:23 +0300") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) 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:101900 Archived-At: Eli Zaretskii writes: >> > Sounds like the idle timer that is started by jit-lock-defer-time >> > never runs after the buffer is displayed. >> >> Indeed, that's the case. Or wait, it eventually runs but much later >> than `jit-lock-defer-time' defines. >> >> > Could it be that it already ran before the display? >> >> No. The bug report buffer is displayed first, and then it takes two >> or three seconds until the first jit-lock kicks in. And then the >> buffer will be redisplayed and appears fontified. > > So you are saying that something prevents the timer to run at the > prescribed time? That seems to be the case. > I suggest to add trace printf's in the code that traverses the > idle-timers' list, and see why this timer doesn't run on time. That would be static struct timespec timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers) right? So first I wanted to see if the deferred font-lock timer gets selected as being ripe in the first place. But I already failed with that; emacs now dumps core. --8<---------------cut here---------------start------------->8--- diff --git a/src/keyboard.c b/src/keyboard.c index 068a47c..6231747 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4419,6 +4419,8 @@ timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers) Lisp_Object chosen_timer; struct gcpro gcpro1; + printf ("timer_check2 ()"); + nexttime = invalid_timespec (); chosen_timer = Qnil; @@ -4513,6 +4515,10 @@ timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers) idle_timers = XCDR (idle_timers); difference = idle_timer_difference; ripe = idle_timer_ripe; + if (ripe) + { + printf("Idle timer calling %s is ripe.", AREF (5, chosen_timer)); + } } /* If timer is ripe, run it if it hasn't been run. */ --8<---------------cut here---------------end--------------->8--- I think the problem is that the AREF returns the timer's function or maybe the symbol whose function definition is the timer's function. In any case, that's not a char* required by printf's %s. How do I get the function's name in order to print that? Bye, Tassilo