-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
737 lines (661 loc) · 38.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2024-10-16 Wed 19:57 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Transclusion in Emacs</title>
<meta name="author" content="me" />
<meta name="generator" content="Org Mode" />
<style>
#content { max-width: 60em; margin: auto; }
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #e6e6e6;
border-radius: 3px;
background-color: #f2f2f2;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: auto;
}
pre.src:before {
display: none;
position: absolute;
top: -8px;
right: 12px;
padding: 3px;
color: #555;
background-color: #f2f2f299;
}
pre.src:hover:before { display: inline; margin-top: 14px;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-authinfo::before { content: 'Authinfo'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
display: table;
text-align: center;
width: 100%;
}
.equation {
vertical-align: middle;
}
.equation-label {
display: table-cell;
text-align: right;
vertical-align: middle;
}
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { }
</style>
</head>
<body>
<div id="content" class="content">
<h1 class="title">Transclusion in Emacs</h1>
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#Contents">1. Contents</a></li>
<li><a href="#discussions">2. Discussions</a>
<ul>
<li><a href="#bug-reports--feature-requests">2.1. Bug reports / Feature requests</a>
<ul>
<li><a href="#%5B%5Bhttps%3A%2F%2Fdebbugs.gnu.org%2Fcgi%2Fbugreport.cgi%3Fbug%3D35419%5D%5B%2335419%20-%20%7BProposal%7D%20Buffer%20Lenses%20and%20the%20Case%20of%20Org-Mode%20%28also%2C%20Jupyter%29%20-%20GNU%20bug%20report%20logs%5D%5D">2.1.1. #35419 - {Proposal} Buffer Lenses and the Case of Org-Mode (also, Jupyter) - GNU bug report logs</a></li>
</ul>
</li>
<li><a href="#mailing-lists">2.2. Mailing lists</a>
<ul>
<li><a href="#emacs-devel">2.2.1. emacs-devel</a></li>
<li><a href="#org-mode">2.2.2. org-mode</a></li>
</ul>
</li>
<li><a href="#reddit">2.3. Reddit</a>
<ul>
<li><a href="#%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2F10gc9u%2Fcan_i_have_multiple_parts_of_buffers_in_one_super%2F%5D%5BCan%20I%20have%20multiple%20parts%20of%20buffers%20in%20one%20super%20buffer%3F%20%3A%20emacs%5D%5D">2.3.1. Can I have multiple parts of buffers in one super buffer? : emacs</a></li>
<li><a href="#%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fflxqei%2Fcloningmirroring_a_region_to_some_other_location%2F%5D%5BCloning%2Fmirroring%20a%20region%20to%20some%20other%20location%20%3A%20emacs%5D%5D">2.3.2. Cloning/mirroring a region to some other location : emacs</a></li>
<li><a href="#%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fj6k2j8%2Forgmode_transclusionblockreference_prototype%2F%5D%5BOrg-mode%20Transclusion%2FBlock-reference%20Prototype%20%3A%20emacs%5D%5D">2.3.3. Org-mode Transclusion/Block-reference Prototype : emacs   <span class="tag"><span class="video">video</span> <span class="demo">demo</span> <span class="prototype">prototype</span></span></a></li>
</ul>
</li>
<li><a href="#stackexchange">2.4. StackExchange</a>
<ul>
<li><a href="#%5B%5Bhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F15328515%2Fiso-transclusion-in-emacs-org-mode%5D%5Binclude%20-%20ISO%20transclusion%20in%20emacs%20org-mode%3F%20-%20Stack%20Overflow%5D%5D">2.4.1. include - ISO transclusion in emacs org-mode? - Stack Overflow</a></li>
<li><a href="#%5B%5Bhttps%3A%2F%2Femacs.stackexchange.com%2Fquestions%2F56201%2Fis-there-an-emacs-package-which-can-mirror-a-region%2F56202%2356202%5D%5BIs%20there%20an%20emacs%20package%20which%20can%20mirror%20a%20region%3F%20-%20Emacs%20Stack%20Exchange%5D%5D">2.4.2. Is there an emacs package which can mirror a region? - Emacs Stack Exchange</a></li>
<li><a href="#%5B%5Bhttps%3A%2F%2Femacs.stackexchange.com%2Fquestions%2F12562%2Forg-mode-headings-in-multiple-places-at-once-transclusion%5D%5BOrg-mode%20headings%20in%20multiple%20places%20at%20once%3F%20%28transclusion%29%20-%20Emacs%20Stack%20Exchange%5D%5D">2.4.3. Org-mode headings in multiple places at once? (transclusion) - Emacs Stack Exchange</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#packages">3. Packages</a>
<ul>
<li><a href="#%5B%5Bhttps%3A%2F%2Fgithub.com%2Fgregdetre%2Femacs-freex%5D%5BGitHub%20-%20gregdetre%2Femacs-freex%3A%20Emacs%20Freex%20mode%20is%20a%20minor%20mode%20for%20organizing%20and%20editing%20a%20massively-hyperlinked%20database%20of%20your%20notes%20and%20ideas.%20It%27s%20a%20personal%20wiki%20on%20steroids.%5D%5D">3.1. GitHub - gregdetre/emacs-freex: Emacs Freex mode is a minor mode for organizing and editing a massively-hyperlinked database of your notes and ideas. It's a personal wiki on steroids.</a></li>
<li><a href="#%5B%5Bhttps%3A%2F%2Fgithub.com%2Fmagnars%2Fmultifiles.el%5D%5BGitHub%20-%20magnars%2Fmultifiles.el%3A%20Work%20in%20progress%3A%20View%20and%20edit%20parts%20of%20multiple%20files%20in%20one%20buffer%5D%5D">3.2. GitHub - magnars/multifiles.el: Work in progress: View and edit parts of multiple files in one buffer</a></li>
<li><a href="#%5B%5Bhttps%3A%2F%2Fgithub.com%2Fnobiot%2Forg-transclusion%5D%5BGitHub%20-%20nobiot%2Forg-transclusion%3A%20%28prototype%29%20Emacs%20package%20to%20enable%20transclusion%20with%20Org%20Mode%5D%5D">3.3. GitHub - nobiot/org-transclusion: (prototype) Emacs package to enable transclusion with Org Mode</a></li>
<li><a href="#%5B%5Bhttps%3A%2F%2Fgithub.com%2Fsynchrony%2Fsmsn-why%5D%5BGitHub%20-%20synchrony%2Fsmsn-why%3A%20Get%20psyched%20about%20mapping%20knowledge%21%5D%5D">3.4. GitHub - synchrony/smsn-why: Get psyched about mapping knowledge!</a></li>
<li><a href="#%5B%5Bhttps%3A%2F%2Fgithub.com%2Fwhacked%2Ftransclusion-minor-mode%5D%5BGitHub%20-%20whacked%2Ftransclusion-minor-mode%3A%20emacs%20minor%20mode%20for%20org-mode%20file%20transclusion%20using%20embedded%20overlays%5D%5D">3.5. GitHub - whacked/transclusion-minor-mode: emacs minor mode for org-mode file transclusion using embedded overlays</a></li>
</ul>
</li>
</ul>
</div>
</div>
<p>
This file exists to gather resources related to implementing transclusion in Emacs.
</p>
<p>
The topic frequently reappears in discussions on Reddit, the mailing lists, etc, and usually only a few of the existing resources are mentioned. It's time to gather them in one place.
</p>
<p>
Please send additions as pull requests. When adding a resource, please add a summary as of the date it's added.
</p>
<div id="outline-container-Contents" class="outline-2">
<h2 id="Contents"><span class="section-number-2">1.</span> Contents</h2>
<div class="outline-text-2" id="text-1">
<ul class="org-ul">
<li><a href="#discussions">Discussions</a>
<ul class="org-ul">
<li><a href="#bug-reports--feature-requests">Bug reports / Feature requests</a></li>
<li><a href="#mailing-lists">Mailing lists</a></li>
<li><a href="#reddit">Reddit</a></li>
<li><a href="#stackexchange">StackExchange</a></li>
</ul></li>
<li><a href="#packages">Packages</a></li>
</ul>
</div>
</div>
<div id="outline-container-discussions" class="outline-2">
<h2 id="discussions"><span class="section-number-2">2.</span> Discussions</h2>
<div class="outline-text-2" id="text-discussions">
</div>
<div id="outline-container-bug-reports--feature-requests" class="outline-3">
<h3 id="bug-reports--feature-requests"><span class="section-number-3">2.1.</span> Bug reports / Feature requests</h3>
<div class="outline-text-3" id="text-bug-reports--feature-requests">
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fdebbugs.gnu.org%2Fcgi%2Fbugreport.cgi%3Fbug%3D35419%5D%5B%2335419%20-%20%7BProposal%7D%20Buffer%20Lenses%20and%20the%20Case%20of%20Org-Mode%20%28also%2C%20Jupyter%29%20-%20GNU%20bug%20report%20logs%5D%5D" class="outline-4">
<h4 id="%5B%5Bhttps%3A%2F%2Fdebbugs.gnu.org%2Fcgi%2Fbugreport.cgi%3Fbug%3D35419%5D%5B%2335419%20-%20%7BProposal%7D%20Buffer%20Lenses%20and%20the%20Case%20of%20Org-Mode%20%28also%2C%20Jupyter%29%20-%20GNU%20bug%20report%20logs%5D%5D"><span class="section-number-4">2.1.1.</span> <a href="https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35419">#35419 - {Proposal} Buffer Lenses and the Case of Org-Mode (also, Jupyter) - GNU bug report logs</a></h4>
<div class="outline-text-4" id="text-2-1-1">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2019-04-25 Thu] </span></span> Dmitrii Korobeinikov's report is extensive. The discussion on the report continues into April of 2020.
</p>
<blockquote>
<p>
<b>SUMMARY</b> <i>Buffer lens</i> is an object inside a buffer which provides that
buffer the lines to display and which is linked to another buffer (from
which it can take and process data), while mapping the input back to that
linked buffer. <i>Composite lens</i> is the extension of this idea to interface
any sources of data (for which text interface is possible). Some Org-mode
problems are addressed, particularly those concerning source block editing
and viewing, syntax checking, completion and reference expansion.
</p>
<p>
This is a proposal for <i>lenses</i>. Hereby, I outline the general idea, the
problems it solves, the features it introduces and its use cases.
</p>
</blockquote>
<p>
See also <a href="https://www.reddit.com/r/emacs/comments/fu91nf/35419_proposal_buffer_lenses_and_the_case_of/?">Reddit discussion of the report</a> from 2020, in which Ihor Radchenko mentions:
</p>
<blockquote>
<p>
Here is my work-in-progress on the subject: <a href="https://github.com/yantar92/mirror-text">https://github.com/yantar92/mirror-text</a>. I have little time to work on it in near future, but hope the ideas and links could be useful.
</p>
</blockquote>
</div>
</div>
</div>
<div id="outline-container-mailing-lists" class="outline-3">
<h3 id="mailing-lists"><span class="section-number-3">2.2.</span> Mailing lists</h3>
<div class="outline-text-3" id="text-mailing-lists">
</div>
<div id="outline-container-emacs-devel" class="outline-4">
<h4 id="emacs-devel"><span class="section-number-4">2.2.1.</span> emacs-devel</h4>
<div class="outline-text-4" id="text-2-2-1">
</div>
<ol class="org-ol">
<li><a id="%5B%5Bhttps%3A%2F%2Flists.gnu.org%2Farchive%2Fhtml%2Femacs-devel%2F2020-04%2Fmsg00141.html%5D%5BRequest%20for%20pointers%20and%20advice%3A%20displaying%20several%20buffers%20inside%20a%20single%20window%5D%5D"></a><a href="https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00141.html">Request for pointers and advice: displaying several buffers inside a single window</a><br />
<div class="outline-text-5" id="text-2-2-1-1">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2020-04-03 Fri] </span></span> Dmitrii Korobeinikov asks:
</p>
<blockquote>
<p>
I want to explore the feasibility of displaying two (indirect) buffers
inside a single window, one after another. Each buffer has to look
like it's rendered in its own mode. For the starters, each buffer can
start on its own new line in the window. No interaction w/ text is
required for now.
</p>
<p>
I have been entertaining the idea since my proposal for lenses [1],
and now that I have some desire to get hacking a little, I want to see
if I can get onto this first ladder step to the goal. What concerns me
now is how to approach the problem. So, I come here to ask for your
advice and comments. You know, "it's dangerous to go alone, take
this!" sort of deal.
</p>
<p>
I guess I would first have to learn how the renderer functions. Any
good resources on that besides the source code?
</p>
<p>
Eventually, I would have to explore beyond the renderer and get to
play with the data structures, so I can do the interaction w/ text
possible. But that doesn't concern me all that much until I get to
actually draw some buffers together.
</p>
</blockquote>
<p>
The discussion is extensive, including replies from Eli Zaretskii and Ihor Radchenko, and mentions modifying <code>xdisp.c</code>, the buffer data structure, associated functions, etc.
</p>
</div>
</li>
<li><a id="%5B%5Bhttps%3A%2F%2Flists.gnu.org%2Farchive%2Fhtml%2Femacs-devel%2F2018-07%2Fmsg00863.html%5D%5B%7BFeature%20Discuss%7D%20Nested%20buffer%5D%5D"></a><a href="https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00863.html">{Feature Discuss} Nested buffer</a><br />
<div class="outline-text-5" id="text-2-2-1-2">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2018-07-23 Mon] </span></span> fei xiaobo asks:
</p>
<blockquote>
<p>
I am building a plan to implement <b>Nested buffer</b> in Emacs recently. Is it a good ideal?
</p>
<p>
Nested buffer what I mean here is the sub-buffers which embedded in a host buffer.
</p>
<ul class="org-ul">
<li>Nested/Embed buffer's content is linked to an arbitrary buffer.</li>
<li>Host buffer's content consists of the content of all the nested buffers.</li>
</ul>
<p>
If having this, we could embed multiple buffers' content into a host buffer to get one virtual buffer. And, after updating the nested buffer's content, the virtual host buffer's content is updated too. I think it will be helpful for many special plugins.
</p>
<p>
Appreciated any comments or suggestion.
</p>
</blockquote>
<p>
Includes responses by Stefan Monnier and Eli Zaretskii.
</p>
</div>
</li>
</ol>
</div>
<div id="outline-container-org-mode" class="outline-4">
<h4 id="org-mode"><span class="section-number-4">2.2.2.</span> org-mode</h4>
<div class="outline-text-4" id="text-2-2-2">
</div>
<ol class="org-ol">
<li><a id="%5B%5Bhttps%3A%2F%2Flists.gnu.org%2Farchive%2Fhtml%2Femacs-orgmode%2F2016-12%2Fmsg00183.html%5D%5B%7BO%7D%20transcluding%20some%20org-elements%20in%20multiple%20places%5D%5D"></a><a href="https://lists.gnu.org/archive/html/emacs-orgmode/2016-12/msg00183.html">{O} transcluding some org-elements in multiple places</a><br />
<div class="outline-text-5" id="text-2-2-2-1">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2016-12-09 Fri] </span></span> John Kitchin asks:
</p>
<blockquote>
<p>
I have an idea for how I could transclude "copies" or links to
org-elements in multiple places and keep them up to date. A prototypical
example of this is I have a set of org-contacts in one place, and I want
to create a new list of people for a committee in a new place made of
"copies" of the contact headlines. But I do not really want to duplicate
the headlines, and if I modify one, I want it reflected in the other
places. I do not want just links to those contacts, because then I can
not do things with org-map-entries, and other org-machinery which needs
the actual headlines/properties present. Another example might be I want
a table in two places, but the contents of them should stay
synchronized, ditto for a code block.
</p>
<p>
This idea was inspired by <a href="https://github.com/gregdetre/emacs-freex">https://github.com/gregdetre/emacs-freex</a>.
</p>
<p>
The idea starts with creating (wait for it…) a new link ;) In a
document where I want to transclude a headline, I would enter something like:
</p>
<p>
[BROKEN LINK: transclude:some-file.org::*headline title]
</p>
<p>
Then, I would rely on the font-lock system to replace that link with the
headline and its contents (via the :activate-func link property), and to
put an overlay on it with a bunch of useful properties, including
modification hooks that would update the source if I change the the
element in this document, and some visual indication that it is
transcluded (e.g. light gray background/tooltip).
</p>
<p>
I would create a kill-buffer hook function that would replace that
transcluded content with the original link. A focus-in hook function
would make sure the transcluded content is updated when you enter the
frame. So when the file is not open, there is just a transclude link
indicating what should be put there, and when it is open, the overlay
modification hooks and focus hook should ensure everything stays
synchronized (as long as external processes are not modifying the
contents).
</p>
<p>
It seems like this could work well for headlines, and named tables, src
blocks, and probably any other element that can be addressed by a
name/ID.
</p>
</blockquote>
</div>
</li>
</ol>
</div>
</div>
<div id="outline-container-reddit" class="outline-3">
<h3 id="reddit"><span class="section-number-3">2.3.</span> Reddit</h3>
<div class="outline-text-3" id="text-reddit">
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2F10gc9u%2Fcan_i_have_multiple_parts_of_buffers_in_one_super%2F%5D%5BCan%20I%20have%20multiple%20parts%20of%20buffers%20in%20one%20super%20buffer%3F%20%3A%20emacs%5D%5D" class="outline-4">
<h4 id="%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2F10gc9u%2Fcan_i_have_multiple_parts_of_buffers_in_one_super%2F%5D%5BCan%20I%20have%20multiple%20parts%20of%20buffers%20in%20one%20super%20buffer%3F%20%3A%20emacs%5D%5D"><span class="section-number-4">2.3.1.</span> <a href="https://www.reddit.com/r/emacs/comments/10gc9u/can_i_have_multiple_parts_of_buffers_in_one_super/">Can I have multiple parts of buffers in one super buffer? : emacs</a></h4>
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fflxqei%2Fcloningmirroring_a_region_to_some_other_location%2F%5D%5BCloning%2Fmirroring%20a%20region%20to%20some%20other%20location%20%3A%20emacs%5D%5D" class="outline-4">
<h4 id="%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fflxqei%2Fcloningmirroring_a_region_to_some_other_location%2F%5D%5BCloning%2Fmirroring%20a%20region%20to%20some%20other%20location%20%3A%20emacs%5D%5D"><span class="section-number-4">2.3.2.</span> <a href="https://www.reddit.com/r/emacs/comments/flxqei/cloningmirroring_a_region_to_some_other_location/">Cloning/mirroring a region to some other location : emacs</a></h4>
<div class="outline-text-4" id="text-2-3-2">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2020-03-20 Fri] </span></span> Protesilaos Stavros comments:
</p>
<blockquote>
<p>
Good to know! The Emacs manual also has a chapter on "accumulating text". Excerpt:
</p>
<dl class="org-dl">
<dt>‘M-x append-to-buffer’</dt><dd>Append region to the contents of a specified buffer.</dd>
<dt>‘M-x prepend-to-buffer’</dt><dd>Prepend region to the contents of a specified buffer.</dd>
<dt>‘M-x copy-to-buffer’</dt><dd>Copy region into a specified buffer, deleting that buffer’s old contents.</dd>
<dt>‘M-x insert-buffer’</dt><dd>Insert the contents of a specified buffer into current buffer at point.</dd>
<dt>‘M-x append-to-file’</dt><dd>Append region to the contents of a specified file, at the end.</dd>
</dl>
</blockquote>
</div>
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fj6k2j8%2Forgmode_transclusionblockreference_prototype%2F%5D%5BOrg-mode%20Transclusion%2FBlock-reference%20Prototype%20%3A%20emacs%5D%5D" class="outline-4">
<h4 id="%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fj6k2j8%2Forgmode_transclusionblockreference_prototype%2F%5D%5BOrg-mode%20Transclusion%2FBlock-reference%20Prototype%20%3A%20emacs%5D%5D"><span class="section-number-4">2.3.3.</span> <a href="https://www.reddit.com/r/emacs/comments/j6k2j8/orgmode_transclusionblockreference_prototype/">Org-mode Transclusion/Block-reference Prototype : emacs</a>   <span class="tag"><span class="video">video</span> <span class="demo">demo</span> <span class="prototype">prototype</span></span></h4>
<div class="outline-text-4" id="text-2-3-3">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2020-10-07 Wed 10:55] </span></span> Discussion of this video demo posted by Noboru Nobiot: <a href="https://youtu.be/Wjk-otO2xrI">Transclusion / Block Reference with Emacs (Org Mode) - Prototype - YouTube</a>
</p>
</div>
</div>
</div>
<div id="outline-container-stackexchange" class="outline-3">
<h3 id="stackexchange"><span class="section-number-3">2.4.</span> StackExchange</h3>
<div class="outline-text-3" id="text-stackexchange">
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F15328515%2Fiso-transclusion-in-emacs-org-mode%5D%5Binclude%20-%20ISO%20transclusion%20in%20emacs%20org-mode%3F%20-%20Stack%20Overflow%5D%5D" class="outline-4">
<h4 id="%5B%5Bhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F15328515%2Fiso-transclusion-in-emacs-org-mode%5D%5Binclude%20-%20ISO%20transclusion%20in%20emacs%20org-mode%3F%20-%20Stack%20Overflow%5D%5D"><span class="section-number-4">2.4.1.</span> <a href="https://stackoverflow.com/questions/15328515/iso-transclusion-in-emacs-org-mode">include - ISO transclusion in emacs org-mode? - Stack Overflow</a></h4>
<div class="outline-text-4" id="text-2-4-1">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2013-03-10 Sun]</span></span>
</p>
<blockquote>
<p>
Q: is there any way to do transclusion in emacs org-mode?
</p>
<p>
By "transclusion", I mean stuff like, at some point in fileA.org and fileB.org, "including" fileInc.org - and having the tree from fileInc.org appear in both places. Actually appear, not just be linked to. (Possibly with conditional inclusion, transformation, e.g. nesting depth (number of ***s)).
</p>
<p>
I know about #setupfile, but that seems only to work for modes, not real text.
</p>
<p>
I know about <a href="http://orgmode.org/manual/Include-files.html">http://orgmode.org/manual/Include-files.html</a>, but AFAIK they only work at export time.
</p>
<p>
I am looking for something that works in a normal emacs org-mode buffer. (Actually, something that worked in non-org-mode buffers might be nice.)
</p>
<p>
I have boiler plate that I want to include in multiple files.
</p>
<p>
Does something like this exist?
</p>
</blockquote>
<p>
<a href="https://stackoverflow.com/users/1617649/rob">Rob</a> replies with an example of a simple Org dynamic block that provides read-only transclusion:
</p>
<blockquote>
<p>
Hmm… I don't think anything like this exists, but it was easy enough to write a dynamic block to do this. The following elisp works for me:
</p>
<p>
(defun org-dblock-write:transclusion (params)
(progn
(with-temp-buffer
(insert-file-contents (plist-get params :filename))
(let ((range-start (or (plist-get params :min) (line-number-at-pos (point-min))))
(range-end (or (plist-get params :max) (line-number-at-pos (point-max)))))
(copy-region-as-kill (line-beginning-position range-start)
(line-end-position range-end))))
(yank)))
</p>
<p>
Then to include a line range from a given file, you can create a dynamic block like so:
</p>
<p>
And auto-populate with `C-c C-x C-u`. Skip the min and max args to include the entire file. Note that you can bind `org-update-all-dblocks` to a hook, so that this range is updated whenever you visit the file or save.
</p>
<p>
More info on dynamic blocks at <a href="http://orgmode.org/org.html#Dynamic-blocks">http://orgmode.org/org.html#Dynamic-blocks</a>. Hope this helps!
</p>
</blockquote>
</div>
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Femacs.stackexchange.com%2Fquestions%2F56201%2Fis-there-an-emacs-package-which-can-mirror-a-region%2F56202%2356202%5D%5BIs%20there%20an%20emacs%20package%20which%20can%20mirror%20a%20region%3F%20-%20Emacs%20Stack%20Exchange%5D%5D" class="outline-4">
<h4 id="%5B%5Bhttps%3A%2F%2Femacs.stackexchange.com%2Fquestions%2F56201%2Fis-there-an-emacs-package-which-can-mirror-a-region%2F56202%2356202%5D%5BIs%20there%20an%20emacs%20package%20which%20can%20mirror%20a%20region%3F%20-%20Emacs%20Stack%20Exchange%5D%5D"><span class="section-number-4">2.4.2.</span> <a href="https://emacs.stackexchange.com/questions/56201/is-there-an-emacs-package-which-can-mirror-a-region/56202#56202">Is there an emacs package which can mirror a region? - Emacs Stack Exchange</a></h4>
<div class="outline-text-4" id="text-2-4-2">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2020-03-17 Tue]</span></span>
</p>
<blockquote>
<p>
Say, I have a buffer A in which there is a region of text from some position pos1 to an other position pos2.
</p>
<p>
I switch to buffer B, call a function with buffer A, pos1 and pos2 as parameters and it copies the referred region to buffer B at point and lets me edit it at either place with all the edits made in buffer B's relevant region mirrored to buffer A's relevant region and vica versa.
</p>
</blockquote>
<p>
Includes the following reply from <a href="https://emacs.stackexchange.com/users/2370/tobias">Tobias</a>, including some sample code (omitted here):
</p>
<blockquote>
<p>
The documentation string for the command `text-clone-create`:
</p>
<p>
> (text-clone-create START END &optional SPREADP SYNTAX)
>
> Create a text clone of START…END at point.
> Text clones are chunks of text that are automatically kept identical:
> changes done to one of the clones will be immediately propagated to the other.
>
> The buffer’s content at point is assumed to be already identical to
> the one between START and END.
> If SYNTAX is provided it’s a regexp that describes the possible text of
> the clones; the clone will be shrunk or killed if necessary to ensure that
> its text matches the regexp.
> If SPREADP is non-nil it indicates that text inserted before/after the
> clone should be incorporated in the clone.
</p>
<p>
Note, that you must copy the text as the first action yourself.
</p>
<p>
Pityingly, the original version only works for one buffer. But it is easy to fix it for the case that original and clone do not have the same buffer. In the following Elisp code I marked the changed lines with `;;< Tobias`.
</p>
<p>
There is also an interactive helper command `my-clone` in the code.
</p>
<ol class="org-ol">
<li>Mark the region you want to clone.</li>
<li>Call <kbd>M-x</kbd> `my-clone` <kbd>RET</kbd>. Emacs goes into `recursive-edit` state.</li>
<li>Navigate to the buffer and to the position where you want to clone the previously marked region.</li>
<li>Finish `recursive-edit` with <kbd>C-M-c</kbd>.</li>
<li>Now edit either the original region or the clone. The modifications are replicated in the other region.</li>
</ol>
</blockquote>
</div>
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Femacs.stackexchange.com%2Fquestions%2F12562%2Forg-mode-headings-in-multiple-places-at-once-transclusion%5D%5BOrg-mode%20headings%20in%20multiple%20places%20at%20once%3F%20%28transclusion%29%20-%20Emacs%20Stack%20Exchange%5D%5D" class="outline-4">
<h4 id="%5B%5Bhttps%3A%2F%2Femacs.stackexchange.com%2Fquestions%2F12562%2Forg-mode-headings-in-multiple-places-at-once-transclusion%5D%5BOrg-mode%20headings%20in%20multiple%20places%20at%20once%3F%20%28transclusion%29%20-%20Emacs%20Stack%20Exchange%5D%5D"><span class="section-number-4">2.4.3.</span> <a href="https://emacs.stackexchange.com/questions/12562/org-mode-headings-in-multiple-places-at-once-transclusion">Org-mode headings in multiple places at once? (transclusion) - Emacs Stack Exchange</a></h4>
<div class="outline-text-4" id="text-2-4-3">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2015-05-20 Wed]</span></span>
</p>
<blockquote>
<p>
I'd like to organize my headings in multiple ways at once. (with the same degree of flexibility that I have when organizing things in any one place - e.g. more than the Agenda provides)
</p>
<p>
Ideally I'd be able to make a heading in part of a document, and then create a "hard link" to the heading somewhere else, which would update both as the content of heading changed.
</p>
<p>
Next best would be "soft links" which only store the heading content in one canonical location, and just show it in the other location (and if you edit it in either, it just updates in the canonical location).
</p>
<p>
Right now the best I know how to do is just create normal links, which I need to manually follow to see the content. Is there any way to do better than this?
</p>
</blockquote>
<p>
Replies point to <code>emacs-freex</code> and <code>transclusion-minor-mode</code>.
</p>
</div>
</div>
</div>
</div>
<div id="outline-container-packages" class="outline-2">
<h2 id="packages"><span class="section-number-2">3.</span> Packages</h2>
<div class="outline-text-2" id="text-packages">
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fgithub.com%2Fgregdetre%2Femacs-freex%5D%5BGitHub%20-%20gregdetre%2Femacs-freex%3A%20Emacs%20Freex%20mode%20is%20a%20minor%20mode%20for%20organizing%20and%20editing%20a%20massively-hyperlinked%20database%20of%20your%20notes%20and%20ideas.%20It%27s%20a%20personal%20wiki%20on%20steroids.%5D%5D" class="outline-3">
<h3 id="%5B%5Bhttps%3A%2F%2Fgithub.com%2Fgregdetre%2Femacs-freex%5D%5BGitHub%20-%20gregdetre%2Femacs-freex%3A%20Emacs%20Freex%20mode%20is%20a%20minor%20mode%20for%20organizing%20and%20editing%20a%20massively-hyperlinked%20database%20of%20your%20notes%20and%20ideas.%20It%27s%20a%20personal%20wiki%20on%20steroids.%5D%5D"><span class="section-number-3">3.1.</span> <a href="https://github.com/gregdetre/emacs-freex">GitHub - gregdetre/emacs-freex: Emacs Freex mode is a minor mode for organizing and editing a massively-hyperlinked database of your notes and ideas. It's a personal wiki on steroids.</a></h3>
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fgithub.com%2Fmagnars%2Fmultifiles.el%5D%5BGitHub%20-%20magnars%2Fmultifiles.el%3A%20Work%20in%20progress%3A%20View%20and%20edit%20parts%20of%20multiple%20files%20in%20one%20buffer%5D%5D" class="outline-3">
<h3 id="%5B%5Bhttps%3A%2F%2Fgithub.com%2Fmagnars%2Fmultifiles.el%5D%5BGitHub%20-%20magnars%2Fmultifiles.el%3A%20Work%20in%20progress%3A%20View%20and%20edit%20parts%20of%20multiple%20files%20in%20one%20buffer%5D%5D"><span class="section-number-3">3.2.</span> <a href="https://github.com/magnars/multifiles.el">GitHub - magnars/multifiles.el: Work in progress: View and edit parts of multiple files in one buffer</a></h3>
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fgithub.com%2Fnobiot%2Forg-transclusion%5D%5BGitHub%20-%20nobiot%2Forg-transclusion%3A%20%28prototype%29%20Emacs%20package%20to%20enable%20transclusion%20with%20Org%20Mode%5D%5D" class="outline-3">
<h3 id="%5B%5Bhttps%3A%2F%2Fgithub.com%2Fnobiot%2Forg-transclusion%5D%5BGitHub%20-%20nobiot%2Forg-transclusion%3A%20%28prototype%29%20Emacs%20package%20to%20enable%20transclusion%20with%20Org%20Mode%5D%5D"><span class="section-number-3">3.3.</span> <a href="https://github.com/nobiot/org-transclusion">GitHub - nobiot/org-transclusion: (prototype) Emacs package to enable transclusion with Org Mode</a></h3>
<div class="outline-text-3" id="text-3-3">
<ul class="org-ul">
<li><a href="#%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fj6k2j8%2Forgmode_transclusionblockreference_prototype%2F%5D%5BOrg-mode%20Transclusion%2FBlock-reference%20Prototype%20%3A%20emacs%5D%5D">Discussion</a></li>
</ul>
</div>
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fgithub.com%2Fsynchrony%2Fsmsn-why%5D%5BGitHub%20-%20synchrony%2Fsmsn-why%3A%20Get%20psyched%20about%20mapping%20knowledge%21%5D%5D" class="outline-3">
<h3 id="%5B%5Bhttps%3A%2F%2Fgithub.com%2Fsynchrony%2Fsmsn-why%5D%5BGitHub%20-%20synchrony%2Fsmsn-why%3A%20Get%20psyched%20about%20mapping%20knowledge%21%5D%5D"><span class="section-number-3">3.4.</span> <a href="https://github.com/synchrony/smsn-why">GitHub - synchrony/smsn-why: Get psyched about mapping knowledge!</a></h3>
</div>
<div id="outline-container-%5B%5Bhttps%3A%2F%2Fgithub.com%2Fwhacked%2Ftransclusion-minor-mode%5D%5BGitHub%20-%20whacked%2Ftransclusion-minor-mode%3A%20emacs%20minor%20mode%20for%20org-mode%20file%20transclusion%20using%20embedded%20overlays%5D%5D" class="outline-3">
<h3 id="%5B%5Bhttps%3A%2F%2Fgithub.com%2Fwhacked%2Ftransclusion-minor-mode%5D%5BGitHub%20-%20whacked%2Ftransclusion-minor-mode%3A%20emacs%20minor%20mode%20for%20org-mode%20file%20transclusion%20using%20embedded%20overlays%5D%5D"><span class="section-number-3">3.5.</span> <a href="https://github.com/whacked/transclusion-minor-mode">GitHub - whacked/transclusion-minor-mode: emacs minor mode for org-mode file transclusion using embedded overlays</a></h3>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: me</p>
<p class="date">Created: 2024-10-16 Wed 19:57</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>