emacs-devel
[Top][All Lists]
Advanced

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

Re: Buffers with buffers (transclusion)


From: Vladimir Kazanov
Subject: Re: Buffers with buffers (transclusion)
Date: Thu, 17 Oct 2024 14:24:10 +0100

Eli,

Thanks, almost convinced and this might be the last question on the
topic I have.

Either way, I'll summarize the discussion, my findings and conclusions
in an email that would wrap up the thread - just for future reference.

> Making the display engine show several buffers is actually very easy,
> technically.  By contrast, the problems I mentioned above are much
> harder, especially since it is not clear conceptually what the
> solutions should be.

So here's the final idea I had. Let's say we introduce a special kind
of relationship between pairs of buffers - a "sync pipe". An example:

(create-sync-pipe left-buffer right-buffer left-beg &optional left-end
right-beg right-end properties bidirectional)

This creates a connection that pushes all changes in one buffer to the
other, and vice versa. Might be limited to certains buffer regions
using (LEFT-BEG LEFT-END), (RIGHT-END, RIGHT-END) regions. Setting
PROPERTIES to (t) would also sync text properties, and BIDIRECTIONAL
means that changes go both ways.

The function will return a special C-level object that can be deleted
with (delete-pipe pipe).

PROPERTIES can be either t, nil or a a list of properties to sync. In
fact, being able to efficiently sync text and properties between
region is already 70% to what I had in mind.

Would you be open to reviewing such a patch?

Thank you

-- 
Regards,

Vladimir Kazanov



reply via email to

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