From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Same file on two buffers - Two different major modes Date: Wed, 4 Nov 2020 13:30:18 +0100 Message-ID: References: <87v9elgw8v.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18794"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Joost Kremers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 04 13:32:22 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kaHxe-0004m7-CQ for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Nov 2020 13:32:22 +0100 Original-Received: from localhost ([::1]:45588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaHxd-000482-7k for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Nov 2020 07:32:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaHvm-00047s-Hj for help-gnu-emacs@gnu.org; Wed, 04 Nov 2020 07:30:26 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:35609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaHvj-0001MC-Ra for help-gnu-emacs@gnu.org; Wed, 04 Nov 2020 07:30:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604493018; bh=UNcmgudCsExhlbwyonzWyFlcd4eWsybEgDN0wEfwT40=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=VsRPENKuWV3CpCIGzalAqXStTBakT5GKOslIG0QDEn83jwlxZfS9ODSTsdowCQSqD X8vpa+GPRb7Jk/suExt8ZvL9NiNNc2QLqSEIH3KHVjJ6VuSrYsuKikZsuR4QCO1v7Y a7voeeOyK+CLFaMV7yO0EnizAQNpjG7jC0vS4Px8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs01.server.lan [172.19.170.58]) (via HTTP); Wed, 4 Nov 2020 13:30:18 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87v9elgw8v.fsf@fastmail.fm> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:VZYouj5q7pZUONOHibLvcQ7sEcavPmvBqbGGjPXWLJhtmvAKefRtxr9Su08IefiTSmIOW 34Qm7d2oiMGVaWpfKZ8Tt3p9QKIHqsERtwO4XBR323thqS2+N53dtkN9IY3+RzmeJteVxbAPHY6l PUsjzyd/ikfdVxDXvK2Sy2WY63M4ldy2K8GSU2/WMuMPW29e04fLVxdB545yn+iDINatruOeg0du TKpKkTd3Ujnb6heCWm0yKjDslxUloUwYg2gufXwlw0NWKVaUcet0LQeJSVzVEobHVzJs5bcZjlvP L8= X-UI-Out-Filterresults: notjunk:1;V03:K0:RLhnl349LPA=:epEf2NYAvAy1Rngl2rQeLa fNfZbj7Y/oQ1G6ZbRDtoyWui2hyCM5Ye4EVPCeB0zlxjqquD2UwXZN693RMMM3S28TPvQriHv mxOKFZrmfPvX/Pby57GcC0SAatK9FX9c3DDWg2rjk2XW3RtnhDuwHe+stwCTX8z/gYjGAHbTF Kg+atrJaT1ekLcDCXhmrmg6tBZJPXElQRYQbT3mi2ZLu0kC+kGDGQBuIpDwblu1RitFY39pCH 9hnt7ssGkLD4Xegti+vO1ZZXjW6M909TNcFt8g/XKO58gbe2yxC9IpX8fKVFnvTnTphbv4XvF fm/tKUO3a6333GQj9/YIdaHewd4Ws7ShX+aETd6zsJSPFYe2fpA+r9lDCiefxNnOi08RR/CAH 1qimyRY+XeH+OOYpvDEz7VojwaAJ1y2dK5n/ZcnN0W37jOkaH6JdQtiaWajmqr3PE/I66iVQL VfS0QkkxVXIzdWkHknZf+Hyh4kK/S5IO1xSwNHRzDSxNcr+UjO8UyB+q3V8aWmhpA0/Tgp/G+ /lx9dctMZetVlHmgOVO0hG3I89h48V61285O7/oXtf/sSgs/Qyg+0oYfO8NSt8s1Qg2VHaWy0 8e8c0ITsInn4M= Received-SPF: pass client-ip=212.227.17.20; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 07:30:21 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124988 Archived-At: Se you get a shitty buffer! Is there a need for a fix? The principal idea is to have the same buffer next to each other, where one can change the major mode on each buffer, but saves to the save buffer. > Sent: Wednesday, November 04, 2020 at 1:08 PM > From: "Joost Kremers" > To: "Christopher Dimech" > Cc: help-gnu-emacs@gnu.org > Subject: Re: Same file on two buffers - Two different major modes > > > On Wed, Nov 04 2020, Christopher Dimech wrote: > > Can one have two buffers of the same file, next to each other, > > but in different modes. When I change one buffer, the major mode > > of the other is changing automatically. > > You probably have two *windows* displaying the *same* buffer. I don't th= ink you > can have two buffers visiting the same file, because visiting a file fir= st > checks if the file is already being visited. > > As pointed out by others, you could use an indirect buffer, but that's n= ot a > perfect solution, because it messes up font lock (apparently among other > things). > > -- > Joost Kremers > Life has its moments >