emacs-devel
[Top][All Lists]
Advanced

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

Re: Request for pointers and advice: displaying several buffers inside a


From: Ihor Radchenko
Subject: Re: Request for pointers and advice: displaying several buffers inside a single window
Date: Sat, 11 Apr 2020 02:37:13 +0800

> So a "segment" is a part of buffer text that starts from some offset,
> and then goes on until the end of the buffer text?  IOW, the beginning
> is different, but the end is the same?

I would rather say that "segment" is a text between two markers in an
arbitrary buffer. Just like narrowing.

> If so, how is this different from narrowing in indirect buffers that
> we have now?

The difference is that text in a single buffer must not always be coming
from a single buffer (possibly narrowed), but can as well be a list of
"segments". Instead of storing all the buffer text in a single char
array, the buffer text could be represented by a list of "segments". In
a normal buffer, this list will just contain a single element pointing
to the buffer's char array containing its text. However, the list can be
extended with "segments" from other buffers.


Eli Zaretskii <address@hidden> writes:

>> From: Ihor Radchenko <address@hidden>
>> Cc: address@hidden, address@hidden, address@hidden,
>>  address@hidden
>> Date: Sat, 11 Apr 2020 01:46:59 +0800
>> 
>> > I don't think I understand what you mean by "segments of text".
>> > Buffer text is just a long C array of 'char' in Emacs.
>> 
>> I mean that buffer text in indirect buffer is a pointer to the first
>> element of the C array containing the text in master buffer (or
>> something similar). Similarly, the pointer can be created to nth element
>> of array. Thus, "segment" of text starting from some non-zero position
>> in the master buffer can be automatically synchronised with the master
>> buffer. 
>
> So a "segment" is a part of buffer text that starts from some offset,
> and then goes on until the end of the buffer text?  IOW, the beginning
> is different, but the end is the same?
>
> If so, how is this different from narrowing in indirect buffers that
> we have now?

-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong 
University, Xi'an, China
Email: address@hidden, address@hidden



reply via email to

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