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 03:34:30 +0800

> And what do you suggest to do with the gap?

This is where the buffer text is stored internally right? I think a
"segment" may as well refer to a substring from the gap. In the simplest
case the list of "segments" would contain a single element referring to
the whole gap. Then, if one adds another "segment", the list will hold 3
elements: (<segment from beginning of the gap to pos> <added segment>
<segment referring to the remaining part of the gap>).

Eli Zaretskii <address@hidden> writes:

>> From: Ihor Radchenko <address@hidden>
>> Cc: address@hidden, address@hidden, address@hidden,
>>  address@hidden
>> 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.
>
> So there's one more parameter, in addition to the offset?
>
>> > 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.
>
> Sounds like a thorough surgery of all the low-level functions that
> handle insertion, deletion, replacement etc.
>
> And what do you suggest to do with the gap?

-- 
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]