-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathee.info
More file actions
executable file
·447 lines (363 loc) · 13.3 KB
/
ee.info
File metadata and controls
executable file
·447 lines (363 loc) · 13.3 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
This is ee.info, produced by makeinfo version 7.1 from ee.texi.
INFO-DIR-SECTION Emacs
START-INFO-DIR-ENTRY
* Ee: (ee). Emacs information manager.
END-INFO-DIR-ENTRY
This document describes the Ee, Emacs information manager.
This is edition $Revision$ $Date$ of the ‘Ee User Manual’ for ‘ee’
Version 0.1.0.
Copyright © 2002, 2003, 2004, 2010 Juri Linkov <juri@jurta.org>
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
File: ee.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
This document describes the ‘ee’ version 0.1.0, Emacs information
manager.
PLEASE NOTE THAT THIS MANUAL IS NOT FINISHED, BECAUSE THIS PACKAGE IS
UNDER DEVELOPMENT, AND ALL DETAILS DESCRIBED HERE CAN BE CHANGED.
* Menu:
* Introduction:: Introduction.
* Data-Flow Diagram:: Data-Flow Diagram.
* Data Structures:: Explanations of data structures.
* View Description:: Explanations of view data.
* View Generation:: Process of view buffer generation.
* View Buffer:: Explanations of view buffer parts.
* Visibility:: Commands to control what is visible.
* Navigation:: Special motion commands.
* Marking and Deletion:: Marking and deleting displayed items.
* Writing Extensions:: How to write new extensions.
Appendices:
* Installation:: Installation.
* Reporting Bugs:: How to report a bug in ee.
* Terminology:: Terminology.
* Concept Index:: Concept Index.
* Command Index:: Command Index.
* Key Index:: Key Index.
* Variable Index:: Variable Index.
File: ee.info, Node: Introduction, Next: Data-Flow Diagram, Prev: Top, Up: Top
1 Introduction
**************
Ee is the categorizing information manager for Emacs.
It works by collecting information from different
sources and converting information to a relational or
associative database. It uses the fields of database
table records to build the category trees, which are
displayed in the Emacs view buffer. The rules for
creating the views are also specified by similar data
structures and include the rules for building category
paths, sorting records and categories, calculating
the totals of category fields, filtering records, and
printing category tree and record lines.
File: ee.info, Node: Data-Flow Diagram, Next: Data Structures, Prev: Introduction, Up: Top
2 Data-Flow Diagram
*******************
+----------------+ +----------------+
| data |<---| data |
| file buffer | | file |
+----------------+ +----------------+
|
v
+----------------+ +----------------+
| data |<---| alternative |
| ee view buffer | | data source |
+----------------+ +----------------+
^
|
+----------------+ +----------------+
| view data |<---| view data |
| file buffer | | file |
+----------------+ +----------------+
|
v
+----------------+
| view data |
| ee view buffer |
+----------------+
^
|
+----------------+ +----------------+
| view view data |<---| view view data |
| file buffer | | file |
+----------------+ +----------------+
| |
v v
+----------------+
| view view data |
| ee view buffer |
+----------------+
File: ee.info, Node: Data Structures, Next: View Description, Prev: Data-Flow Diagram, Up: Top
3 Data Structures
*****************
‘data-file’
Name of the file that contains data.
‘view-data-file’
Name of the data file that contains the view descriptions.
‘collector’
Function that collects data from source other than data file, and
sets the variable 'ee-data'.
Example of data structure:
[(meta
(format-version . "0.0.1")
(database-version . "0.0.1")
(data-version . "0.0.1")
(data-file . "example.ee")
(view-data-file . "view/example.ee")
(collector . ee-example-data-collect)
(fields
(field (name name))
(field (name category-1))
(field (name category-2))
(field (name category-3))
(field (name (parent children)))
(field (name ())))
(key-fields name)
(mark-field mark))
["ri-101" "c-1" nil "c-4" () ((price . 3.15) (amount . 9))]
["ri-102" "c-1/s-1" "c-2/s-2" "c-4" () ((price . 3) (amount . 5))]
["ri-103" "c-1" "c-3" "c-4" ((children "ri-104" "ri-105")) ()]
["ri-104" nil nil nil ((parent . "ri-103")) ()]
["ri-105" nil nil nil ((parent . "ri-104")) ()]]
File: ee.info, Node: View Description, Next: View Generation, Prev: Data Structures, Up: Top
4 View Description
******************
Views are described by data structures.
Currently some fields are functions, where record fields are accessed
by function 'ee-field', e.g. (ee-field 'field-name record).
Current fields of view description data structure (functions that
begin with 'c-' prefix operate on categories, functions that begin with
'r-' prefix operate on records):
‘name’
Unique view name.
‘r-filter’
Function that selects the displayed records.
‘c-path-finder’
Function that converts every record to a list of category paths,
which is used to build a category tree.
‘c-sorter’
Function that sorts the categories. Arguments are a-level (all
levels), c-level (category-level), s-level (subcategory level),
attr-alist (attributes list).
‘r-sorter’
Function that sorts the records. Arguments are a-level (all
levels), r-level (record-level), attr-alist (attributes list).
‘c-calculator’
Function that calculates the category totals.
‘r-calculator’
Function that calculates the record totals.
‘c-printer’
Function that prints the category lines.
‘r-printer’
Function that prints the record lines.
‘r-select’
Function called after typing RET on a record line.
Example of view description data structure:
[(meta
(format-version . "0.0.1")
(view-data-file . "view/views.ee")
(fields ()))
[((type . view)
(name . "by Category")
(default . t)
(r-filter . (lambda (r)
(not (ee-field 'parent r))))
(c-path-finder . (lambda (r)
(list
(append
(ee-split-string (ee-field 'category-1 r) "/")
(ee-split-string (ee-field 'category-2 r) "/"))
(list (ee-field 'category-3 r)))))
(r-child-parent-key-fields name parent)
(c-sorter . (lambda (a-level c-level s-level attr-alist)
(lambda (c1 c2) (string< (car c1) (car c2)))))
(r-calculator . (lambda (r a-level r-level children-p result)
(- (if (vectorp r)
(* (or (ee-field 'price r) 0) (or (ee-field 'amount r) 0))
result) result)))
(c-counter . (lambda (a-level c-level s-level header attr-alist) 0))
(r-counter . (lambda (r a-level r-level children-p result) 1))
(c-title-printer)
(r-title-printer . (lambda () ))
(c-printer . (lambda (a-level c-level s-level header attr-alist)
(let ((b (point)))
(insert (format
(concat "%s- %s (%s, %.2f)")
(make-string (1- a-level) ?\040)
header
(or (cadr (assq 'counter attr-alist)) "0")
(or (cadr (assq 'result attr-alist)) "0"))))))
(r-printer . (lambda (r a-level r-level children-p attr-alist)
(insert (format "%s%s%s%s %s %.2f * %s = %.2f"
(or (car (ee-field 'mark r)) " ")
(make-string r-level ?\040)
(if children-p "- " " ")
(ee-field 'name r)
(make-string (- 9 r-level) ?\040)
(or (ee-field 'price r) 0)
(or (ee-field 'amount r) 0)
(* (ee-field 'price r) (ee-field 'amount r))))))
(r-select . ee-example-select)
(r-execute . ee-example-execute))]]
File: ee.info, Node: View Generation, Next: View Buffer, Prev: View Description, Up: Top
5 View Generation
*****************
Data:
[c-1 field-1 field-2 field-3]
[c-2 field-1 field-2 field-3]
View category paths (returned by c-path-finder):
'((c-1 c-1.1 | sc-1.1 | sc-1.2 ) 101)
'((c-1 c-1.2 ) 102)
'((c-2) 101)
'((c-2) 104)
Internal structure 'view-atree':
(root
(~
(_r 101))
(c-1
(_s
(sc-1.1
(_s
(sc-1.2
(_r 102)
(_a (hide t) (result 1 0))))))))
Generated view buffer:
- c-1
- c-1.1
r-101
- c-1.2
r-102
- sc-1
r-103
- c-2
r-101
- r-107
- r-108
- r-109
File: ee.info, Node: View Buffer, Next: Visibility, Prev: View Generation, Up: Top
6 View Buffer
*************
Expansion division: ee-expansion
category, c-line: text-properties: ee-path, ee-level, ee-expansion
record, r-line: text-properties: ee-ri text-properties: ee-ri,
ee-level, ee-expansion
Record division: ee-path ee-ri
c-number means category name sc-number means subcategory name
ri-number means record index
- c-1 ee-path=(c-1) ee-level=1 ee-expansion=o(77,555)
- c-1.1 ee-path=(c-1.1) ee-level=2 ee-expansion=o(77,555)
ri-101 ee-ri=101
- sc-1 ee-path=(c-1 c-1.1 | sc-1) ee-level=3 ee-expansion=o(77,555)
ri-103 ee-ri=103
- c-1.1.1 ee-path=(c-1 c-1.1 c-1.1.1) ee-level=3 ee-expansion=o(77,555)
ri-104 ee-ri=104
- c-1.2 ee-path=(c-1.2) ee-level=2 ee-expansion=o(77,555)
ri-102 ee-ri=102
- c-2 ee-path=(c-2) ee-level=1 ee-expansion=o(77,555)
ri-101 ee-ri=101
- ri-107 ee-ri=107 ee-level=2 ee-expansion=o(77,555)
- ri-108 ee-ri=108 ee-level=3 ee-expansion=o(77,555)
ri-109 ee-ri=109
File: ee.info, Node: Visibility, Next: Navigation, Prev: View Buffer, Up: Top
7 Visibility
************
show/hide = expand/collase
One-click mouse gesture expansion tree navigation
File: ee.info, Node: Navigation, Next: Marking and Deletion, Prev: Visibility, Up: Top
8 Navigation
************
File: ee.info, Node: Marking and Deletion, Next: Writing Extensions, Prev: Navigation, Up: Top
9 Marking and Deletion
**********************
Marking and deleting viewed items.
If some record appears under different categories, then it is marked
in all categories.
If marking key is typed, when point is on category line, then the
whole category is marked, i.e. every record under this category is
marked.
File: ee.info, Node: Writing Extensions, Next: Installation, Prev: Marking and Deletion, Up: Top
10 Writing Extensions
*********************
You can write new ee extensions.
To do it, follow the next steps:
1. Create new file.
Give it the name beginning with prefix ‘ee-’.
2. Add default data description.
3. Add default view data description.
For list of currently available extensions see
<http://www.jurta.org/emacs/ee/>.
File: ee.info, Node: Installation, Next: Reporting Bugs, Prev: Writing Extensions, Up: Top
11 Installation
***************
See the file README or <http://www.jurta.org/emacs/ee/>
File: ee.info, Node: Reporting Bugs, Next: Terminology, Prev: Installation, Up: Top
12 Reporting Bugs
*****************
Please report bugs, make suggestions and contributions to
<juri@jurta.org> or on the Web pages at
<http://www.jurta.org/emacs/ee/>.
File: ee.info, Node: Terminology, Next: Concept Index, Prev: Reporting Bugs, Up: Top
13 Terminology
**************
‘category’
‘expansion’
‘path-finder’
File: ee.info, Node: Concept Index, Next: Command Index, Prev: Terminology, Up: Top
Concept Index
*************