GNU bug report logs - #35419
[Proposal] Buffer Lenses and the Case of Org-Mode (also, Jupyter)

Previous Next

Packages: emacs, org-mode;

Reported by: Dmitrii Korobeinikov <dim1212k <at> gmail.com>

Date: Wed, 24 Apr 2019 18:36:01 UTC

Severity: wishlist

Full log


Message #36 received at 35419 <at> debbugs.gnu.org (full text, mbox):

From: Dmitrii Korobeinikov <dim1212k <at> gmail.com>
To: 35419 <at> debbugs.gnu.org, Ihor Radchenko <yantar92 <at> gmail.com>
Cc: Philipp Stephani <p.stephani2 <at> gmail.com>,
 Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#35419: [Proposal] Buffer Lenses and the Case of Org-Mode
 (also, Jupyter)
Date: Fri, 3 May 2019 03:31:08 +0600
[Message part 1 (text/plain, inline)]
I found a clarification on how mmm-mode works.

https://github.com/polymode/polymode/issues/187
> mmm-mode also allows having multiple major modes depending on cursor
position in the buffer. However, it does not fully replace major mode
locally. This mode is only taking care about keymap, menu, local variables,
font-lock, and indentation. It does not really take care about the minor
modes and does not run the submode hooks either.

Just to reiterate, polymode's idea is to switch between indirect buffers,
one for each major mode.

OK, detail largely disregarded, I now can draw a bird-eye view comparison
between lenses and multi-mode modes.

- Neither polymode nor mmm-mode treat a region as if it were truly on its
own in a seperate buffer.

Effects: no stuff like seperate truncation options, implied syntax checking
and so on.

- Moreover, the region must be a part of the buffer.

Effects: no data sharing between buffers, no possibility of stitching
different buffers together, etc.

Now, with these out of the way.

Indirect buffers give the answer to the issue of sharing some textual data
between several buffer.
(1) A question: when an indirect buffer is created and some region is
narrowed to, is the rest of the buffer duplicated in memory somewhere? If
this is so, there could be a useful efficiency-related modification to
indirect buffers, which would allow "hard-narrowing": not duplicating the
rest of the base buffer.

The next immediately outstanding question is:
(2) how can "embedding" (of a buffer as a part of another buffer as an
area) be done efficiently? This could possibly be approached as two
problems: (i) displaying the area and (ii) interacting with it.
Any ideas?
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.