-
Notifications
You must be signed in to change notification settings - Fork 35
/
org-mode-map.html
executable file
·533 lines (510 loc) · 24.3 KB
/
org-mode-map.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
<?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>
<title>org-mode-map</title>
<!-- 2015-10-19 Mon 13:37 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" />
<link rel="stylesheet" type="text/css" href="./css/foundation.min.css"></link>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'></link>
<link rel="stylesheet" type="text/css" href="./css/org-export.css"></link>
<link rel="stylesheet" type="text/css" href="./css/style.css"></link>
<link rel="stylesheet" type="text/css" href="./css/emacs-notes.css"></link>
<script src="./js/jquery.min.js"></script>
<script src="./js/emacs-notes.js"></script>
</head>
<body>
<div id="content">
<h1 class="title">org-mode-map</h1>
<p>
Proof of concept for computer-generated version of Org Mode learning map from
<a href="http://emacslife.com/blog-posts/2014-01-13-tips-learning-org-mode-emacs.html">http://emacslife.com/blog-posts/2014-01-13-tips-learning-org-mode-emacs.html</a> . This allows us to use checkboxes to mark some items as done.
</p>
<ul class="org-ul">
<li><code>[X]</code> Outlines
</li>
<li><code>[X]</code> TODOs
</li>
</ul>
<p>
Implemented as a checklist instead of DONE keywords in case we're pulling in the outline from a separate file (so that people can track their completion state separate from the Git copy?)
</p>
<div id="outline-container-Map" class="outline-2">
<h2 id="Map"><a id="sec-1" name="sec-1"></a>Map</h2>
<div class="outline-text-2" id="text-Map">
<pre class="example">
org_mode_map.png
</pre>
<div class="figure">
<p><img src="org_mode_map.png" alt="org_mode_map.png" usemap="#G" style="max-width: none" />
</p>
</div>
<map id="G" name="G">
<area shape="rect" id="node1" href="#Dynamic_blocks" title="Dynamic blocks" alt="" coords="313,188,391,211"/>
<area shape="rect" id="node2" href="#Babel" title="Babel" alt="" coords="529,235,564,258"/>
<area shape="rect" id="node3" href="#Columns" title="Columns" alt="" coords="328,235,377,258"/>
<area shape="rect" id="node4" href="#Properties" title="Properties" alt="" coords="324,281,380,304"/>
<area shape="rect" id="node5" href="#Effort" title="Effort" alt="" coords="266,188,301,211"/>
<area shape="rect" id="node6" href="#Report" title="Report" alt="" coords="291,142,331,165"/>
<area shape="rect" id="node7" href="#Clock" title="Clock" alt="" coords="294,95,329,119"/>
<area shape="rect" id="node8" href="#Multiple_files" title="Multiple files" alt="" coords="2,235,68,258"/>
<area shape="rect" id="node9" href="#Include" title="Include" alt="" coords="14,281,57,304"/>
<area shape="rect" id="node10" href="#Archiving" title="Archiving" alt="" coords="29,188,79,211"/>
<area shape="rect" id="node11" href="#Refiling" title="Refiling" alt="" coords="99,142,142,165"/>
<area shape="rect" id="node12" href="#Sorting" title="Sorting" alt="" coords="100,188,141,211"/>
<area shape="rect" id="node13" href="#Capture" title="Capture" alt="" coords="107,95,153,119"/>
<area shape="rect" id="node14" href="#Search" title="Search" alt="" coords="211,281,251,304"/>
<area shape="rect" id="node15" href="#Stuck_projects" title="Stuck projects" alt="" coords="153,328,224,351"/>
<area shape="rect" id="node16" href="#Custom_agenda" title="Custom agenda" alt="" coords="235,328,314,351"/>
<area shape="rect" id="node17" href="#Tags" title="Tags" alt="" coords="214,235,249,258"/>
<area shape="rect" id="node18" href="#Repeating" title="Repeating" alt="" coords="261,235,315,258"/>
<area shape="rect" id="node19" href="#Logs" title="Logs" alt="" coords="271,281,306,304"/>
<area shape="rect" id="node20" href="#Agendas" title="Agendas" alt="" coords="179,188,227,211"/>
<area shape="rect" id="node21" href="#MobileOrg" title="MobileOrg" alt="" coords="80,235,136,258"/>
<area shape="rect" id="node22" href="#Deadlines" title="Deadlines" alt="" coords="148,235,202,258"/>
<area shape="rect" id="node23" href="#Date_offsets" title="Date offsets" alt="" coords="172,142,234,165"/>
<area shape="rect" id="node24" href="#Scheduling" title="Scheduling" alt="" coords="174,95,232,119"/>
<area shape="rect" id="node25" href="#TODOs" title="TODOs" alt="" coords="242,49,284,72"/>
<area shape="rect" id="node26" href="#Config" title="Config" alt="" coords="244,95,282,119"/>
<area shape="rect" id="node27" href="#Publishing" title="Publishing" alt="" coords="661,235,716,258"/>
<area shape="rect" id="node28" href="#Blogging" title="Blogging" alt="" coords="665,281,712,304"/>
<area shape="rect" id="node29" href="#File_options" title="File options" alt="" coords="658,188,719,211"/>
<area shape="rect" id="node30" href="#Export" title="Export" alt="" coords="593,142,632,165"/>
<area shape="rect" id="node31" href="#Blocks" title="Blocks" alt="" coords="501,188,539,211"/>
<area shape="rect" id="node32" href="#Presentations" title="Presentations" alt="" coords="551,188,622,211"/>
<area shape="rect" id="node33" href="#Links" title="Links" alt="" coords="764,142,799,165"/>
<area shape="rect" id="node34" href="#Footnotes" title="Footnotes" alt="" coords="784,188,838,211"/>
<area shape="rect" id="node35" href="#Attachments" title="Attachments" alt="" coords="849,188,916,211"/>
<area shape="rect" id="node36" href="#Images" title="Images" alt="" coords="731,188,772,211"/>
<area shape="rect" id="node37" href="#Tables" title="Tables" alt="" coords="891,142,930,165"/>
<area shape="rect" id="node38" href="#Spreadsheets" title="Spreadsheets" alt="" coords="927,188,997,211"/>
<area shape="rect" id="node39" href="#Lists" title="Lists" alt="" coords="487,142,522,165"/>
<area shape="rect" id="node40" href="#List_manipulation" title="List manipulation" alt="" coords="403,188,489,211"/>
<area shape="rect" id="node41" href="#Simple_markup" title="Simple markup" alt="" coords="575,95,651,119"/>
<area shape="rect" id="node42" href="#Outline_manipulation" title="Outline manipulation" alt="" coords="428,49,532,72"/>
<area shape="rect" id="node43" href="#Outlines" title="Outlines" alt="" coords="348,3,395,26"/>
</map>
</div>
<div id="outline-container-Outlines" class="outline-3">
<h3 id="Outlines"><a id="sec-1-1" name="sec-1-1"></a>Outlines</h3>
<div class="outline-text-3" id="text-Outlines">
<p>
Resources: <a href="http://orgmode.org/manual/Document-Structure.html#Document-Structure">org: Document Structure</a>
</p>
<p>
Next: <a href="#sec-1-2">Outline manipulation</a>
See also: <a href="#sec-1-14">TODOs</a>
</p>
</div>
</div>
<div id="outline-container-Outline_manipulation" class="outline-3">
<h3 id="Outline_manipulation"><a id="sec-1-2" name="sec-1-2"></a>Outline manipulation</h3>
<div class="outline-text-3" id="text-Outline_manipulation">
<p>
Resources: <a href="http://orgmode.org/manual/Structure-editing.html#Structure-editing">org: Structure editing</a>
</p>
<p>
Next: <a href="#sec-1-3">Simple markup</a>
</p>
</div>
</div>
<div id="outline-container-Simple_markup" class="outline-3">
<h3 id="Simple_markup"><a id="sec-1-3" name="sec-1-3"></a>Simple markup</h3>
<div class="outline-text-3" id="text-Simple_markup">
<p>
Next: <a href="#sec-1-8">Links</a>
See also: <a href="#sec-1-4">Lists</a>
See also: <a href="#sec-1-6">Tables</a>
See also: <a href="#sec-1-9">Export</a>
</p>
</div>
</div>
<div id="outline-container-Lists" class="outline-3">
<h3 id="Lists"><a id="sec-1-4" name="sec-1-4"></a>Lists</h3>
<div class="outline-text-3" id="text-Lists">
<p>
Next: <a href="#sec-1-5">List manipulation</a>
</p>
</div>
</div>
<div id="outline-container-List_manipulation" class="outline-3">
<h3 id="List_manipulation"><a id="sec-1-5" name="sec-1-5"></a>List manipulation</h3>
<div class="outline-text-3" id="text-List_manipulation">
</div>
</div>
<div id="outline-container-Tables" class="outline-3">
<h3 id="Tables"><a id="sec-1-6" name="sec-1-6"></a>Tables</h3>
<div class="outline-text-3" id="text-Tables">
<p>
Next: <a href="#sec-1-7">Spreadsheets</a>
</p>
</div>
</div>
<div id="outline-container-Spreadsheets" class="outline-3">
<h3 id="Spreadsheets"><a id="sec-1-7" name="sec-1-7"></a>Spreadsheets</h3>
<div class="outline-text-3" id="text-Spreadsheets">
</div>
</div>
<div id="outline-container-Links" class="outline-3">
<h3 id="Links"><a id="sec-1-8" name="sec-1-8"></a>Links</h3>
<div class="outline-text-3" id="text-Links">
<p>
Next: <a href="#sec-1-41">Images</a>
See also: <a href="#sec-1-42">Attachments</a>
See also: <a href="#sec">Footnotes</a>
</p>
</div>
</div>
<div id="outline-container-Export" class="outline-3">
<h3 id="Export"><a id="sec-1-9" name="sec-1-9"></a>Export</h3>
<div class="outline-text-3" id="text-Export">
<p>
Next: <a href="#sec-1-11">File options</a>
See also: <a href="#sec-1-37">Babel</a>
See also: <a href="#sec-1-38">Presentations</a>
See also: <a href="#sec-1-10">Blocks</a>
</p>
</div>
</div>
<div id="outline-container-Blocks" class="outline-3">
<h3 id="Blocks"><a id="sec-1-10" name="sec-1-10"></a>Blocks</h3>
<div class="outline-text-3" id="text-Blocks">
</div>
</div>
<div id="outline-container-File_options" class="outline-3">
<h3 id="File_options"><a id="sec-1-11" name="sec-1-11"></a>File options</h3>
<div class="outline-text-3" id="text-File_options">
<p>
Next: <a href="#sec-1-12">Publishing</a>
</p>
</div>
</div>
<div id="outline-container-Publishing" class="outline-3">
<h3 id="Publishing"><a id="sec-1-12" name="sec-1-12"></a>Publishing</h3>
<div class="outline-text-3" id="text-Publishing">
<p>
Next: <a href="#sec-1-13">Blogging</a>
</p>
</div>
</div>
<div id="outline-container-Blogging" class="outline-3">
<h3 id="Blogging"><a id="sec-1-13" name="sec-1-13"></a>Blogging</h3>
<div class="outline-text-3" id="text-Blogging">
</div>
</div>
<div id="outline-container-TODOs" class="outline-3">
<h3 id="TODOs"><a id="sec-1-14" name="sec-1-14"></a>TODOs</h3>
<div class="outline-text-3" id="text-TODOs">
<p>
Next: <a href="#sec-1-15">Scheduling</a>
See also: <a href="#sec-1-24">Config</a>
See also: <a href="#sec-1-32">Clock</a>
See also: <a href="#sec-1-25">Capture</a>
</p>
</div>
</div>
<div id="outline-container-Scheduling" class="outline-3">
<h3 id="Scheduling"><a id="sec-1-15" name="sec-1-15"></a>Scheduling</h3>
<div class="outline-text-3" id="text-Scheduling">
<p>
Next: <a href="#sec-1-16">Date offsets</a>
</p>
</div>
</div>
<div id="outline-container-Date_offsets" class="outline-3">
<h3 id="Date_offsets"><a id="sec-1-16" name="sec-1-16"></a>Date offsets</h3>
<div class="outline-text-3" id="text-Date_offsets">
<p>
Next: <a href="#sec-1-17">Agendas</a>
</p>
</div>
</div>
<div id="outline-container-Agendas" class="outline-3">
<h3 id="Agendas"><a id="sec-1-17" name="sec-1-17"></a>Agendas</h3>
<div class="outline-text-3" id="text-Agendas">
<p>
Next: <a href="#sec-1-39">Deadlines</a>
See also: <a href="#sec-1-18">Repeating</a>
See also: <a href="#sec-1-20">Tags</a>
See also: <a href="#sec-1-31">MobileOrg</a>
</p>
</div>
</div>
<div id="outline-container-Repeating" class="outline-3">
<h3 id="Repeating"><a id="sec-1-18" name="sec-1-18"></a>Repeating</h3>
<div class="outline-text-3" id="text-Repeating">
<p>
Next: <a href="#sec-1-19">Logs</a>
</p>
</div>
</div>
<div id="outline-container-Logs" class="outline-3">
<h3 id="Logs"><a id="sec-1-19" name="sec-1-19"></a>Logs</h3>
<div class="outline-text-3" id="text-Logs">
</div>
</div>
<div id="outline-container-Tags" class="outline-3">
<h3 id="Tags"><a id="sec-1-20" name="sec-1-20"></a>Tags</h3>
<div class="outline-text-3" id="text-Tags">
<p>
Next: <a href="#sec-1-21">Search</a>
</p>
</div>
</div>
<div id="outline-container-Search" class="outline-3">
<h3 id="Search"><a id="sec-1-21" name="sec-1-21"></a>Search</h3>
<div class="outline-text-3" id="text-Search">
<p>
Next: <a href="#sec-1-22">Custom agenda</a>
See also: <a href="#sec-1-23">Stuck projects</a>
</p>
</div>
</div>
<div id="outline-container-Custom_agenda" class="outline-3">
<h3 id="Custom_agenda"><a id="sec-1-22" name="sec-1-22"></a>Custom agenda</h3>
<div class="outline-text-3" id="text-Custom_agenda">
</div>
</div>
<div id="outline-container-Stuck_projects" class="outline-3">
<h3 id="Stuck_projects"><a id="sec-1-23" name="sec-1-23"></a>Stuck projects</h3>
<div class="outline-text-3" id="text-Stuck_projects">
</div>
</div>
<div id="outline-container-Config" class="outline-3">
<h3 id="Config"><a id="sec-1-24" name="sec-1-24"></a>Config</h3>
<div class="outline-text-3" id="text-Config">
</div>
</div>
<div id="outline-container-Capture" class="outline-3">
<h3 id="Capture"><a id="sec-1-25" name="sec-1-25"></a>Capture</h3>
<div class="outline-text-3" id="text-Capture">
<p>
Next: <a href="#sec-1-26">Refiling</a>
</p>
</div>
</div>
<div id="outline-container-Refiling" class="outline-3">
<h3 id="Refiling"><a id="sec-1-26" name="sec-1-26"></a>Refiling</h3>
<div class="outline-text-3" id="text-Refiling">
<p>
Next: <a href="#sec-1-27">Sorting</a>
See also: <a href="#sec-1-28">Archiving</a>
</p>
</div>
</div>
<div id="outline-container-Sorting" class="outline-3">
<h3 id="Sorting"><a id="sec-1-27" name="sec-1-27"></a>Sorting</h3>
<div class="outline-text-3" id="text-Sorting">
</div>
</div>
<div id="outline-container-Archiving" class="outline-3">
<h3 id="Archiving"><a id="sec-1-28" name="sec-1-28"></a>Archiving</h3>
<div class="outline-text-3" id="text-Archiving">
<p>
Next: <a href="#sec-1-29">Multiple files</a>
</p>
</div>
</div>
<div id="outline-container-Multiple_files" class="outline-3">
<h3 id="Multiple_files"><a id="sec-1-29" name="sec-1-29"></a>Multiple files</h3>
<div class="outline-text-3" id="text-Multiple_files">
<p>
Next: <a href="#sec-1-30">Include</a>
</p>
</div>
</div>
<div id="outline-container-Include" class="outline-3">
<h3 id="Include"><a id="sec-1-30" name="sec-1-30"></a>Include</h3>
<div class="outline-text-3" id="text-Include">
</div>
</div>
<div id="outline-container-MobileOrg" class="outline-3">
<h3 id="MobileOrg"><a id="sec-1-31" name="sec-1-31"></a>MobileOrg</h3>
<div class="outline-text-3" id="text-MobileOrg">
</div>
</div>
<div id="outline-container-Clock" class="outline-3">
<h3 id="Clock"><a id="sec-1-32" name="sec-1-32"></a>Clock</h3>
<div class="outline-text-3" id="text-Clock">
<p>
Next: <a href="#sec-1-33">Report</a>
</p>
</div>
</div>
<div id="outline-container-Report" class="outline-3">
<h3 id="Report"><a id="sec-1-33" name="sec-1-33"></a>Report</h3>
<div class="outline-text-3" id="text-Report">
<p>
Next: <a href="#sec-1-34">Effort</a>
See also: <a href="#sec-1-36">Dynamic blocks</a>
</p>
</div>
</div>
<div id="outline-container-Effort" class="outline-3">
<h3 id="Effort"><a id="sec-1-34" name="sec-1-34"></a>Effort</h3>
<div class="outline-text-3" id="text-Effort">
<p>
Next: <a href="#sec-1-35">Columns</a>
</p>
</div>
</div>
<div id="outline-container-Columns" class="outline-3">
<h3 id="Columns"><a id="sec-1-35" name="sec-1-35"></a>Columns</h3>
<div class="outline-text-3" id="text-Columns">
<p>
Next: <a href="#sec-1-40">Properties</a>
</p>
</div>
</div>
<div id="outline-container-Dynamic_blocks" class="outline-3">
<h3 id="Dynamic_blocks"><a id="sec-1-36" name="sec-1-36"></a>Dynamic blocks</h3>
<div class="outline-text-3" id="text-Dynamic_blocks">
<p>
Next: <a href="#sec-1-37">Babel</a>
</p>
</div>
</div>
<div id="outline-container-Babel" class="outline-3">
<h3 id="Babel"><a id="sec-1-37" name="sec-1-37"></a>Babel</h3>
<div class="outline-text-3" id="text-Babel">
</div>
</div>
<div id="outline-container-Presentations" class="outline-3">
<h3 id="Presentations"><a id="sec-1-38" name="sec-1-38"></a>Presentations</h3>
<div class="outline-text-3" id="text-Presentations">
</div>
</div>
<div id="outline-container-Deadlines" class="outline-3">
<h3 id="Deadlines"><a id="sec-1-39" name="sec-1-39"></a>Deadlines</h3>
<div class="outline-text-3" id="text-Deadlines">
</div>
</div>
<div id="outline-container-Properties" class="outline-3">
<h3 id="Properties"><a id="sec-1-40" name="sec-1-40"></a>Properties</h3>
<div class="outline-text-3" id="text-Properties">
</div>
</div>
<div id="outline-container-Images" class="outline-3">
<h3 id="Images"><a id="sec-1-41" name="sec-1-41"></a>Images</h3>
<div class="outline-text-3" id="text-Images">
</div>
</div>
<div id="outline-container-Attachments" class="outline-3">
<h3 id="Attachments"><a id="sec-1-42" name="sec-1-42"></a>Attachments</h3>
<div class="outline-text-3" id="text-Attachments">
</div>
</div>
</div>
<div id="outline-container-Code" class="outline-2">
<h2 id="Code"><a id="sec-2" name="sec-2"></a>Code</h2>
<div class="outline-text-2" id="text-Code">
<div class="org-src-container">
<pre class="src src-emacs-lisp" id="path-from-tree">(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">sacha/fill-string</span> (string new-fill-column <span style="font-weight: bold; text-decoration: underline;">&optional</span> replace-char)
<span style="font-style: italic;">"Wrap STRING to NEW-FILL-COLUMN. Change newlines to REPLACE-CHAR."</span>
(<span style="font-weight: bold;">with-temp-buffer</span>
(insert string)
(<span style="font-weight: bold;">let</span> ((fill-column new-fill-column))
(fill-region (point-min) (point-max))
(<span style="font-weight: bold;">if</span> replace-char
(<span style="font-weight: bold;">progn</span>
(goto-char (point-min))
(<span style="font-weight: bold;">while</span> (re-search-forward <span style="font-style: italic;">"\n"</span> nil t)
(replace-match replace-char t t))))
(buffer-string))))
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">sacha/org-map-path</span> ()
<span style="font-style: italic;">"Return an alist, based on the tree and \"so that I can\" link structure.</span>
<span style="font-style: italic;">Structure: ((nodes . ((components) ...)) (edges . ((a . b) ...)))"</span>
(<span style="font-weight: bold;">let</span> (nodes edges)
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">Go through the entries</span>
(org-map-entries
(<span style="font-weight: bold;">lambda</span> ()
(<span style="font-weight: bold;">let</span> ((heading (org-heading-components)))
(<span style="font-weight: bold;">when</span> (= (car heading) 2)
(<span style="font-weight: bold;">save-excursion</span>
(<span style="font-weight: bold;">save-restriction</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">Ignore subtrees in the body</span>
(org-narrow-to-subtree)
(<span style="font-weight: bold;">save-excursion</span>
(org-set-property <span style="font-style: italic;">"CUSTOM_ID"</span> (replace-regexp-in-string <span style="font-style: italic;">"[</span><span style="font-style: italic;">^</span><span style="font-style: italic;">A-Za-z0-9]"</span> <span style="font-style: italic;">"_"</span> (elt heading 4))))
(end-of-line)
(narrow-to-region
(point-min)
(<span style="font-weight: bold;">if</span> (re-search-forward
(concat <span style="font-style: italic;">"[\r\n]</span><span style="font-weight: bold; font-style: italic;">\\</span><span style="font-weight: bold; font-style: italic;">(</span><span style="font-style: italic;">"</span> org-outline-regexp <span style="font-style: italic;">"</span><span style="font-weight: bold; font-style: italic;">\\</span><span style="font-weight: bold; font-style: italic;">)</span><span style="font-style: italic;">"</span>) nil t)
(match-beginning 1)
(point-max)))
(goto-char (point-min))
(<span style="font-weight: bold;">when</span> (> (car heading) 1)
(setq nodes (cons heading nodes)))
(<span style="font-weight: bold;">while</span> (re-search-forward <span style="font-style: italic;">"</span><span style="font-weight: bold; font-style: italic;">\\</span><span style="font-weight: bold; font-style: italic;">(</span><span style="font-style: italic;">Next</span><span style="font-weight: bold; font-style: italic;">\\</span><span style="font-weight: bold; font-style: italic;">|</span><span style="font-style: italic;">See also</span><span style="font-weight: bold; font-style: italic;">\\</span><span style="font-weight: bold; font-style: italic;">)</span><span style="font-style: italic;">:"</span> nil t)
(<span style="font-weight: bold;">while</span> (re-search-forward org-bracket-link-regexp (line-end-position) t)
(setq edges (cons (cons (elt heading 4) (match-string-no-properties 1)) edges))))))))))
(list (cons 'nodes nodes) (cons 'edges edges))))
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">sacha/org-map-path-to-graphviz</span> (map fill-column)
<span style="font-style: italic;">"Convert MAP to a graphviz representation. Wrap titles at FILL-COLUMN."</span>
(<span style="font-weight: bold;">let</span> ((completed
(mapcar (<span style="font-weight: bold;">lambda</span> (x)
(<span style="font-weight: bold;">if</span> (string-match <span style="font-style: italic;">"\\[</span><span style="font-weight: bold; font-style: italic;">\\</span><span style="font-weight: bold; font-style: italic;">(</span><span style="font-style: italic;">.*?</span><span style="font-weight: bold; font-style: italic;">\\</span><span style="font-weight: bold; font-style: italic;">)</span><span style="font-style: italic;">\\] +</span><span style="font-weight: bold; font-style: italic;">\\</span><span style="font-weight: bold; font-style: italic;">(</span><span style="font-style: italic;">.*</span><span style="font-weight: bold; font-style: italic;">\\</span><span style="font-weight: bold; font-style: italic;">)</span><span style="font-style: italic;">"</span> x) (cons (match-string 2 x) (match-string 1 x)))) completed)))
(concat
<span style="font-style: italic;">"digraph G {\n"</span>
<span style="font-style: italic;">"node [shape=box,fontname=\"Open Sans\",pad=1]\n"</span>
<span style="font-style: italic;">"edge [color=\"#CCCCCC\"]\n"</span>
(mapconcat
(<span style="font-weight: bold;">lambda</span> (x)
(format <span style="font-style: italic;">"\"%s\" -> \"%s\""</span>
(sacha/fill-string (car x) fill-column <span style="font-style: italic;">"\\n"</span>)
(sacha/fill-string (cdr x) fill-column <span style="font-style: italic;">"\\n"</span>)))
(cdr (assoc 'edges map))
<span style="font-style: italic;">"\n"</span>)
<span style="font-style: italic;">"\n"</span>
(mapconcat (<span style="font-weight: bold;">lambda</span> (x)
(format
(<span style="font-weight: bold;">if</span> (equal (assoc-default (elt x 4) completed) <span style="font-style: italic;">"CBON"</span>)
<span style="font-style: italic;">"\"%s\" [style=filled, URL=\"#%s\", tooltip=\"%s\"]"</span>
<span style="font-style: italic;">"\"%s\" [URL=\"#%s\", tooltip=\"%s\"]"</span>)
(sacha/fill-string (elt x 4) fill-column <span style="font-style: italic;">"\\n"</span>)
(replace-regexp-in-string <span style="font-style: italic;">"[</span><span style="font-style: italic;">^</span><span style="font-style: italic;">A-Za-z0-9]"</span> <span style="font-style: italic;">"_"</span> (elt x 4))
(elt x 4)))
(cdr (assoc 'nodes map)) <span style="font-style: italic;">"\n"</span>)
<span style="font-style: italic;">"}\n"</span>)))
(org-babel-execute:dot (sacha/org-map-path-to-graphviz (sacha/org-map-path) fill-column) params)
</pre>
</div>
<style type="text/css">
.back-to-top {
position: fixed;
bottom: 2em;
right: 0px;
text-decoration: none;
color: #000000;
background-color: rgba(235, 235, 235, 0.80);
font-size: 12px;
padding: 1em;
display: none;
}
.back-to-top:hover {
background-color: rgba(135, 135, 135, 0.50);
}
</style>
<a class="back-to-top" href="#top">Back to top</a>
<script type="text/javascript">
var offset = 220;
var duration = 500;
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop() > offset) {
jQuery('.back-to-top').fadeIn(duration);
} else {
jQuery('.back-to-top').fadeOut(duration);
}
});
</script>
</div>
</div>
</div>
<div id="postamble" class="status">
<div class="back-to-top"><a href="#top">Back to top</a> | <a href="mailto:[email protected]">E-mail me</a></div>
</div>
</body>
</html>