emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I debug a problem triggered from jit-lock's background fonti


From: Alan Mackenzie
Subject: Re: How can I debug a problem triggered from jit-lock's background fontification?
Date: Mon, 7 Feb 2011 22:19:38 +0000
User-agent: Mutt/1.5.9i

Hi Stefan,

thanks for this most helpful reply!  Guess what?  I didn't know about
`trace-function-background' until today.  One never stops learning about
Emacs.

I've actually inserted a call to `ignore' into the critical place, with
all the things I want to see as parameters to ignore.  Then I trace
`ignore'.  I _think_ I've got the problem tied down, but that will have
to wait till tomorrow.

Thanks once again.

On Mon, Feb 07, 2011 at 10:40:48AM -0500, Stefan Monnier wrote:

> I've had to deal with this problem, as you can imagine, and I feel
> your pain.  The way I generally handle this problem is as follows:
> - first, try to turn off jit-lock and to reproduce the problem.  This is
>   often all it takes, but admittedly, it doesn't always cut it.
> - if that fails, then turn jit-lock back on, do M-x trace-function-background
>   RET font-lock-fontify-region RET, and then try and reproduce the
>   problem (try and be careful to make sure font-lock is only invoked in
>   that one buffer during this time).
> - if the trace itself doesn't give you enough of a hint (that's usually
>   the case, but sometimes, just seeing where jit-lock placed the
>   boundaries of its chunks is enough to see the problem), then turn off
>   jit-lock again, and call font-lock-fontify-region by hand with the
>   args recorded in the trace.  You can then use Edebug to your heart's
>   content during this replay.
>   I haven't had to do that often enough and with enough calls to
>   font-lock-fontify-region to get me to automate this replay, but if you
>   end up writing some code to automate it, I'd be happy to add it to
>   jit-lock.
> - if the above replay does not reproduce the problem, then you may want
>   to try meditation.


>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]