[ESS] `font-lock-pre-idle-hook': Error message any time I type in xemacs

Brian Diggs diggsb at ohsu.edu
Tue Mar 23 18:11:56 CET 2010

On 3/22/2010 3:02 PM, Rodney Sparapani wrote:
> On 03/22/10 04:54 PM, Brian Diggs wrote:
>> Well, the -q option causes it to not load your init.el. I tried making a
>> minimal init.el with only
>> (require 'ess-site)
>> in it, as per
>> http://ess.r-project.org/Manual/readme.html#Microsoft-Windows-installation 
>> and got the same warnings (staring without the -q or -no-site-file
>> option). There must be something in your init.el file that gets ESS
>> fonts configured correctly. What do you have in your init.el that is ESS
>> related?
> It's not coming from init.el.  It is coming from ess-roxy.el.  For 
> example, if you edit ess-roxy.el to just contain (provide 'ess-roxy)
> then the warning goes away (but you will get a new error that is pretty 
> harmless; boy is that progress or what?).  Here is
> the function which shows where the error condition comes from...
> (defun font-lock-pre-idle-hook ()
>   (condition-case font-lock-error
>       (if (> (hash-table-count font-lock-pending-buffer-table) 0)
>       (font-lock-fontify-pending-extents))
>     (error (warn "Error caught in `font-lock-pre-idle-hook': %s"
>          font-lock-error))))
> ; called when any modification is made to buffer text.  This function
> ; remembers the changed ranges until the next redisplay, at which point
> ; the extents are merged and pruned, and the resulting ranges fontified.
> ; This function could easily be adapted to other after-change-functions.
> I have never even heard of this function before so something must be
> going wrong at a fairly early level in the fontlocking process.
> Rodney

I had seen that function, but it didn't help me understand where the 
error was coming from.  Or, at least, I could not figure out what in 
font-lock-fontify-pending-extents was really throwing the error which 
was caught and printed in font-lock-pre-idle-hook.

Your comment about ess-roxy lead me to my current workaround.  I 
commented out

(add-hook 'ess-mode-hook 'ess-roxy-mode)

in ess-site.el.  Since I don't use Roxygen, I won't miss the 
functionality of that minor mode, and the warning goes away.  I don't 
know if the problem is in ess-roxy.el or whether that is just tickling a 
bug elsewhere, but I don't have any motivation to track this any further 
a this time.

Thanks for your help, Rodney.

Brian Diggs
Senior Research Associate, Department of Surgery, Oregon Health & 
Science University

More information about the ESS-help mailing list