2009/6/24 Carsten Dominik > > On Jun 24, 2009, at 11:41 AM, Nicolas Girard wrote: > > 2009/6/24 Carsten Dominik >> Could you guys please first explain the >> >> >> ;; This part is buggy (sorry) >> >> comment in the patch? >> >> Err... this just reflects my current lack of expressiveness in elisp... >> don't make me blush :-/ >> > > I am not complaining, no need to blush. > > The patch looks good. It does not add any hooks though, it > moves some of the font-lock functionality into special functions > that will then be overwritten by the org-icons package. Actually I tried to mimic the already existing code, e.g. org-font-lock-add-priority-faces. > A bit of > a brute force approach, but it may actually be the right thing > for this purpose. I'm unsure it's the best approach either. I'm wondering that all these (while (re-search-forward)) could slow things down. I'm not sure I fully understand the font-locking code, but it seems like it performs several -- possibly many -- regexp searches on one part of the buffer, alternatively adding or removing text properties, right ? I'm just wondering, could this be rewritten as one or several state machines, that would trigger text properties addition/removal only once for a given part of the buffer ? > > > I think I can easily apply the patch - I even like the fact that > it cleans up the font locking a bit and moves stuff into functions. > > But if this patch is preliminary, keep working on it and give me > a more complete version when done. Well, thanks for your support ! By the way, you didn't give your opinion on using icons yourself. Please confess us, are you a text-only addicted kind of guy, or a flashy, glossy icons amateur...? Nicolas