From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Same file on two buffers - Two different major modes Date: Wed, 04 Nov 2020 13:08:32 +0100 Message-ID: <87v9elgw8v.fsf@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35368"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.6; emacs 27.1.50 Cc: help-gnu-emacs@gnu.org To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 04 13:09:03 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 1kaHb5-00096r-PO for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Nov 2020 13:09:03 +0100 Original-Received: from localhost ([::1]:38908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaHb4-0005cF-QA for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Nov 2020 07:09:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaHaj-0005c2-RO for help-gnu-emacs@gnu.org; Wed, 04 Nov 2020 07:08:41 -0500 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:45109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaHah-00079u-Hn for help-gnu-emacs@gnu.org; Wed, 04 Nov 2020 07:08:41 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id BEFEEB86; Wed, 4 Nov 2020 07:08:36 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 04 Nov 2020 07:08:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm1; bh=TkuJbJEBaG5QKp7mMJrFl2VgK7 7asrggs4kGcHmwn8k=; b=o9iKOScw4psLtGcGhp2gQphJ7bipv4zSkMwRl9ckuT vOk+Y8JgCqX2gmUORI7oPzoJVWrbwuHyYqcfw2xzKPEp6TBPk91BtRR5uEkb8loV C3TRowWfJBiVX8yezPZhckaR39gVSIVxeXt+9p7aUcyqCJj5GI2nvrgtPz49G35B DY6+8oNA6y7avIKun+iAUJFyhmQkKM7oZt/XrIZEgRYsvYx9AkDB0Lpa8LbxEVwW osZ8/VIP9SAKItaX6ZVkehvfVSV4RFUHBnsDJ18BJykcBVzCV4oy802si8uUDGRS vT2wtEJbLsU5BFI6Oh2WGf4fNhqGFJsddyLWB9UItOaA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=TkuJbJ EBaG5QKp7mMJrFl2VgK77asrggs4kGcHmwn8k=; b=OdJDY7EZXIYOESzDD9cQgk R1YvmrJhdB7yNycn+ynZNYXngTVlhRs8EopGpezRZzj9VlooYtUINTZTHhYP/hnQ hMvP2GoYxjUnUESgcaoq9Wm8KCiPKVE4v492OC+SnzeqTFSodppnO+zcd4Ft6K4w f32sdOH98HNauU9xTr0+jV7KSefriKqN7lsFtKC3TcuNRzvrxu2pwgvikHD1o7Us XnGHwldzAAXSV17oLVxSQyCYzMQrpimLwV3Fv9/++THEaCwBgAtkjf5qTqE+DMYQ X0SfyuQlckNncWznTjwHQHgjaYG6aaBZEMJzIFkBSsavzjG6zZfStg6DnWlpyCHw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddthedgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufgjfffkgggtsehttdertddtredtnecuhfhrohhmpeflohhoshht ucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghilhdrfhhmqe enucggtffrrghtthgvrhhnpefhudffuefhudelhffgleeukeegudevtedtudduhfefteeu gedvvedtuddugffffeenucfkphepleehrdeltddrvddvgedrvdeffeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhoshhtkhhrvghmvghr shesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: from Swift.fastmail.com (ip5f5ae0e9.dynamic.kabel-deutschland.de [95.90.224.233]) by mail.messagingengine.com (Postfix) with ESMTPA id 863AB3280390; Wed, 4 Nov 2020 07:08:35 -0500 (EST) In-reply-to: Received-SPF: pass client-ip=64.147.123.21; envelope-from=joostkremers@fastmail.fm; helo=wout5-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 05:22:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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:124987 Archived-At: 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 think you can have two buffers visiting the same file, because visiting a file first checks if the file is already being visited. As pointed out by others, you could use an indirect buffer, but that's not a perfect solution, because it messes up font lock (apparently among other things). -- Joost Kremers Life has its moments