From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: How can I debug a problem triggered from jit-lock's background fontification? Date: Tue, 08 Mar 2011 16:07:31 -0500 Message-ID: References: <20110206205403.GA5978@muc.de> <4D75E18D.4010009@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1299618486 30901 80.91.229.12 (8 Mar 2011 21:08:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2011 21:08:06 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 08 22:08:02 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Px48P-0008KV-1z for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2011 22:08:01 +0100 Original-Received: from localhost ([127.0.0.1]:35398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Px48N-00005V-RL for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2011 16:07:59 -0500 Original-Received: from [140.186.70.92] (port=38183 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Px48H-0008Ur-Q6 for emacs-devel@gnu.org; Tue, 08 Mar 2011 16:07:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Px48G-0001ij-He for emacs-devel@gnu.org; Tue, 08 Mar 2011 16:07:53 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Px48E-0001ha-Qf for emacs-devel@gnu.org; Tue, 08 Mar 2011 16:07:52 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p28L7Vmw013532; Tue, 8 Mar 2011 16:07:31 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 68D441300D7; Tue, 8 Mar 2011 16:07:31 -0500 (EST) In-Reply-To: <4D75E18D.4010009@gmail.com> (Daniel Colascione's message of "Mon, 07 Mar 2011 23:58:05 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3735=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136920 Archived-At: > I've run into this problem as well. I actually use lazy-lock for C and > C++ (because the deferred fontification seems to work better), and the Note that lazy-lock is slated for removal (probably before Emacs-25.1). >> Yes, the problem is that jit-lock is called when redisplay is needed so >> it's tricky to let Edebug work at this time (it's easy to make it work >> with redisplay inhibited, but then you'll need to use it blindly ;-). > What about redisplay to a tty frame? Same difference, since they also support faces. > Speaking of which, quitting Emacs in the middle of a hard lisp loop > during redisplay on X11 (GTK and no-toolkit), nor OS X (AppKit) doesn't > seem to have any effect. I've discovered that running under gdb, > breaking into Emacs with C-z, and setting debug_on_next_call to 1 works, > but it's cumbersome. Is quitting during redisplay *supposed* to work? The Elisp code that is not run in direct response to a user event (pre/post-command-hook, redisplay, process filters, timers, ...) is run with inhibit-quit set to t, since the user may hit C-g without knowing that this code is running, i.e. without intending to interrupt this code. There's a pending suggestion to let a C-g C-g C-g override this, but I haven't looked at the patch yet :-( Stefan