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 01:46:59 +0800 Message-ID: <87tv1rxmgc.fsf@localhost> References: <83a73swwd7.fsf@gnu.org> <87wo6nxsjz.fsf@localhost> <83d08fmgul.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="102616"; 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 19:51:21 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 1jMxoG-000QZQ-Ih for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 19:51:20 +0200 Original-Received: from localhost ([::1]:37436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMxoF-0000Aq-LC for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 13:51:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50137) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMxnj-0007st-AE for emacs-devel@gnu.org; Fri, 10 Apr 2020 13:50:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMxni-0002Sc-8I for emacs-devel@gnu.org; Fri, 10 Apr 2020 13:50:47 -0400 Original-Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:44520) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMxng-0002Rg-Cy; Fri, 10 Apr 2020 13:50:44 -0400 Original-Received: by mail-pl1-x632.google.com with SMTP id h11so868713plr.11; Fri, 10 Apr 2020 10:50:44 -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=AkSInAuCfItu7H6TleR7/ZefsuZb8FF8PpDluW9OhWU=; b=Ct36LFOl6eQLw9dJ+Ss6nMTPqISH0+drpYdUbECtzCyL9a8cQFqRT4Y4zYbWkB1Gy9 p4f11a/QilUm2vF0ZeCO4pL3c2rjBjyF34b+hIoY/ZEzKg+lvFPdPVQdgoVGLvwBDHp0 unKMTB+rtEawTHRe7XgO6hO8TN8Psi4NW1uS1Q8Y6Xk5WCXAWR7kvaBTA7spGdljOl6m mdX+Z5hiX74kzAe3gbni82EVNiqofmWscvglMBjNUHE1VSBufFDIxdFev3mfYGlba/2q 2tNyEGDyCJGHCftuQ3eu5AsCB6904yOlcnGQXRbNCQoGtJKa+8M3C5J2nTzgT7ak6EGV agGw== 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=AkSInAuCfItu7H6TleR7/ZefsuZb8FF8PpDluW9OhWU=; b=Cjgkt79S7T0OLHr5KL/V5NSZ592avmdd4f9O8f8IUzgELM8YuMF/ap3sKkrt4MRvYu l9a9ZEd8VmM4MRBGoo8UavuIDz51Fz6r+VwCdZZbwSac2e/fQPwd09ZlfjNrIQXpnwoG IVKVM1UsC2AZZ7zN6pcv0VOr2kvXaKenKSsenx9hn0I1V0w98/1vKhdm0a3fXJgJOric VQjKjtUOCEPSFFBizfb93RaqYVGg6IeDFyIfCJF6+ili58e5vq5TiktmVidu/LC1si4Z sxmxMxh9QQdar3MFo59DvzMN9LDcOzTeyVPJFl5juJepd3dFSFA5A9Hdbo/rlzrtlbzH x9LA== X-Gm-Message-State: AGi0PuYly9iVNMbqvOoC0Jhf5sJQYWYcc33E6OHywOUAB1swG6ry98xF bI5FiFQ+Sogsn3Kk7VQA7e0szInlbZJ47w== X-Google-Smtp-Source: APiQypKhxHN6Z/PlrWVab0vEvtQR5H9C5TGo4Hp1VmAzy2VfIRzQWMGMLfYI392OeMPRwv6Anw3/Jw== X-Received: by 2002:a17:90b:230d:: with SMTP id mt13mr6775051pjb.164.1586541043062; Fri, 10 Apr 2020 10:50:43 -0700 (PDT) Original-Received: from localhost ([45.35.9.245]) by smtp.gmail.com with ESMTPSA id q70sm2305982pfc.206.2020.04.10.10.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 10:50:42 -0700 (PDT) In-Reply-To: <83d08fmgul.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::632 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:246786 Archived-At: > I don't think I understand what you mean by "segments of text". > Buffer text is just a long C array of 'char' in Emacs. I mean that buffer text in indirect buffer is a pointer to the first element of the C array containing the text in master buffer (or something similar). Similarly, the pointer can be created to nth element of array. Thus, "segment" of text starting from some non-zero position in the master buffer can be automatically synchronised with the master buffer. Eli Zaretskii writes: >> From: Ihor Radchenko >> Cc: adam@alphapapa.net, Eli Zaretskii , emacs-devel >> >> Date: Fri, 10 Apr 2020 23:35:12 +0800 >> >> What about extending the idea of indirect buffers? In indirect buffers, >> the buffer strings are associated with the same memory address storing >> the text (if I understand correctly). Similar thing (theoretically) can >> be done for individual segments of text. > > I don't think I understand what you mean by "segments of text". > Buffer text is just a long C array of 'char' in Emacs. -- 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