emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Buffers with buffers (transclusion)


From: Vladimir Kazanov
Subject: Buffers with buffers (transclusion)
Date: Tue, 15 Oct 2024 14:53:44 +0100

Hi all,

Recently I got interested in the best way to share text between buffers.

This is very useful, and was discussed a bunch of times in the past
(https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00141.html,
https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00863.html).
There's also a nice overview of these discussions on Github:
https://github.com/alphapapa/transclusion-in-emacs.

My personal interest was sparkled by a prototype of a tool I published
recently (https://github.com/vkazanov/chunk-edit) that makes it
possible to edit multiple buffers from within a single host one.

I would love some advice on what approach Emacs maintainers might be
interested in. Here's are the ideas I have going from easy to hard:

1. Just track and copy all buffer edits using, say, overlay hooks.
This is what I did in chunk-edit.el. The problem with this approach is
inefficiency and brittleness.

2. Introduce indirection on the deepest possible level, e.g., come up
with something like composite buffers (buffers consisting of multiple
buffers), or make buffers use segments internally.

3. Make the iterator in xdisp.c understand a new display spec -
(display . buffer), which would make it possible to display external
buffers within the current buffer. From what I see right now (xdisp.c
is not the easiest piece of code), this would make the text not
editable and is not the same use-case I had in mind but might open up
a bunch of  interesting capabilities.

Did anybody look into something like this recently? Any
comments/ideas/guidance would be great.

--
Regards,

Vladimir Kazanov



reply via email to

[Prev in Thread] Current Thread [Next in Thread]