From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Request for pointers and advice: displaying several buffers inside a single window Date: Fri, 10 Apr 2020 22:12:28 +0300 Message-ID: <837dynm9yb.fsf@gnu.org> References: <83a73swwd7.fsf@gnu.org> <87wo6nxsjz.fsf@localhost> <83d08fmgul.fsf@gnu.org> <87tv1rxmgc.fsf@localhost> <83a73jmcyo.fsf@gnu.org> <87pncfxk4m.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="60420"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dim1212k@gmail.com, adam@alphapapa.net, casouri@gmail.com, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 10 21:13:18 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMz5a-000Fcd-Pi for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 21:13:18 +0200 Original-Received: from localhost ([::1]:38032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMz5Z-0000pW-Sc for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 15:13:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60200) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMz55-00008m-Oi for emacs-devel@gnu.org; Fri, 10 Apr 2020 15:12:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jMz55-00033H-7a; Fri, 10 Apr 2020 15:12:47 -0400 Original-Received: from [176.228.60.248] (port=1062 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jMz53-0006bq-Pt; Fri, 10 Apr 2020 15:12:47 -0400 In-Reply-To: <87pncfxk4m.fsf@localhost> (message from Ihor Radchenko on Sat, 11 Apr 2020 02:37:13 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246795 Archived-At: > From: Ihor Radchenko > 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?