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: Fri, 10 Apr 2020 23:35:12 +0800 Message-ID: <87wo6nxsjz.fsf@localhost> References: <83a73swwd7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="55047"; mail-complaints-to="usenet@ciao.gmane.io" Cc: adam@alphapapa.net, Eli Zaretskii , emacs-devel To: Yuan Fu , Dmitrii Korobeinikov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 10 17:39:53 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 1jMvl2-000EDP-T4 for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 17:39:52 +0200 Original-Received: from localhost ([::1]:35942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMvl1-0005j0-Us for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 11:39:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59066) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMvkA-0004Rq-9y for emacs-devel@gnu.org; Fri, 10 Apr 2020 11:38:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMvk9-00030h-8N for emacs-devel@gnu.org; Fri, 10 Apr 2020 11:38:58 -0400 Original-Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:45707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMvk7-0002zH-Ii; Fri, 10 Apr 2020 11:38:55 -0400 Original-Received: by mail-pf1-x42b.google.com with SMTP id r14so1164494pfl.12; Fri, 10 Apr 2020 08:38:55 -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:content-transfer-encoding; bh=jPM0n2TeGmV69CDngnDjKeysil1AF+WgaGgIQZra51Y=; b=ASrHhXINm57dbc1WKv8dRBAAjka5JIKP2pojUPuBADQcp2jtTM3F41+kAEFlcEOWe/ zYvhBcafuJ8NSgQ5sFFYipzbDPA9esrMAtYRaosAJd/E3NCKK4+F0Dfnm+zfXqRCv9PX y0vFBxVJHJzfOggnUD7U8mIEXKdKrUgJ5XLEEsrGdnhHjnpMxU3fLmDXuwmcjr27nT1c MR2mCNFRSxwBfpX1Shfd+ji4sc88srAUYxI3n2YHjO5gMFQfYQqZARwF2iV3l1/KkyfW 5dRGBsOh7PE9Ttrm6KrXBdnlX4+Gq2aY4KC2zsUZqIinZsDVR+QHo/R9bgiIzilKZ9rQ Jn3w== 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:content-transfer-encoding; bh=jPM0n2TeGmV69CDngnDjKeysil1AF+WgaGgIQZra51Y=; b=dzcK5TCCEJAjrJAeixXeBTr+n5MR+HDnNkQ/64VVbiS9OkFpCAbHVtxEA02TzVEf6f arvqVlCLp9gRPuGTaVxsFAVobBOLNB0zTb1prPIFOkrE8BqfHhdsg6SgSZ5AU317xqrk i0ZGhD1o3+9QBn+shq+aMW3DzbfVgE+L785BLXunL4+fk5JCCSwQMYXEmekgD4gmjk47 pELy+G7TRZ+szvUnHiaAIHf4ql4IkU/DhTjr+J/FMSSKmujV0eddpNtnKXLMf8gGaHK/ cBSX0rFckqVkJJ/IKAiBMxdJAO+r56WjwBrv3wxxeFKBSPRPnsumHYGJ/Ryp1s619Pw+ dqtA== X-Gm-Message-State: AGi0PubO90kFPND83cLn9EuAOB5Oi9ywP5nOBZGT9X5uJUy+LPqr7y63 3xqyyTvdexyjzgbMSXvGKjpe1w67RfbySQ== X-Google-Smtp-Source: APiQypIs0LcMk9Eh3/WD0aq+l9KxxR0F1EXC5zNb99IxExKJHhZ0tOiGqazixO+r9pafvMMIXuPXlg== X-Received: by 2002:a63:f712:: with SMTP id x18mr2765769pgh.286.1586533134379; Fri, 10 Apr 2020 08:38:54 -0700 (PDT) Original-Received: from localhost ([101.99.64.65]) by smtp.gmail.com with ESMTPSA id r23sm2070193pfh.162.2020.04.10.08.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 08:38:53 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42b 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:246771 Archived-At: > Following mode plus atomic windows seems doable. But it wouldn=E2=80=99t = be > transparent, AFAIK follow-mode needs to add special handlers for > things like isearch and query-replace. OTOH, it would be much more > difficult to implement in xdisp.c. I wonder if there is an > intermediate layer that=E2=80=99s higher level than redisplay (in lisp, o= r at > least not in redisplay) but still more or less transparent.=20 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. Indeed, there will still be a question on how the fontification is done, if the overlays should be shared, and how the key bindings should behave on such segments, but the basic functionality of automatically sharing text segments between buffers may be a good framework to start considering more complicated cases. Best, Ihor Yuan Fu writes: > Following mode plus atomic windows seems doable. But it wouldn=E2=80=99t = be transparent, AFAIK follow-mode needs to add special handlers for things = like isearch and query-replace. OTOH, it would be much more difficult to im= plement in xdisp.c. I wonder if there is an intermediate layer that=E2=80= =99s higher level than redisplay (in lisp, or at least not in redisplay) bu= t still more or less transparent. > > Yuan --=20 Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong U= niversity, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg