From: Ihor Radchenko <yantar92@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dim1212k@gmail.com, adam@alphapapa.net, casouri@gmail.com,
emacs-devel@gnu.org
Subject: Re: Request for pointers and advice: displaying several buffers inside a single window
Date: Sat, 11 Apr 2020 03:34:30 +0800 [thread overview]
Message-ID: <87h7xrxhh5.fsf@localhost> (raw)
In-Reply-To: <837dynm9yb.fsf@gnu.org>
> 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 <eliz@gnu.org> writes:
>> From: Ihor Radchenko <yantar92@gmail.com>
>> Cc: casouri@gmail.com, dim1212k@gmail.com, adam@alphapapa.net,
>> emacs-devel@gnu.org
>> 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: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg
next prev parent reply other threads:[~2020-04-10 19:34 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 11:54 Request for pointers and advice: displaying several buffers inside a single window Dmitrii Korobeinikov
2020-04-03 13:07 ` Eli Zaretskii
2020-04-04 22:44 ` Dmitrii Korobeinikov
2020-04-05 14:08 ` Adam Porter
2020-04-05 22:55 ` Dmitrii Korobeinikov
2020-04-10 14:45 ` Yuan Fu
2020-04-10 15:35 ` Ihor Radchenko
2020-04-10 16:43 ` Eli Zaretskii
2020-04-10 17:46 ` Ihor Radchenko
2020-04-10 18:07 ` Eli Zaretskii
2020-04-10 18:37 ` Ihor Radchenko
2020-04-10 19:01 ` Drew Adams
2020-04-10 19:19 ` Ihor Radchenko
2020-04-10 20:29 ` Drew Adams
2020-04-11 8:11 ` Ihor Radchenko
2020-04-11 17:23 ` Drew Adams
2020-04-12 2:42 ` Richard Stallman
2020-04-12 5:09 ` Drew Adams
2020-04-12 5:15 ` Drew Adams
2020-04-13 2:21 ` Richard Stallman
2020-04-13 5:23 ` Drew Adams
2020-04-12 23:54 ` Juri Linkov
2020-04-13 5:23 ` Drew Adams
2020-04-12 14:25 ` Ihor Radchenko
2020-04-12 16:38 ` Drew Adams
2020-04-10 19:12 ` Eli Zaretskii
2020-04-10 19:25 ` Ihor Radchenko
2020-04-10 19:34 ` Ihor Radchenko [this message]
2020-04-11 7:34 ` Eli Zaretskii
2020-04-11 8:35 ` Ihor Radchenko
2020-04-11 9:25 ` Eli Zaretskii
2020-04-10 19:09 ` Dmitrii Korobeinikov
2020-04-11 0:05 ` chad
2020-04-11 8:22 ` Eli Zaretskii
2020-04-11 7:30 ` Eli Zaretskii
2020-04-11 7:56 ` Dmitrii Korobeinikov
2020-04-11 8:26 ` Eli Zaretskii
2020-04-11 10:01 ` Dmitrii Korobeinikov
2020-04-03 18:30 ` [SPAM UNSURE] " Stephen Leake
2020-04-05 13:18 ` Robert Pluim
2020-04-05 20:35 ` Dmitrii Korobeinikov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h7xrxhh5.fsf@localhost \
--to=yantar92@gmail.com \
--cc=adam@alphapapa.net \
--cc=casouri@gmail.com \
--cc=dim1212k@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.