From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Peter Lee Newsgroups: gmane.emacs.help Subject: Re: Modes within modes Date: Fri, 07 Nov 2003 20:52:11 GMT Organization: ~ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068239162 18048 80.91.224.253 (7 Nov 2003 21:06:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2003 21:06:02 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 07 22:05:55 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AIDnm-00065j-01 for ; Fri, 07 Nov 2003 22:05:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AIEhh-00074E-08 for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Nov 2003 17:03:41 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:28Uq3+eLyMo/gT/UPPjuqzOkrLE= Original-Lines: 21 Original-NNTP-Posting-Host: 216.62.199.3 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: newssvr11.news.prodigy.com 1068238331 ST000 216.62.199.3 (Fri, 07 Nov 2003 15:52:11 EST) Original-NNTP-Posting-Date: Fri, 07 Nov 2003 15:52:11 EST X-UserInfo1: Q[R_PJONEJW[STT^BJJNOFXBBZ\LPCXLLBWLOOAFBATBTSUBYFWEAE[YJLYPIWKHTFCMZKVMB^[Z^DOBRVVMOSPFHNSYXVDIE@X\BUC@GTSX@DL^GKFFHQCCE\G[JJBMYDYIJCZM@AY]GNGPJD]YNNW\GSX^GSCKHA[]@CCB\[@LATPD\L@J\\PF]VR[QPJN Original-Xref: shelby.stanford.edu gnu.emacs.help:117988 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:13927 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13927 >>>> Gareth Rees writes: Gareth> The simplest way to do this is to use Gareth> 'clone-indirect-buffer' (C-x 4 c) and use A-mode in the Gareth> original buffer and B-mode in the cloned buffer. Put the Gareth> two buffers in adjacent windows and switch between them Gareth> when you want the features of the other mode. See the Gareth> Info node (emacs)Indirect Buffers. This method seems to partially work. I can clone an html buffer (in html mode) and switch to the cloned buffer and issue M-x text-mode. The modes are correct for each buffer however they seem to share fontification. So if I do M-x font-lock-fontify-buffer while in the text-mode buffer I see the changes in both. Same if I issue the command in the html-mode buffer... the text-mode buffer then gets fontified for html. I'm using cvs, so perhaps it's just my version. If this is a known limitation of clone-indirect however, then it wouldn't be as useful a method for multiple modes (at least for me).