]> git.donarmstrong.com Git - liborg-parser-perl.git/blob - todo.org
Import original source of Org-Parser 0.23
[liborg-parser-perl.git] / todo.org
1 * parser
2 ** TODO add line number information
3 perhaps _linenum_start and _linenum_end attributes to signify the starting and
4 ending line numbers of current element. so the parser can report:
5
6 : syntax error in table (lines XX-YY): invalid line in table 'blah'
7
8 and then instead of:
9
10 : die "syntax error in table ..."
11
12 the elements do something like this instead to report error:
13
14 : $doc->_croak("invalid line in table");
15
16 and the document will provide the additional line number and element
17 information.
18
19 ** TODO parse horizontal rules
20 from the manual: "A line consisting of only dashes, and at least 5 of them, will
21 be exported as a horizzontal line (‘<hr/>’ in HTML and \hrule in LaTeX)."
22
23 ** TODO [2012-04-14 Sat] performance: lazy parsing
24 we can increase performance by doing lazy parsing. one of the heaviest parts is
25 parsing the text elements and constructing all the text element objects. not all
26 text is required in all cases. one of my most used application of org::parser is
27 app::orgutils's list-org-todos. it only needs a list of headlines (block
28 elements). we can skip parsing @text and all the text elements (_add_text() and
29 _add_text_container()) for example putting those in Org::RawText first.
30
31 we could then add walk_block() which only walks block elements.
32 list-org-{headlines,todos} can utilize this instead of walk().
33
34 children() (and headline's title(), etc) should detect Org::RawText and parse it
35 into one or more elements, so we only parse the unparsed text when needed.
36
37 i'd reckon, skimming at profiler's result for parsing my addressbook and todo
38 list, this could provide about 50% speedup or more, depending on how much
39 skipping you do. if you only look at headlines or other block elements, the
40 speedup will be more pronounced.
41 * Element::Base
42 ** TODO set_property()
43 - should create a properties drawer if necessary
44 * table
45 ** TODO caption(), label(), etc
46 Get it from settings:
47
48 : #+CAPTION: A long table
49 : #+LABEL: tbl:long
50 : |...|...|
51 : |...|...|
52
53 note: the setting can be interspersed with other lines/elements, they will be
54 apply to the next thing (table) that wants it, e.g.:
55
56 : #+CAPTION: A long table
57 : some text
58 : #+LABEL: tbl:long
59 : some more text
60 : |...|...|
61 : |...|...|
62
63 ** TODO column group (manual: 3.3)
64 probably create Element::TableColGroup which is a special row that contains
65 column group instruction. or we can just assume it's a normal row and only
66 format() needs to worry about this (i prefer the latter).
67 * footnote
68 * link
69 * target
70 * radio target
71 * timestamp & time range
72 ** what's the difference between SCHEDULED and DEADLINE timestamp?
73 ** TODO parse sexp entries?
74 e.g.
75
76 : ** Class 7:00pm-9:00pm
77 :    <%%(and (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20 2009))>
78
79 : * Monthly meeting
80 :  <%%(diary-float t 3 3)>
81
82 * plain lists (ordered, unordered, description)
83 * headline
84 ** TODO Parse headline percentages
85 ** TODO next_todo_state() & prev_todo_state()
86 return undef if .document is undef.
87 ** TODO cycle_todo_state($reverse // 0)
88 ** TODO promoto_subtree() & demote_subtree()
89 * drawer & properties
90 ** TODO check valid values of property (foo_ALL)
91 ** TODO fix parsing of property values
92 need clarification first
93
94 : :PROPERTY:
95 :   :birthday:  (5 7 1990)
96 : :END:
97
98 * setting
99 ** TODO [low] differentiate between TYP_TODO and TODO/SEQ_TODO
100 "TODO and SEQ_TODO are the same. TYP_TODO is slightly different in operation.
101 When you press C-c C-t in a line with the keyword defined by TYP_TODO, the task
102 will immediately switch to DONE, instead of to the next state in the sequence. I
103 do believe the manual explains this quite well, but I don't believe many people
104 use this." -- carsten
105
106 this is probably useful if we already have next_todo_state() et al. We'll need
107 to note which todo keywords belong to TYP_TODO.
108 ** TODO process includes (#+INCLUDE)
109
110 ** TODO parse buffer-wide header arguments (#+BABEL, 14.8.1)
111 ** TODO parse link abbreviation (#+LINK)
112 into document's .link_abbrevs()
113 ** TODO check tags in document against TAGS
114 "TAGS defines tags that will be used in the buffer and defines fast keyboard
115 shortcuts for them. Though you are allowed to also use tags that are not in tis
116 list." -- carsten
117
118 we can introduce a strict mode, for example, where all tags must belong to the
119 list specified in TAGS.
120 ** TODO TAGS/FILETAGS: parse keyboard shortcuts
121  #+TAGS: OFFICE(o) COMPUTER(c) HOME(h) PROJECT(p) READING(r) DVD(d)
122 the key should be discarded when checking for known tags
123
124 * block
125 ** TODO parse dynamic blocks
126 see org-mode manual on dynamic blocks.
127
128 basically it's just blocks with a slightly different syntax and :param value as
129 args:
130
131 : #BEGIN: dynblockname :param1 value1 :param2 value2
132 : #END:
133
134 * macro
135 ** TODO parse macro
136 manual section 11.6 Macro replacement
137
138 although the parser can also choose to ignore this and let the export handle the
139 parsing.