"David O'Toole" writes: > I've got a preliminary patch that adds optional "native" fontification > for source blocks. It uses the block's declared mode to fontify the > block text. So now blocks look the way they should, and this opens the > way to further enhancements. I've tested David's patch, and made some additions. It's really nice to have fontified code in the Org buffer. It's not that smooth when editing code in the Org buffer, but there seems to be no easy way round that (happy to be proved wrong). In the continued absence of an alternative, I think we should consider adding this. I've prepared a patch which does the following: - David's original patch - Extend regexp to match full Org code src block syntax - I've moved the fontification code out into a separate function - I've provided a standalone manual fontification function `org-src-fontify-block'. On my system, I have not managed to eliminate some point movement during fontification. This occurs because of the heavy-duty method of fontification (delete the code, re-insert fontified code generated in a separate buffer). On the other hand, Org users are not really encouraged to *edit* code in the Org buffer, and the slightly clunky fontification is only experienced by those who go against that. David's variable `org-src-fontify-natively' determines whether font-lock automatically fontifies code blocks. Even if that variable is nil, it is still possible to call `org-src-fontify-block' for manual fontification. Buffer movement is especially problematic with org-indent-mode. Patch against master attached, and also in branch org-src-fontification at git@github.com:dandavison/org-devel.git.