From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@newcastle.ac.uk (Phillip Lord) Newsgroups: gmane.emacs.help Subject: indirect-buffers and text-properties Date: Thu, 30 Jan 2014 12:29:07 +0000 Message-ID: <87fvo5r6uk.fsf@newcastle.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1391084976 9164 80.91.229.3 (30 Jan 2014 12:29:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jan 2014 12:29:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 30 13:29:44 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W8qkY-0004Ca-EG for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jan 2014 13:29:42 +0100 Original-Received: from localhost ([::1]:48266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8qkX-0001hd-Ud for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jan 2014 07:29:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8qkA-0001Ze-VN for help-gnu-emacs@gnu.org; Thu, 30 Jan 2014 07:29:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8qk5-0005gm-0c for help-gnu-emacs@gnu.org; Thu, 30 Jan 2014 07:29:18 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:50731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8qk4-0005gi-RJ for help-gnu-emacs@gnu.org; Thu, 30 Jan 2014 07:29:12 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129]) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1W8qk1-0002k4-EU for help-gnu-emacs@gnu.org; Thu, 30 Jan 2014 12:29:09 +0000 Original-Received: from localhost (jangai.ncl.ac.uk [10.66.67.223]) (authenticated bits=0) by smtpauth-vm.ncl.ac.uk (8.13.8/8.13.8) with ESMTP id s0UCT9Zf031596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 30 Jan 2014 12:29:09 GMT User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95793 Archived-At: 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