> > With the latest master, the fontification gets completely broken. > > IDK if it is related to this specific patch, but I got the following > redisplay backtrace. > > Note that org-element--parse-objects has the following: > >   (save-excursion >     (save-restriction >       (narrow-to-region beg end) >       (goto-char (point-min)) >       (let (next-object contents) > (while (and (not (eobp)) >    (setq next-object (org-element--object-lex restriction))) > > The infinite recursion did not happen on the same Org file in the past. > So, it is not an issue with logic. Most likely, there is something about > narrowing/point movement that is very wrong on Emacs master. > I'm puzzled, you tried the patch and said it improved fontification? Can you try to revert 1c837c42c2 and see if it works again? Or can you provide (privately if necessary) an example file with which that error is triggered?