From: Luca Ferrari <fluca1978@gmail.com>
To: Bruno Barbier <brubar.cs@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>, Jean Louis <bugs@gnu.support>
Subject: Re: help in writing function to pop indirect buffer
Date: Mon, 30 Jan 2023 14:30:10 +0100 [thread overview]
Message-ID: <CAKoxK+55wu8bnBk_kVLFnrOd_CYD5JWNYYg5u3xSWS-M-hH=Bw@mail.gmail.com> (raw)
In-Reply-To: <63d50c2c.5d0a0220.cad7c.0cb0@mx.google.com>
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
next prev parent reply other threads:[~2023-01-30 13:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 11:13 help in writing function to pop indirect buffer Luca Ferrari
2023-01-25 17:55 ` Jean Louis
2023-01-26 6:45 ` Emanuel Berg
2023-01-27 18:30 ` Bruno Barbier
[not found] ` <notmuch-sha1-03eb8baf922f469fd287c8e7e6f142e660e155d3>
2023-01-28 11:59 ` Bruno Barbier
2023-01-30 13:30 ` Luca Ferrari [this message]
2023-01-30 18:38 ` Bruno Barbier
2023-01-31 7:36 ` Jean Louis
2023-09-07 12:53 ` Luca Ferrari
2023-01-28 13:20 ` Jean Louis
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKoxK+55wu8bnBk_kVLFnrOd_CYD5JWNYYg5u3xSWS-M-hH=Bw@mail.gmail.com' \
--to=fluca1978@gmail.com \
--cc=brubar.cs@gmail.com \
--cc=bugs@gnu.support \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).