From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Harry Fei Newsgroups: gmane.emacs.devel Subject: Re: [Feature Discuss] Nested buffer Date: Tue, 24 Jul 2018 12:33:03 +0900 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002d50380571b66c8f" X-Trace: blaine.gmane.org 1532403084 14698 195.159.176.226 (24 Jul 2018 03:31:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 24 Jul 2018 03:31:24 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: Stefan Monnier , brettg@posteo.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 24 05:31:20 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fho2h-0003gB-PX for ged-emacs-devel@m.gmane.org; Tue, 24 Jul 2018 05:31:20 +0200 Original-Received: from localhost ([::1]:38214 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fho4m-0007bv-Ts for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2018 23:33:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fho4d-0007ba-Fs for emacs-devel@gnu.org; Mon, 23 Jul 2018 23:33:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fho4c-0006OE-85 for emacs-devel@gnu.org; Mon, 23 Jul 2018 23:33:19 -0400 Original-Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:35168) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fho4b-0006Nz-PG for emacs-devel@gnu.org; Mon, 23 Jul 2018 23:33:18 -0400 Original-Received: by mail-lj1-x22b.google.com with SMTP id p10-v6so2315938ljg.2 for ; Mon, 23 Jul 2018 20:33:17 -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=fxjZKqUtFWKpUa9yRaOazDyNfYAhYK9lM4hBcQk8/7w=; b=YtPih1OMbYBq3GuXC0QVTkHayC/JbtOP8MFnFCxBI4AaNh4esrwgCZ4oIP3FBD19tm f/AWYSONysFIKSglRs51yK/fWN10iZI8a4+/YYzpubm42talUHXH//3S+p9RbtTriiHP Lhe3DypsLxPYNfnvQRWLbKT8Lv4LFYeWrNReCD0m+uo0HGptgPY6MXtqJYQliK+f4oo/ xk5VP2GqvMbwsA46xuG9vJs2z3SRWoU131nseKoAxOXaI/vthBI/AzpNkJnPSzLjW5dU JW653qLcJlhmfy3yywfx4uqb+ha9tzsq1FpVml7GNsDSPKy9xQZBsyEdFQkWR4h7pvrc 8uuA== 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=fxjZKqUtFWKpUa9yRaOazDyNfYAhYK9lM4hBcQk8/7w=; b=OE65UCxHSbv0wnassZSDzj4EkoTUFWKMbCA+NOoMfF1QSoPNVE3au4zVBn/OHB/IHZ h7bKcgks3ePbIvJHErTXacUnco7yVX3M0zg0e+z2QXTXS3okhzVaBVKQba46UqhyTQ1J bQW1QoRfz1iqmxI3Xb2e6n8dEUzPHcyZ6i+JjhbRinQkIKXa/9sS5uyJNWLlq335+qRU RyXYRWweTHfL5WGThYaa1WKnWvHlhpZjl0QnowPxmXNay8/YJ91DbRFuN4WXAJCL1a0A wOR2qzBEKbPkbB0uBJSoqt3RssvuUI1yEYqBW/aTrs868hjI8rAjTBKO4MBGJ08Lpofx Fhfg== X-Gm-Message-State: AOUpUlFrncS6seKa81kgVbEPE4iyvnhCSW8MFxrntyPSOGs9Wp3sNCMj lylbD8DOckzRWXtDcqR8i4+h1uQrMUMsLbA7420= X-Google-Smtp-Source: AAOMgpcR09alvqLqM8Yn331CLc4DCLzm5l60rs2ZaL7mf6p2KrKI5EIulyofwJqp8Hs+/zAe+KG4XlzYtgG6TC8HTtQ= X-Received: by 2002:a2e:991:: with SMTP id 139-v6mr10098006ljj.150.1532403196447; Mon, 23 Jul 2018 20:33:16 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227753 Archived-At: --0000000000002d50380571b66c8f Content-Type: text/plain; charset="UTF-8" - Case 1: Collect multiple narrowed-indirect-buffers to edit together. - Sometimes, when I am working on a large project repository (Maybe something like Chromium and AOSP), there are some codes highly related to each other which spread in multiple files. So I want to collect them together into a host buffer (embed narrow indirect buffer) when I read those code. After I understand the logic, I want to edit those code in this host buffer directly(the content sync back to the origin buffer). Even more, I can use other editor functions, eg. string replace. - Here is the example of the buffer ============================= Somes Note for the Foo releated code. This is the Foo struct definition ---- Linked to Foo.h buffer---- struct Foo { int a, int b, } ----------------------------------------- Some function that use Foot ----------Linked to xxx.c --------- void f1 (f: Foo) { ...... } ----------------------------------------- ----------Linked to yyy.c --------- void f2 (f: Foo) { ...... } ----------------------------------------- ============================= - Case 2: Extend eshell or write a new shell - I want to execute my processes async in eshell by default. So I can run multiple processes simultaneously in just one session. The output of those process will be redirected into their own correlative buffers. Then I want to embed those output buffers into the eshell buffer just to fake a normal shell experience. - Here is the example (in a Imaginary eshell). The two process's output is updated simultaneously. ============================================ /home/aaa/work: npm start (Enter here to execute non-exitable program) ---------------------- Output of `npm start` ------------------------ XXX server is listen on 8000 request [GET]: ....................... request [GET]: ........................ ------------------------------------------------------------------------------- /home/aaa/work: curl localhsot:8000/foo (Then Enter here to execute a curl) ---------------------- Output of `curl localhost:8000.....` ------------------------ ........................... ........................... ........................... ........................... ------------------------------------------------------------------------------- /home/aaa/work: | (Then we can execute more command here ) ============================================ --0000000000002d50380571b66c8f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
  • Case 1: Collect multiple narrowed-indirect-buffers= to edit together.
    • Sometimes, when I am working on a large = project repository (Maybe something like Chromium and AOSP), there are some= codes highly related to each other which spread in multiple files. So I wa= nt to collect them together into a host buffer (embed narrow indirect buffe= r) when I read those code. After I understand the logic, I want to edit tho= se code in this host buffer directly(the content sync back to the origin bu= ffer). Even more, I can use other editor functions, eg. string replace.
    • Here is the example of the buffer
=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
Somes Note for the Foo releated code.

<= div>This is the Foo struct definition
---- Linked to Foo.h buffer= ----
struct Foo {
=C2=A0=C2=A0=C2=A0 int a,
=C2=A0=C2=A0=C2=A0 int b,
}
----------------= -------------------------


Some = function that use Foot
----------Linked to xxx.c ---------
void f1 (f: Foo) {
=C2=A0=C2=A0=C2=A0 ......
}
-----------------------------------------
<= br>
----------Linked to yyy.c ---------
void f2 (f= : Foo) {
=C2=A0=C2=A0=C2=A0 ......
}
= -----------------------------------------

= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D

  • Case 2: Extend eshell or write a n= ew shell
    • I want to execute my processes async in eshell by = default. So I can run multiple processes simultaneously in just one session= . The output of those process will be redirected into their own correlative= buffers. Then I want to embed those output buffers into the eshell buffer = just to fake a normal shell experience.
    • Here is the example (in a I= maginary eshell). The two process's output is updated simultaneously.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D

/home/aaa/work: npm start=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (Enter here to execute non-exitable program)
---------------------- Output of `npm start` ---------------------= ---
XXX server is listen on 8000
request [GET]= : .......................
request [GET]: ....................= ....
--------------------------------------------------= -----------------------------
/home/aaa/work: curl localhsot:8000= /foo=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 (Then Enter here to execute a curl)
----------= ------------ Output of `curl localhost:8000.....` ------------------------<= /div>
...........................
...........................=
...........................
..........................= .
-----------------------------------------------------------= --------------------
/home/aaa/work: | =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 (Then we can execute more command here )
<= div>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D

--0000000000002d50380571b66c8f--