unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* indirect-buffers and text-properties
@ 2014-01-30 12:29 Phillip Lord
  2014-01-30 13:27 ` Stefan Monnier
  0 siblings, 1 reply; 13+ messages in thread
From: Phillip Lord @ 2014-01-30 12:29 UTC (permalink / raw)
  To: help-gnu-emacs



I've been playing with indirect buffers which I have managed to ignore
for many years, and finding them very useful for a variety of things.

One property that seems very useful is that they can be in different
major modes, while still sharing the same contents. This strikes me as a
particularly useful property of indirect buffers which I would like to
experiment with.

One problem, however, is that as well as the text, indirect buffers
share the text-properties; so anything based on text-properties is
shared. The most notable example here is fontification; syntax
highlighting is the same in the two buffers regardless of major mode.
So, for example, if you have a lisp-mode buffer with an latex-mode
indirect buffer, the lisp-mode buffer looks like latex mode (for reasons
I haven't worked out yet, auctex seems to win most of the time,
regardless of which is direct and which is indirect).

I had a quick look at the code, and this doesn't appear to be
deliberate, but rather a by-product of copying the text; although, given
that my knowledge of C is basically zero, this is pure guess work.

So, question, anyone know why the text-properties get shared with
indirect-buffers and is it possible to stop?

Phil



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-01-31 16:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-30 12:29 indirect-buffers and text-properties Phillip Lord
2014-01-30 13:27 ` Stefan Monnier
2014-01-30 14:13   ` Phillip Lord
2014-01-30 15:03     ` Stefan Monnier
2014-01-30 15:45       ` Phillip Lord
2014-01-30 16:17         ` Stefan Monnier
2014-01-31  9:52           ` Phillip Lord
2014-01-31 13:35             ` Stefan Monnier
2014-01-31 16:12               ` Phillip Lord
2014-01-30 15:33   ` Andreas Röhler
2014-01-30 15:36     ` Nicolas Richard
2014-01-30 16:43       ` Andreas Röhler
2014-01-31  9:46         ` Phillip Lord

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).