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:30:01 +0300 Message-ID: <83369amqdi.fsf@gnu.org> References: <83a73swwd7.fsf@gnu.org> <87wo6nxsjz.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="111975"; mail-complaints-to="usenet@ciao.gmane.io" Cc: adam@alphapapa.net, casouri@gmail.com, yantar92@gmail.com, emacs-devel@gnu.org To: Dmitrii Korobeinikov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 11 09:30:55 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 1jNAbO-000T40-Fn for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 09:30:54 +0200 Original-Received: from localhost ([::1]:49626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNAbN-0006fw-HW for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 03:30:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60486) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNAan-0006Ab-OR for emacs-devel@gnu.org; Sat, 11 Apr 2020 03:30:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jNAan-0000Yb-9v; Sat, 11 Apr 2020 03:30:17 -0400 Original-Received: from [176.228.60.248] (port=1983 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jNAam-0007cb-E8; Sat, 11 Apr 2020 03:30:16 -0400 In-Reply-To: (message from Dmitrii Korobeinikov on Sat, 11 Apr 2020 01:09:08 +0600) 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:246819 Archived-At: > From: Dmitrii Korobeinikov > Date: Sat, 11 Apr 2020 01:09:08 +0600 > Cc: Yuan Fu , adam@alphapapa.net, Eli Zaretskii , > emacs-devel > > >From what I saw, there's not a unified core interface on top of that c > array. So, would need to modify each place that makes a use of it. > (for a couple of examples, see text_outside_line_unchanged_p in > xdisp.c, looking_at_1 in search.c) I'm not sure why you came to that conclusion. Emacs's internals access buffer text directly when needed, for speed. Interfaces like BEG_UNCHANGED/END_UNCHANGED, BYTE_POS_ADDR, GPT, and others are no less "core interfaces" for accessing buffer text than functions in insdel.c. I would even consider insdel.c as a layer _above_ the low-level interfaces such as BYTE_POS_ADDR. And looking_at_1 does what it does because it needs to pass buffer text as 2 C 'char' arrays to regex routines, so I don't think it's any evidence to anything. It's just a trick to pass non-contiguous text to a function that needs contiguous text. > The good news is: I believe xdisp.c wouldn't have to be modified all > that much if the regions are enforced to start on different lines. How so? The display code accesses the buffer text directly, using BYTE_POS_ADDR.