From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Request for pointers and advice: displaying several buffers inside a single window Date: Sat, 11 Apr 2020 03:34:30 +0800 Message-ID: <87h7xrxhh5.fsf@localhost> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="38257"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dim1212k@gmail.com, adam@alphapapa.net, casouri@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 10 21:38:50 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 1jMzUI-0009qn-LM for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 21:38:50 +0200 Original-Received: from localhost ([::1]:38202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMzUH-0002Tj-K8 for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 15:38:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34217) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMzTl-00022c-AD for emacs-devel@gnu.org; Fri, 10 Apr 2020 15:38:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMzTk-0000oA-7Q for emacs-devel@gnu.org; Fri, 10 Apr 2020 15:38:17 -0400 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:43678) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMzTi-0000mI-4V; Fri, 10 Apr 2020 15:38:14 -0400 Original-Received: by mail-pl1-x635.google.com with SMTP id z6so959273plk.10; Fri, 10 Apr 2020 12:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=YVwUfMse5I+p6mITyjA+jSYHcEbVynkQWotq0Fdba3E=; b=Y2iwojBeHqKXLZcW9u28ToPv6sMFWws1UoAMXBNsmvrzmXZOlbygBzB/pgqJJg/wEv UtMY+x6kRHi7+XX/jVT+fA4hcxinOYX8E3ingRwLvm6GfyrvvGgG8tdZtzGMSLpA0kbt 26liQUUn2WJrk6qbMIPWcGsQNhe/TTBp4R7cShQXyDmdMv+Wc+YGDGg5oFUHJomZQPsL SaTs6S/Waj7i30g5gz4rkaDPtR7oBBEHsZ/dzp69mvr9Qt0wGnidgZRdll9aob6GbYQR 27ixi/5KThTs0Bl6rTxdb+fkwPWmJ2VpXRpBcp9Dcxo14S2g0ZmSrXtZcJHr6++MViNM TgYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=YVwUfMse5I+p6mITyjA+jSYHcEbVynkQWotq0Fdba3E=; b=XyzehWPE/ZBWQXtLwyw6CMXXMTluvkYAkbQH71Z5fLmK8r5QKd9mVIt09tOdMyN569 J5p0zXpW3I+Ail5CzvapB7C3cdqGJlmku1KpkUDuWrkC5SMkpzTvWuP6iL1Cz9Bkw3c2 quqWGjPbBVWW99c9MArN5/c76LQM2+FIbnmffrA3c9fK5rJKZ2hibcRkyDl9Buuhp8WQ jqLZmN94SNzkldwMZsyzdHLgyErJsGnG6UH6KsQHGeW5oGuugPfYZL8d1ghlBmUIEKzE XtKUHeHq/021ACqn8A61KtCqAns7tDYTpofVyx5V/MfGuic/F5B4vLpcW/GsVq92BWC6 hnUA== X-Gm-Message-State: AGi0PuZcPJbrun8y6UqpUw31O/mGWWAPpHXNxiPczmRgoGFUZiLx0jRf 1hRRPjDp5jCCQfU+kRHhMudC0Nd5nRDVWg== X-Google-Smtp-Source: APiQypIpvHWh3f/rUi4je2PSOUYXr2fyiWsQDEDARF10XiyQoz7AvPJFAGKtgGGLf1Bbyi9TtG5LKw== X-Received: by 2002:a17:90a:ea85:: with SMTP id h5mr6377676pjz.99.1586547492752; Fri, 10 Apr 2020 12:38:12 -0700 (PDT) Original-Received: from localhost ([45.35.9.245]) by smtp.gmail.com with ESMTPSA id w27sm2405670pfq.211.2020.04.10.12.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 12:38:12 -0700 (PDT) In-Reply-To: <837dynm9yb.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::635 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:246798 Archived-At: > 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: ( ). Eli Zaretskii writes: >> 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? -- 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