[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help in writing function to pop indirect buffer
From: |
Luca Ferrari |
Subject: |
Re: help in writing function to pop indirect buffer |
Date: |
Mon, 30 Jan 2023 14:30:10 +0100 |
On Sat, Jan 28, 2023 at 12:51 PM Bruno Barbier <brubar.cs@gmail.com> wrote:
> In your use case, it might not be possible to use indirect buffers: the
> base buffer and the indirect buffer share the same text and its
> properties, and, syntax highlighting is mostly done using text
> properties.
>
Gosh!
I've tested that if I enable cperl-mode in the original buffer, then
the indirect buffer inherits the syntax highligthing also for new
code.
> Org mode allows to edit pieces of text in any mode (using standard buffers).
> The lisp function doing most of the work is `org-edit-src-code'. Maybe
> you could call/reuse something from there.
It is a little too complex for me to understand it.
Another idea could be to use a normal buffer, narrowed to the region I
would like to have. The problem is that clone-buffer cannot be used
for a file visiting buffer.
Any idea?
Thanks,
Luca
Re: help in writing function to pop indirect buffer, Jean Louis, 2023/01/28