Subject: bug#14328: buffer cloned with clone-indirect-buffer is refontified with the source, when switching mode

From: Dmitry Gutov <[email-masked]>
Date: Fri, 10 May 2013 00:04:52 +0400

Stefan Monnier <[email-masked]> writes:

>> I discovered it when trying to edit an MSBuild file (that's a MSVS
>> project).  It is normally an XML, but you can use some C# inside to write
>> inline tasks, so I wanted to have a buffer that highlights C# code on one
>> side and XML on the other side.
>
> Right, good'ol' multi-major-mode problem.
> Using indirect-buffers with it just adds a new problem onto the other.
>
> I don't think we have a good answer yet :-(

mmm-mode (https://github.com/purcell/mmm-mode) should work well enough
for this purpose, all indirect-buffer munging is hidden from the user.