- 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 )
============================================