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: Sat, 11 Apr 2020 10:34:08 +0300 Message-ID: <831roumq6n.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> <837dynm9yb.fsf@gnu.org> <87h7xrxhh5.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="128358"; 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 Sat Apr 11 09:35:04 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 1jNAfQ-000XHe-5d for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 09:35:04 +0200 Original-Received: from localhost ([::1]:49636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNAfP-0007xq-8S for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 03:35:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60900) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNAem-0007Xb-CH for emacs-devel@gnu.org; Sat, 11 Apr 2020 03:34:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jNAem-000204-4O; Sat, 11 Apr 2020 03:34:24 -0400 Original-Received: from [176.228.60.248] (port=2233 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jNAek-0008A9-R5; Sat, 11 Apr 2020 03:34:23 -0400 In-Reply-To: <87h7xrxhh5.fsf@localhost> (message from Ihor Radchenko on Sat, 11 Apr 2020 03:34:30 +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:246820 Archived-At: > From: Ihor Radchenko > Cc: casouri@gmail.com, dim1212k@gmail.com, adam@alphapapa.net, > emacs-devel@gnu.org > 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? That's not the definition I'd use. The gap is a way of making text insertion less expensive. If you insert characters one by one, each insertion needs to move the characters after the insertion point, which is expensive. Having the gap allows us to perform this movement only after relatively large amounts of text were inserted; for smaller insertions we just make the gap smaller. > 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: ( > ). My question was how you handle insertion in a segment? Move the gap to the segment, or have a separate gap for each segment?