From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitrii Korobeinikov Newsgroups: gmane.emacs.bugs Subject: bug#35419: [Proposal] Buffer Lenses and the Case of Org-Mode (also, Jupyter) Date: Thu, 25 Apr 2019 14:40:27 +0600 Message-ID: References: <87sgu6rhkt.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d322c3058756c536" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="169611"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35419@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 25 10:41:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJZwS-000hxe-PG for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Apr 2019 10:41:17 +0200 Original-Received: from localhost ([127.0.0.1]:53953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJZwR-0003Rl-Os for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Apr 2019 04:41:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJZwF-0003QP-Is for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 04:41:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJZwE-000231-FH for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 04:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43846) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJZwE-00022r-BT; Thu, 25 Apr 2019 04:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJZwE-0002Uj-8U; Thu, 25 Apr 2019 04:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitrii Korobeinikov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Thu, 25 Apr 2019 08:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35419 X-GNU-PR-Package: emacs,org-mode Original-Received: via spool by 35419-submit@debbugs.gnu.org id=B35419.15561816479559 (code B ref 35419); Thu, 25 Apr 2019 08:41:02 +0000 Original-Received: (at 35419) by debbugs.gnu.org; 25 Apr 2019 08:40:47 +0000 Original-Received: from localhost ([127.0.0.1]:57389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJZvz-0002U7-CO for submit@debbugs.gnu.org; Thu, 25 Apr 2019 04:40:47 -0400 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:35568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJZvx-0002Tt-A5 for 35419@debbugs.gnu.org; Thu, 25 Apr 2019 04:40:46 -0400 Original-Received: by mail-wr1-f42.google.com with SMTP id f7so6498096wrs.2 for <35419@debbugs.gnu.org>; Thu, 25 Apr 2019 01:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Dw/H80LBbr+7p0rtr/9cXyN9qwSqgPoZtYKhlbmbTiQ=; b=Kd1VH7DoFTu9CUhmVOlkJDFToIuSPXfQhvB8m9R3Vtgdq6kY2NvvGKPvZHDT4J4+gj H49+ADd1b/RjXH6/jhP2luFTqztrmC1+mX6JrLLuoun2RUrhzttXwf9XKTfEQVxL4B9o H+Eqw80Z3+H/nDFHG6SqDnUcbMPCsFWVv6zm6+E93rXe2S4V8xpMVEgwYeagCnLA5hC+ eAv3Q7vAfGcJ4W/bVTQBMGD6kCpwg0v/1wauqYogmgoCWIi3wAKJGIAZyiG5326MMlIj iyFbgtFBkz+g7TGh8d1CW2k1hhNEY8IO3quvksrrAaWbBvmR+7X7Oo0sHC1JCQ5IeVhh +0Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Dw/H80LBbr+7p0rtr/9cXyN9qwSqgPoZtYKhlbmbTiQ=; b=Y2ai41dU9TgdPln6Oku3kkp8voN08bS7vJuzDlvEImGcSllu9j3b8klyxIluDcppk9 Iy1W51U0Z3FfJH1noJ/+BizIXXrgJNzh0Bt700n5QDhaBFqXWUVdhdJUhASi31z2pxad J9CUlFTJVCJ8U3RjYsJ+b/Ti56XYy1V3y3c6ktAX/QDqQnaYSriNtTzIhxwqtnhsnVwq MbOhc3UPr772fb7a8NlmMyZOHDeo7RZ2MhMN0KMUa6WH+9JuhiKv6zgHzRpFT74Y0hdp NicHKBOM0GKV6tejbdOyw3ljNMJcjv3h4xmDzDKPCO4a8yIKiN26rn/97WKkVv7ghCdU cEZQ== X-Gm-Message-State: APjAAAUjd32nhksRHQLvoZHCdNT5p98f/2CibhJGTxmZ7RPNkfRrFHGV IDgT9MDEtciaOdsWgjDFOqOXDeeC+WtmddvCQvo= X-Google-Smtp-Source: APXvYqy+/7gIHRRWJnKzSJOJZ0k6mmzDVlhQMCOh5UIb0zjvi73LUBWUAWHpkTDnwxozMNCMA57l4e54KaaF+lKFIWo= X-Received: by 2002:a5d:550b:: with SMTP id b11mr10044137wrv.81.1556181639437; Thu, 25 Apr 2019 01:40:39 -0700 (PDT) In-Reply-To: <87sgu6rhkt.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158233 Archived-At: --000000000000d322c3058756c536 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > Have you looked at Phil Lord's lentic package? I think it implements a > lot of what you're talking about. > https://github.com/phillord/lentic This is nice to see! Indeed, except for embedding, there is a large overlap with what I described as buffer lenses. BTW, judging by this description: "changes percolation now happens incrementally, so only those parts of the buffer are updated. As a result, lentic now cope with long files with little noticable delay", the buffers don't share any data and need to sync with the master [linked] buffer. Is this the best solution? I have imagined that at the low level there is an actual data structure that keeps the raw textual data and it could be directly shared by multiple buffers. I mean, when a buffer is saved to a file, the text doesn't need to be stripped of properties beforehand, right? =D1=87=D1=82, 25 =D0=B0=D0=BF=D1=80. 2019 =D0=B3. =D0=B2 07:37, Noam Postav= sky : > Dmitrii Korobeinikov writes: > > > * Implementation > > > > I am not familiar with Emacs internals to say what's feasible of the > > proposed structure. > > Have you looked at Phil Lord's lentic package? I think it implements a > lot of what you're talking about. > > https://github.com/phillord/lentic > --000000000000d322c3058756c536 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Have you looked at Phil Lord= 9;s lentic package?=C2=A0 I think it implements a
> lot of wha= t you're talking about.

<= div>
This is nice to see!
Indeed, except for embedd= ing, there is a large overlap with what I described as buffer lenses.
=

BTW, judging by this description: "changes percola= tion now happens incrementally, so only those parts of the buffer are updat= ed. As a result, lentic now cope with long files with little noticable dela= y", the buffers don't share any data and need to sync with the mas= ter [linked] buffer.
Is this the best solution? I have imagined t= hat at the low level there is an actual data structure that keeps the raw t= extual data and it could be directly shared by multiple buffers. I mean, wh= en a buffer is saved to a file, the text doesn't need to be stripped of= properties beforehand, right?

=D1=87=D1=82, 25 =D0=B0=D0=BF=D1= =80. 2019 =D0=B3. =D0=B2 07:37, Noam Postavsky <npostavs@gmail.com>:
Dmitrii Korobeinikov <dim1212k@gmail.com> writes:

> * Implementation
>
>=C2=A0 =C2=A0I am not familiar with Emacs internals to say what's f= easible of the
> proposed structure.

Have you looked at Phil Lord's lentic package?=C2=A0 I think it impleme= nts a
lot of what you're talking about.

https://github.com/phillord/lentic
--000000000000d322c3058756c536--