[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Same file on two buffers - Two different major modes
From: |
Joost Kremers |
Subject: |
Re: Same file on two buffers - Two different major modes |
Date: |
Wed, 04 Nov 2020 13:08:32 +0100 |
User-agent: |
mu4e 1.5.6; emacs 27.1.50 |
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
Re: Same file on two buffers - Two different major modes, Jean Louis, 2020/11/04
Re: Same file on two buffers - Two different major modes, Marcin Borkowski, 2020/11/04