all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joost Kremers <joostkremers@fastmail.fm>
To: Christopher Dimech <dimech@gmx.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Same file on two buffers - Two different major modes
Date: Wed, 04 Nov 2020 13:08:32 +0100	[thread overview]
Message-ID: <87v9elgw8v.fsf@fastmail.fm> (raw)
In-Reply-To: <trinity-363caf4f-594c-4560-b863-6a2bdeb5cacb-1604489820387@3c-app-mailcom-bs01>


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



  parent reply	other threads:[~2020-11-04 12:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 11:37 Same file on two buffers - Two different major modes Christopher Dimech
2020-11-04 11:52 ` Philipp Stephani
2020-11-04 11:57   ` tomas
2020-11-04 11:55 ` tomas
2020-11-04 12:08 ` Joost Kremers [this message]
2020-11-04 12:30   ` Christopher Dimech
2020-11-04 21:40     ` Drew Adams
2020-11-04 21:47       ` Christopher Dimech
2020-11-04 22:16         ` Drew Adams
2020-11-05  0:50         ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-04 12:30 ` Jean Louis
2020-11-04 21:18 ` Marcin Borkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9elgw8v.fsf@fastmail.fm \
    --to=joostkremers@fastmail.fm \
    --cc=dimech@gmx.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.