-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathworkbook.leo
More file actions
638 lines (621 loc) · 22.2 KB
/
Copy pathworkbook.leo
File metadata and controls
638 lines (621 loc) · 22.2 KB
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
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by Leo: https://leo-editor.github.io/leo-editor/leo_toc.html -->
<leo_file xmlns:leo="https://leo-editor.github.io/leo-editor/namespaces/leo-python-editor/1.1" >
<leo_header file_format="2"/>
<globals/>
<preferences/>
<find_panel_settings/>
<vnodes>
<v t="ekr.20070622214401"><vh>Startup</vh>
<v t="ekr.20060112110750"><vh>Local buttons</vh>
<v t="ekr.20111006212449.11850"><vh>@button check-settings</vh>
<v t="ekr.20111006212449.11851"><vh>ctor</vh></v>
<v t="ekr.20111006212449.11852"><vh>check & helpers</vh>
<v t="ekr.20181018060340.1"><vh>filter_get_x</vh></v>
<v t="ekr.20181018065113.1"><vh>filter_user_config</vh></v>
</v>
<v t="ekr.20200226105416.1"><vh>check_user_settings</vh></v>
<v t="ekr.20111006212449.11853"><vh>error</vh></v>
<v t="ekr.20111006212449.11854"><vh>get_commanders</vh></v>
<v t="ekr.20111006212449.11855"><vh>get_configs & helpers</vh>
<v t="ekr.20111006212449.11856"><vh>get_configs_from_outline & helper</vh>
<v t="ekr.20111006212449.11857"><vh>scan_for_configs</vh></v>
</v>
</v>
<v t="ekr.20111006212449.11858"><vh>get_settings & helper</vh>
<v t="ekr.20111006212449.11859"><vh>is_setting</vh></v>
<v t="ekr.20111006212449.11860"><vh>parse_setting</vh></v>
</v>
<v t="ekr.20111006212449.11861"><vh>munge</vh></v>
<v t="ekr.20111006212449.11862"><vh>run</vh></v>
</v>
<v t="sta.20250728112920.1"><vh>@button build-popen</vh></v>
</v>
<v t="ekr.20111026083456.16490"><vh>Local commands</vh>
<v t="ekr.20111026083456.16491"><vh>@command print-all-plugins</vh></v>
</v>
<v t="ekr.20190324182659.1"><vh>script: make color nodes</vh></v>
<v t="sta.20240722203753.1"><vh>@settings</vh>
<v t="ekr.20140912075503.19263"><vh>@string font-family = Monaco, Source Code Pro</vh></v>
<v t="ekr.20140912075503.19264"><vh>@string font-size = 12pt </vh></v>
<v t="ekr.20140915194122.23413"><vh>@string medium-font-size = 10pt</vh></v>
<v t="ekr.20140915194122.21837"><vh>@string small-font-size = 10pt</vh></v>
<v t="ekr.20140912075503.19266"><vh>@string font-style = normal</vh></v>
<v t="ekr.20140912075503.19265"><vh>@string font-weight = normal</vh></v>
<v t="sta.20250621171647.1"><vh>@string qt-layout-name = layout-vertical-thirds</vh></v>
</v>
</v>
<v t="sta.20240722204640.1"><vh>src</vh>
<v t="sta.20250315072908.1"><vh>demos</vh>
<v t="sta.20250130115618.1"><vh>cmx</vh>
<v t="sta.20250130120008.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206091823.1"><vh>@auto cmx.c</vh></v>
</v>
<v t="sta.20250130115728.1"><vh>demo</vh>
<v t="sta.20250130120029.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206091847.1"><vh>@auto demo.c</vh></v>
</v>
</v>
<v t="sta.20241211203746.1"><vh>projects</vh>
<v t="sta.20250315073358.1"><vh>core</vh>
<v t="sta.20241211203834.1"><vh>py</vh>
<v t="sta.20241211203909.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206090014.1"><vh>@auto py.c</vh></v>
<v t="sta.20250206092311.1"><vh>@auto py.h</vh></v>
</v>
<v t="sta.20241211203934.1"><vh>pyjs</vh>
<v t="sta.20241211203950.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206091726.1"><vh>@auto pyjs.c</vh></v>
<v t="sta.20250206135316.1"><vh>@auto pyjs.h</vh></v>
</v>
</v>
<v t="sta.20250315073457.1"><vh>experimental</vh>
<v t="sta.20250130115409.1"><vh>cobra</vh>
<v t="sta.20250130115509.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206091745.1"><vh>@auto cobra.cpp</vh></v>
<v t="sta.20250621172200.1"><vh>@auto py_interpreter.h</vh></v>
</v>
<v t="sta.20250130115630.1"><vh>krait</vh>
<v t="sta.20250130120100.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206092000.1"><vh>@auto krait.c</vh></v>
</v>
<v t="sta.20250130120441.1"><vh>mamba</vh>
<v t="sta.20250130120448.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206092058.1"><vh>@auto mamba.c</vh></v>
<v t="sta.20250206092113.1"><vh>@auto py.h</vh></v>
</v>
<v t="sta.20250315073635.1"><vh>mpyx</vh>
<v t="sta.20250315073635.2"><vh>@auto-md README.md</vh></v>
<v t="sta.20250315073635.6"><vh>@auto mpyx.cpp</vh></v>
<v t="sta.20250315073635.20"><vh>@auto mpy_interpreter.h</vh></v>
<v t="sta.20250315073703.1"><vh>@auto CMakeLists.txt</vh></v>
</v>
<v t="sta.20250130115634.1"><vh>mxpy</vh>
<v t="sta.20250130120106.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206092137.1"><vh>@auto mxpy.c</vh></v>
</v>
<v t="sta.20250621172435.1"><vh>xpyc</vh>
<v t="sta.20250621172453.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250621172513.1"><vh>@auto xpyc.c</vh></v>
<v t="sta.20250621172542.1"><vh>services</vh>
<v t="sta.20250621172721.1"><vh>@auto main.c</vh></v>
</v>
</v>
</v>
<v t="sta.20250315073558.1"><vh>alternative</vh>
<v t="sta.20250130115638.1"><vh>pktpy</vh>
<v t="sta.20250130120112.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206135449.1"><vh>@auto pktpy.cpp</vh></v>
<v t="sta.20250206092152.1"><vh>@auto pktpy.h</vh></v>
</v>
<v t="sta.20250208015245.1"><vh>pktpy2</vh>
<v t="sta.20250208015319.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250208015334.1"><vh>@auto pktpy2.c</vh></v>
</v>
</v>
<v t="sta.20250315073407.1"><vh>net</vh>
<v t="sta.20250130115623.1"><vh>jmx</vh>
<v t="sta.20250130120047.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206091858.1"><vh>@auto jmx.c</vh></v>
</v>
<v t="sta.20250130115707.1"><vh>zedit</vh>
<v t="sta.20250130120124.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206135550.1"><vh>@auto zedit.c</vh></v>
</v>
<v t="sta.20250130115713.1"><vh>zpy</vh>
<v t="sta.20250130120129.1"><vh>@auto-md README.md</vh></v>
<v t="sta.20250206135613.1"><vh>@auto zpy.c</vh></v>
</v>
</v>
</v>
<v t="sta.20240722212036.1"><vh>@auto-md README.md</vh></v>
</v>
</vnodes>
<tnodes>
<t tx="ekr.20060112110750">@language python</t>
<t tx="ekr.20070622214401">@nocolor-node
Please don't change this node and its descendants; they are for Leo's
developers.
</t>
<t tx="ekr.20111006212449.11850">'''Check the consistency of all settings.'''
# https://github.com/leo-editor/leo-editor/issues/993
# https://github.com/leo-editor/leo-editor/issues/1511
class Controller:
@others
g.cls()
Controller(c).run()
</t>
<t tx="ekr.20111006212449.11851">def __init__(self, c):
self.c = c
self.errors = 0
# Commanders...
self.core = None # leoPy.leo.
self.settings = None # leoSettings.leo.
self.user_settings = None # myLeoSettings.leo
</t>
<t tx="ekr.20111006212449.11852">def check(self, configs_d, settings_d):
munge = self.munge
table = ('Bool', 'Int', 'Float', 'Ratio', 'Path', 'String',) # 'Color', 'Font',
def printList(aList):
if len(aList) < 2:
print(' ', aList[0])
else:
g.printObj(aList)
#
# Print missing user settings...
for kind in table:
config_key = 'get%s' % kind
settings_key = '@%s' % kind.lower()
configs = configs_d.get(config_key, [])
settings = settings_d.get(settings_key, [])
m_configs = [munge(z) for z in configs]
m_settings = [munge(z) for z in settings]
missing = set([z for z in m_configs if not z in m_settings])
aList = [z for z in missing if self.filter_user_config(z)]
if aList:
print('\nmissing %s %s settings...\n' % (len(aList), settings_key))
for z in sorted(aList):
aList2 = [z2 for z2 in configs if munge(z2) == munge(z)]
printList(aList2)
#
# Print missing calls to c.config.getX...
for kind in table:
config_key = 'get%s' % kind
settings_key = '@%s' % kind.lower()
configs = configs_d.get(config_key, [])
settings = settings_d.get(settings_key, [])
m_configs = [munge(z) for z in configs]
m_settings = [munge(z) for z in settings]
missing = set([z for z in m_settings if not z in m_configs])
aList = [z for z in missing if self.filter_get_x(z)]
if aList:
print(f"missing {len(aList)} config.{config_key} calls:")
for z in sorted(aList):
aList2 = [z2 for z2 in settings if munge(z2) == munge(z)]
printList(aList2)</t>
<t tx="ekr.20111006212449.11853">def error(self, s):
print(s)
self.errors += 1
</t>
<t tx="ekr.20111006212449.11854">def get_commanders(self):
'''Open files as needed and set the commander ivars.'''
def open_commander(fn):
c = g.openWithFileName(fn, old_c=self.c, gui=g.app.nullGui)
if not c:
self.error('not found: %s' % fn)
return c
join, loadDir = g.os_path_join, g.app.loadDir
self.core = open_commander(join(loadDir, '..', 'core', 'leoPy.leo'))
# Opening LeoPyRef.leo would be slower.
self.settings = open_commander(join(loadDir, '..', 'config', 'leoSettings.leo'))
self.user_settings = open_commander(g.app.loadManager.my_settings_path)
</t>
<t tx="ekr.20111006212449.11855">def get_configs(self):
'''
Return a dict containing a representation of all calls to x.config.getX.
'''
d = {}
for c in (self.core, ):
print('scanning: %s' % c.shortFileName())
self.get_configs_from_outline(c, d)
return d
</t>
<t tx="ekr.20111006212449.11856">def get_configs_from_outline(self, c, d):
'''
Scan the outline for all calls to x.config.getX and add items to d.
'''
p = c.rootPosition()
while p:
if '@nosearch' in p.b: # #1511.
# print('ignore', p.h)
p.moveToNodeAfterTree()
else:
self.scan_for_configs(p, d)
p.moveToThreadNext()
return d
</t>
<t tx="ekr.20111006212449.11857">def scan_for_configs(self, p, d):
'''
Scan the body text of p, finding all calls to config.getX.
This code does not know about `if 0`, but does know about comments.
'''
kinds = (
'getBool', 'getColor', 'getInt', 'getFloat',
'getPath', 'getRatio', 'getString',
# '@font', # special case.
)
i, s = 0, p.b
while i < len(s):
progress = i
ch = s[i]
if (
ch == '@' and
(g.match(s, i, '@ ') or g.match(s, i, '@\n')) and
(i == 0 or s[i - 1] == '\n')
):
# Skip the @doc part.
i = s.find('\n@c', i)
if i == -1: break
elif ch == '#':
i = g.skip_to_end_of_line(s, i)
elif ch in ('"', "'"):
i = g.skip_python_string(s, i)
elif ch == '_' or ch.isalpha():
j = g.skip_id(s, i)
kind = s[i: j]
if kind in kinds:
# We have found a call to getBool, etc.
i = g.skip_ws(s, j)
if g.match(s, i, '('):
i = g.skip_ws_and_nl(s, i + 1) # #1511.
if g.match(s, i, '"') or g.match(s, i, "'"):
j = g.skip_string(s, i)
name = s[i + 1: j - 1]
# print(f"{kind:12} {name}")
aList = d.get(kind, [])
if name not in aList:
aList.append(name)
d[kind] = aList
else:
j = i
i = j
else:
i += 1
assert progress < i
return d
</t>
<t tx="ekr.20111006212449.11858">def get_settings(self, user):
'''Return a dict containing a representation
of all settings in leoSettings.leo or myLeoSettings.leo.
'''
trace = False
c = self.user_settings if user else self.settings # #1511.
d = {}
print('scanning: %s' % c.shortFileName())
# #1792: Allow comments after @settings.
settings_node = g.findNodeAnywhere(c, '@settings', exact=False)
if not settings_node:
return self.error('no @settings node')
for p in settings_node.subtree():
if self.is_setting(p):
kind, name = self.parse_setting(p)
if name:
# name = self.munge(name)
aList = d.get(kind, [])
if name not in aList:
aList.append(name)
d[kind] = aList
else:
self.error('no name for %s' % (kind))
if trace:
keys = list(d.keys())
for key in sorted(keys):
print(key)
aList = d.get(key)
for name in sorted(aList):
print(' ' + name)
return d
</t>
<t tx="ekr.20111006212449.11859">def is_setting(self, p):
# For now, these are enough
table = (
'@bool', '@color', '@int', '@float',
# '@font', # special case.
'@ratio', '@path', '@string',
)
for s in table:
if g.match_word(p.h, 0, s):
return True
return False
</t>
<t tx="ekr.20111006212449.11860">def parse_setting(self, p):
s = p.h
assert s[0] == '@'
i = g.skip_id(s, 1)
kind = s[: i]
assert kind
i = g.skip_ws(s, i)
j = g.skip_id(s, i, chars='-')
name = s[i: j]
return kind, name
</t>
<t tx="ekr.20111006212449.11861">def munge(self, s):
'''Return the canonicalized name for settings and arguments to c.config.getX.'''
return g.toUnicode(s.replace('-', '').replace('_', '').lower())
</t>
<t tx="ekr.20111006212449.11862">def run(self):
self.get_commanders()
configs = self.get_configs()
settings = self.get_settings(user=False)
user_settings = self.get_settings(user=True)
if self.errors == 0:
self.check(configs, settings)
self.check_user_settings(settings, user_settings)
# Select leoSettings.leo.
g.app.gui.frameFactory.setTabForCommander(self.settings)
g.trace('done')
</t>
<t tx="ekr.20111026083456.16490">@language python</t>
<t tx="ekr.20111026083456.16491">import glob
path = g.os_path_finalize_join(
g.app.loadDir,'..','plugins','*.py')
aList = glob.glob(path)
aList.sort()
for fn in aList:
print(g.shortFileName(fn))</t>
<t tx="ekr.20140912075503.19263"></t>
<t tx="ekr.20140912075503.19264">**Important**: This should be set by each user.</t>
<t tx="ekr.20140912075503.19265">valid values are: normal,bold,100,..,900</t>
<t tx="ekr.20140912075503.19266">Valid values are: normal,italic,oblique</t>
<t tx="ekr.20140915194122.21837">A small font size used by default in the status area.</t>
<t tx="ekr.20140915194122.23413">A small font size used by default in the check boxes in the Find tab.</t>
<t tx="ekr.20181018060340.1">def filter_get_x(self, setting):
'''
Return False if we can safely ignore a missing call to config.get(setting).
Everything here is a hack. Some are bigger than others.
'''
munge = self.munge
#
# These *ivars* are set by the GlobalConfigManager class.
# There *should* be settings for all of these, despite missing config.get calls.
table = (
# encodingIvarsDict...
"default_at_auto_file_encoding",
"default_derived_file_encoding",
"new_leo_file_encoding",
# defaultsDict...
"color_directives_in_plain_text",
"output_doc_chunks",
"page_width",
"tab_width",
"tangle_outputs_header",
"target_language",
"underline_undefined_section_names",
# ivarsDict
"at_root_bodies_start_in_doc_mode",
"create_nonexistent_directories",
"output_initial_comment",
"output_newline",
"page_width",
"read_only",
"redirect_execute_script_output_to_log_pane",
"relative_path_base_directory",
"remove_sentinels_extension",
"save_clears_undo_buffer",
"stylesheet",
"tab_width",
"target_language",
"trailing_body_newlines",
"use_plugins",
"undo_granularity",
"write_strips_blank_lines",
)
table = [munge(z) for z in table]
if setting in table:
return False
#
# unitTest.leo tests test-darwin-setting and test-win32-setting
if setting in ('testdarwinsetting', 'testwin32setting'):
return False
#
# Stylesheets use these settings.
for pattern in (
'bg', 'border', 'color', 'fg', 'font',
'leogreen', 'leoyello',
'margin', 'padding', 'relief',
'solarized', 'split-bar', 'text-foreground', 'tree-image',
):
if setting.find(munge(pattern)) > -1:
return False
#
# These plugins/use settings in non-standard ways.
if setting.startswith((
'bookmarks', 'datenodes', 'http', 'opml',
'rst3', 'todo', 'vim', 'zodb'
),
):
return False
#
# Find settings are defined in non-standard ways.
for pattern in (
'batch', 'change-text',
'find-def-creates-clones',
'find-text', 'ignore-case',
'mark-changes', 'mark-finds', 'node-only', 'pattern-match',
'reverse', 'search-body', 'search-headline', 'suboutline-only',
'whole-word', 'wrap',
):
if setting == munge(pattern):
return False
#
# Issue a warning.
return True
</t>
<t tx="ekr.20181018065113.1">def filter_user_config(self, setting):
'''
Return False if we can safely ignore a setting that does not exist in leoSettings.leo.
Everything here is a hack. Some are bigger than others.
'''
munge = self.munge
#
# unitTest.leo tests test-darwin-setting and test-win32-setting
if setting in ('testdarwinsetting', 'testwin32setting'):
return False
#
# The calls to config.get* are commented out in the code,
# but get_configs isn't smart enough to know that.
for ignore in (
'theme-name',
'pytest-path', # In a (disabled) @button node
'leo-to-html-%s', # Loads multiple settings from an .ini file.
):
if setting == munge(ignore):
return False
#
# Stylesheets use these settings.
# It would be a major project to discover what settings
# are actually used in the present stylesheet.
for pattern in (
'bg', 'border', 'color', 'fg', 'font',
'leogreen', 'leoyello',
'margin', 'padding', 'relief',
'solarized', 'split-bar', 'text-foreground', 'tree-image',
):
if munge(pattern) in setting:
return False
#
# These plugins use settings in non-standard ways.
if setting.startswith((
'activepath', 'bookmarks', 'datenodes', 'http', 'opml',
'rst3', 'todo', 'vim', 'vr3', 'zodb'),
):
return False
#
# Find settings are defined in non-standard ways.
for pattern in (
'batch', 'change-text', 'find-text', 'ignore-case',
'mark-changes', 'mark-finds', 'node-only', 'pattern-match',
'reverse', 'search-body', 'search-headline', 'suboutline-only',
'whole-word', 'wrap',
):
if setting == munge(pattern):
return False
#
# Tangle/untagle settings are deprecated and imo should not exist.
for pattern in (
'output-doc-flag', 'tangle-batch-flag',
'untangle-batch-flag', 'use-header-flag',
):
if setting == munge(pattern):
return False
#
# Issue a warning.
return True
</t>
<t tx="ekr.20190324182659.1">@language python
from leo.core.leoColor import leo_color_database as color_d
d = {
'Comment': 'solarized-orange',
'Comment.Single': 'solarized-orange',
'Generic.Deleted': 'solarized-red',
'Generic.Emph': 'solarized-blue',
'Generic.Heading': 'solarized-magenta',
'Generic.Inserted': 'alt-solarized-green',
'Generic.Strong': 'solarized-blue',
'Generic.Subheading': 'solarized-magenta',
'Keyword': 'solarized-blue',
'Name': 'white',
'Name.Class': 'white',
'Name.Decorator': 'solarized-orange',
'Name.Entity': 'solarized-blue',
'Name.Function': 'white',
'Name.Other': 'solarized-red',
'Name.Tag': 'solarized-magenta',
'String': 'alt-solarized-green',
'String.Doc': 'solarized-orange', # docstring.
'String.Double': 'alt-solarized-green',
'String.Interpol': 'alt-solarized-green',
'String.Single': 'alt-solarized-green',
}
root = p.copy()
for key, val in d.items():
p = root.insertAsLastChild()
# p.h = '@color %s = %s' % (key.lower(), color_d.get(val, 'white'))
p.h = '@color %s = %s' % (key.lower(), val)
# p.b = val
c.redraw()
</t>
<t tx="ekr.20200226105416.1">def check_user_settings(self, settings_d, user_settings_d):
"""
Report settings in myLeoSettings.leo that are not in leoSettings.leo.
This method requires exact matches between settings: it does no munging.
"""
unusual_keys = (
'@color', # per-key @color settings have changed.
)
unusual_settings = (
# 'forth', # Experimental.
'color-theme', # Uses td.get_string_setting.
'theme-name', # Uses td.get_string_setting.
)
for key in user_settings_d:
settings = settings_d.get(key, [])
user_settings = user_settings_d.get(key, [])
for user_setting in user_settings:
if (
user_setting not in settings
and user_setting not in unusual_settings
and key not in unusual_keys
):
print(f"Unknown setting in myLeoSettings.leo: {key} {user_setting}")
</t>
<t tx="sta.20240722203753.1"></t>
<t tx="sta.20240722204640.1"></t>
<t tx="sta.20241211203746.1">@path source/projects</t>
<t tx="sta.20241211203834.1">@path py
</t>
<t tx="sta.20241211203934.1">@path pyjs
</t>
<t tx="sta.20250130115409.1">@path cobra
</t>
<t tx="sta.20250130115618.1">@path cmx
</t>
<t tx="sta.20250130115623.1">@path jmx
</t>
<t tx="sta.20250130115630.1">@path krait
</t>
<t tx="sta.20250130115634.1">@path mxpy
</t>
<t tx="sta.20250130115638.1">@path pktpy
</t>
<t tx="sta.20250130115707.1">@path zedit
</t>
<t tx="sta.20250130115713.1">@path zpy
</t>
<t tx="sta.20250130115728.1">@path demo
</t>
<t tx="sta.20250130120441.1">@path mamba
</t>
<t tx="sta.20250208015245.1">@path pktpy2
</t>
<t tx="sta.20250315072908.1">@path source/demos
</t>
<t tx="sta.20250315073358.1"></t>
<t tx="sta.20250315073407.1"></t>
<t tx="sta.20250315073457.1"></t>
<t tx="sta.20250315073558.1"></t>
<t tx="sta.20250315073635.1">@path mpyx
</t>
<t tx="sta.20250621171647.1"></t>
<t tx="sta.20250621172435.1">@path xpyc</t>
<t tx="sta.20250621172542.1">@path services/PythonService
</t>
<t tx="sta.20250728112920.1">import shlex
import subprocess
def run(cmd: str):
cmds = shlex.split(cmd)
p = subprocess.Popen(cmds, start_new_session=True)
run("make core")
</t>
</tnodes>
</leo_file>