I just noticed that 1.4cvs mbox is defunct and there is no easy way to revive it, at least not using LyXText as main container and the math factory as creator as the former requires a BufferView for construction whereas the latter one has none available.
The real problem is a more general one: We do not have a buffer-agnostic way for stringification and de-stringification of parts of a buffer. This is bad as it complicates matters (it works fine e.g. for plain math, so undo can use a stringified version instead of storing complicated structres like parts of a paragraph list, S&R can work on stringified structures instead n structures themselves etc). Moreover, it does not seem to be needed technically. So why is that buffer-agnostic stringification not there? Andre'