Subject: Re: bug#73663: 29.4; indirect-buffer behaviour is not correct

From: Michael Heerdegen <[email-masked]>
Date: Tue, 08 Oct 2024 00:49:50 +0200

PENG Kevin <[email-masked]> writes:

> The text of the indirect buffer is always identical to the text of its
> base buffer; changes made by editing either one are visible
> immediately in the other. “Text” here includes both the characters and
> their text properties.

`image-mode' uses text properties to display the image!  Most major
modes use text properties to font-lock the buffer and change the way how
its contents are displayed.

Use cases of indirect buffers are limited, maybe we need to warn more
explicitly that their usefulness is very restricted.  IIRC, having
indirect and base buffer using different major modes is something that
was never supported.

>From the past discussions about the matter I also recall that the
limitations are lying in the concept and we can't do much here without a
reimplementation of the idea.

So I would suggest to rather think about how to get what you want
without using indirect buffers.

Michael.