How to highlight a file inserted with <include ...> ?

If you want to include and highlight for example the ../plugins/stog_disqus.ml file relative to your project directory, you can try ]]> but this will only result in

This is because <hcode...> is evaluated immediately, displaying its children nodes. What you need is to defer the evaluation of <hcode...>, using the special defer_ attribute: ]]> This will give the expected result:

The defer_ attribute is decremented each time the node should be evaluated. So the first time, the value is 1, so the children are evaluated first, then the <hcode> node is returned with a defer_ attribute decremented, i.e. 0, and with the result of <include ...> as children. During the next evaluation, the <hcode> is evaluated and it now highlights its children, that is the contents of the included file.

defer_ can take values greater than 1, if you need to nest deferred evaluations.