TODO 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. This is the todo list for the Texinfo::Parser implementation.
  2. Copyright 2012, 2013, 2014, 2015 Free Software Foundation.
  3. Copying and distribution of this file, with or without modification,
  4. are permitted in any medium without royalty provided the copyright
  5. notice and this notice are preserved.
  6. export XML_CATALOG_FILES=~/src/texinfo/tp/maintain/catalog.xml
  7. xmllint --nonet --noout --valid commands.xml
  8. Before next release
  9. ===================
  10. Bugs
  11. ====
  12. Profiling
  13. =========
  14. profiling: package on debian:
  15. libdevel-nytprof-perl
  16. In doc:
  17. perl -d:NYTProf ../tp/texi2any.pl texinfo.texi
  18. nytprofhtml --open
  19. # firefox nytprof/index.html
  20. Delayed bugs
  21. ============
  22. In @inline* ignore arguments, @value and user macros should not be
  23. expanded. For example
  24. @set closebrace }
  25. @inlinefmt{html,
  26. truc @value{closebrace}
  27. machin
  28. In Plaintext, @quotation text should have the right margin narrowed.
  29. Text after @bye should be kept as is when redoing Texinfo.
  30. @-commands in index entries are transliterated when sorting, they should
  31. certainly be converted to unicode instead.
  32. Sorting of index entries should be locale dependent and sort properly
  33. unicode sorting.
  34. my $collator = Unicode::Collate::Locale->new('locale' => $locale_name, 'normalization' => 'NFKD')
  35. @sorted = $collator->sort(@not_sorted);
  36. Currently there is no error for something like
  37. @chapter @code{@anchor{TTO}}
  38. there should be an error as for the following construct:
  39. @chapter @anchor{TTez}
  40. This would certainly imply adding, on top of the 'context_stack', a
  41. stack of opened @-commands (although maybe not every @-commands?). This
  42. would allow to catch many other dubious nesting, such as @table in @menu,
  43. @caption in @caption and also would certainly allow to handle the 2 cases
  44. below. This should, however, slow down the computation even more.
  45. warn nested footnotes.
  46. Following should be an error:
  47. @example
  48. @heading A heading
  49. @end example
  50. Example in heading/heading_in_example.
  51. Similar, but not exactly the same issue, there is no warning with a
  52. block command between @def* and @def*x, only for paragraph.
  53. @defun a b c d e f
  54. @itemize @minus
  55. truc
  56. @item t
  57. @end itemize
  58. @defunx g h j k l m
  59. @end defun
  60. Punctuation and spaces before @image do not lead to a doubling of space.
  61. In fact @image is completly formatted outside of usual formatting containers.
  62. Not sure what should be the right way?
  63. test in info_test/image_and_punctuation
  64. There should be a warning for something like
  65. @example text
  66. ...
  67. Image on sectioning command line haven't their length ignored correctly.
  68. Not sure it is a big deal. An example in sectioning/at_commands_in_refs.
  69. warn when a @noindent/@indent appears within a paragraph.
  70. in info_tests/error_in_footnote there is an error message for each
  71. listoffloats; Line numbers are right, though, so maybe this is not
  72. an issue.
  73. converters_tests/things_before_setfilename there is no error
  74. for anchor and footnote before setfilename. It is not completly
  75. clear that there should be, though.
  76. Recursive expansion of @value may lead to an infinite loop. Wait for
  77. marksource to proceed.
  78. https://bugzilla.redhat.com/show_bug.cgi?id=744878
  79. Missing tests
  80. =============
  81. Test node files that differ only in case. This may be rather complicated,
  82. however, as http://savannah.gnu.org/bugs/?38380 shows. This may be linked
  83. to a possible test of CASE_INSENSITIVE_FILENAMES.
  84. Unit test of end_line_count for Texinfo/Convert/Paragraph.pm .... containers.
  85. In html test empty @top for title, with different cases for
  86. setcontentsaftertit* and for anchors.
  87. Test @sc{@aa{}} and @sc{@'e} in HTML with 8bit and utf8, with and without
  88. enable encoding and entities.
  89. in html test footnotestyle separate. There are such tests in tp/tests,
  90. maybe they are sufficient, but they are only done for long checks.
  91. anchor in flushright, on an empty line, with a current byte offset.
  92. Future features
  93. ===============
  94. Update Unicode-EastAsianWidth. The new version has improved tests
  95. and a new license, but no functional change. So maybe wait a
  96. bit to update.
  97. Add some elements of texinfo that are not of interest in the
  98. tree, like beginning and end of included file, @ protecting
  99. end of line in @def*, begin and end of user defined macro
  100. or value expansion. Maybe call the key for these elements
  101. 'sourcemark'?
  102. In a similar way, keep the information about aliases in the tree?
  103. And about @setfilename in included files which is for now completly
  104. removed (consistently with documentation).
  105. Right now VERBOSE is almost not used.
  106. Handle better @exdent in html? (there is a FIXME in the code)
  107. Check the design of the HTML.pm API. Document the API, in particular
  108. everything in Texinfo::Config. Add an API for everything used in the
  109. default functions, for example in page_head, use $self->title_string()
  110. and so on and so forth.
  111. Functions to document for HTML API (many more are missing!):
  112. sectioning_command_target_name
  113. node_target_name
  114. Implement what is proposed in HTML Cross Reference Mismatch.
  115. Protection of punctuation in nodes.
  116. in @ref. First : is searched. if followed by a : the node name is found
  117. and there is no label. When parsing a node a filename with ( is searched for.
  118. Nested parentheses are taken into account.
  119. Then more parentheses?
  120. Automatic generation of node names from section names. To be protected:
  121. * in every case
  122. ( at the beginning
  123. * In @node line
  124. commas
  125. * In menu entry
  126. * if there is a label
  127. tab comma dot
  128. * if there is no label
  129. :
  130. * In @ref
  131. commas
  132. In Info
  133. Nodes:
  134. * in every case
  135. ( at the beginning
  136. * in Node line
  137. commas
  138. * In menu entry and *Note
  139. * if there is a label
  140. tab comma dot
  141. * if there is no label
  142. :
  143. Labels in Info (which also means index entries)
  144. :
  145. * at the beginning of a line in a @menu
  146. *note more or less everywhere
  147. DocBook
  148. =======
  149. deftypevr, deftypecv: use type and not returnvalue for the type
  150. also informalfigure in @float
  151. also use informaltable or table, for multitable?
  152. What is before the first sectioning command is put in <bookinfo><abstract>.
  153. what about @titlefont in docbook?
  154. maybe use simpara instead of para. Indeed, simpara is for paragraph without
  155. block element within, and it should be that way in generated output.
  156. put <title> in <articleinfo>?
  157. * in docbook, when there is only one section <article> should be better
  158. than book. Maybe the best way to do that would be passing the
  159. information that there is only one section to the functions formatting
  160. the page header and page footer.
  161. Interrogations and remarks
  162. ==========================
  163. Instead of _set_global_multiple_commands and _unset_global_multiple_commands
  164. have a better granularity and do something per command, with the possibility
  165. to really revert everything, including things that are not set by set_conf.
  166. (There is a FIXME in the code). This is not that important, now that the
  167. actual case that was problematic (setting encodings as a side effect of
  168. setting @documentencoding) is not supported anymore. (Now the encoding is
  169. set at the initialization of the converter and should be changed by setting
  170. the correct customization variable, in general OUTPUT_ENCODING_NAME).
  171. Should more Converter ignore the last new line (with type
  172. last_raw_newline) of a raw block format?
  173. In a first step, close when the the command to be closed is at the
  174. top of the tree, not when it should be closed theoretically.
  175. Then it could be possible to come back to the place where the command
  176. should be closed and give an error message.
  177. This is certainly only an issue for @footnote and similar not a general issue.
  178. There is no forward looking code anymore, so maybe a lex/yacc parser
  179. could be used for the main loop. More simply, a binary tokenizer, at
  180. least, could make for a notable speedup.
  181. def/end_of_lines_protected_in_footnote.pl the footnote is
  182. (1) -- category: deffn_name arguments arg2 more args with end of line
  183. and not
  184. (1)
  185. -- category: deffn_name arguments arg2 more args with end of line
  186. It happens this way because the paragraph starts right after the footnote
  187. number.
  188. in HTML, the argument of a quotation is ignored if the quotation is empty,
  189. as in
  190. @quotation thing
  191. @end quotation
  192. Is it really a bug?
  193. In @copying things like some raw formats may be expanded. However it is
  194. not clear that it should be the same than in the main converter. Maybe a
  195. specific list of formats could be passed to Convert::Text::convert, which
  196. would be different (for example Info and Plaintext even if converting HTML).
  197. This requires a test, to begin with.
  198. Use INLINE_INSERTCOPYING as the default for some formats?
  199. In HTML, HEADERS is used. But not in other modules, especially not in
  200. Plaintext.pm or Info.pm, this is determined by the module used (Plaintext.pm
  201. or Info.pm). No idea whether it is right or wrong.
  202. in hyphenation: only text and accent commands, and should
  203. only appear in toplevel
  204. use definfoenclose information in Convert::Text?
  205. From vincent Belaïche. About svg image files in HTML:
  206. I don't think that supporting svg would be easy: its seems that to embed an
  207. svg picture you need to declare the width x height of the frame in
  208. which you embed it, and this information cannot be derived quite
  209. straightforwardly from the picture.
  210. With @image you can declare width and height but this is intended for
  211. scaling. I am not sure whether or not that these arguments can be used
  212. for the purpose of defining that frame...
  213. What I did in 5x5 is that coded the height of the frame directly in
  214. the macro @FIGURE with which I embed the figure, without going through
  215. an argument.
  216. The @FIGURE @macro is, for html:
  217. @macro FIGURE {F,W}
  218. @html
  219. <div align="center">
  220. <embed src="5x5_\F\.svg" height="276"
  221. type="image/svg+xml"
  222. pluginspage="http://www.adobe.com/svg/viewer/install/" /></div>
  223. @end html
  224. @end macro
  225. Add @value to the corresponding commands categories?
  226. tests .init file not relevant since indices cannot be split anymore
  227. indices/index_test.init
  228. Use of specialized synopsis in DocBook is not a priority and it is not even
  229. obvious that it is interesting to do so. The following notes explain the
  230. possibilities and issues extensively.
  231. Instead of synopsis it might seem to be relevant to use specialized synopsis,
  232. funcsynopsis/funcprototype for deftype* and some def*, and other for object
  233. oriented. There are many issues such that this possibility do not appear
  234. appealing at all.
  235. 1) there is no possibility to have a category. So the category must be
  236. added somewhere as a role= or in the *synopsisinfo, or this should only
  237. be used for specialized @def, like @defun.
  238. 2) @defmethod and @deftypemethod cannot really be mapped to methodsynopsis
  239. as the class name is not associated with the method as in Texinfo, but
  240. instead the method should be in a class in docbook.
  241. 3) From the docbook reference for funcsynopsis
  242. "For the most part, the processing application is expected to
  243. generate all of the parentheses, semicolons, commas, and so on
  244. required in the rendered synopsis. The exception to this rule is
  245. that the spacing and other punctuation inside a parameter that is a
  246. pointer to a function must be provided in the source markup."
  247. So this mean it is language specific (C, as said in the docbook doc)
  248. and one have to remove the parentheses, semicolons, commas.
  249. See also the mails from Per Bothner bug-texinfo, Sun, 22 Jul 2012 01:45:54.
  250. specialized @def, without a need for category:
  251. @defun and @deftypefun
  252. <funcsynopsis><funcprototype><funcdef>TYPE <function>NAME</function><paramdef><parameter>args</parameter></paramdef></funcprototype></funcsynopsis>
  253. specialized @def, without a need for category, but without DocBook synopsis
  254. because of missing class:
  255. @defmethod, @deftypemethod: methodsynopsis cannot be used since the class
  256. is not available
  257. @defivar and @deftypeivar: fieldsynopsis cannot be used since the class
  258. is not available
  259. Generic @def with a need for a category
  260. For deffn deftypefn (and defmac?, defspec?), the possibilities of
  261. funcsynopsis, with a category added could be used:
  262. <funcsynopsis><funcprototype><funcdef role=...>TYPE <function>NAME</function></funcdef><paramdef>PARAMTYPE <parameter>PARAM</parameter></paramdef></funcprototype></funcsynopsis>
  263. Alternatively, use funcsynopsisinfo for the category.
  264. Generic @def with a need for a category, but without DocBook synopsis because
  265. of missing class:
  266. @defop and @deftypeop: methodsynopsis cannot be used since the class
  267. is not available
  268. defcv, deftypecv: fieldsynopsis cannot be used since the class
  269. is not available
  270. Remaining @def without DocBook synopsis because there is no equivalent,
  271. and requires a category
  272. defvr (defvar, defopt), deftypevr (deftypevar)
  273. deftp
  274. Missing test outputs as files in t/
  275. ===================================
  276. output files split (node or not split) could be interesting +texi2html
  277. style for some tests. However, the test suite is already too long to
  278. run so such additions should be done with caution.
  279. t/30sectioning.t
  280. chapter_between_nodes (more_nodes_than_sections renamed)
  281. more_sections_than_nodes
  282. two_nodes_between_chapters
  283. two_nodes_at_the_end
  284. character_and_spaces_in_refs
  285. character_and_spaces_in_node
  286. some_at_commands_in_ref_nodes
  287. at_commands_in_refs
  288. character_and_spaces_in_refs <- mono/chapter
  289. rec_nodes (with USE_NODES and without)
  290. loop_nodes?
  291. nodes_before_top?
  292. no_element
  293. top_node_no_menu_direction? (with USE_NODES and without?)
  294. anchor_in_footnote
  295. anchor_in_footnote_separate
  296. placed_things_before_node (with USE_NODES and without?)
  297. placed_things_before_element (with USE_NODES and without?)
  298. top_no_argument_and_node
  299. top_no_argument_and_top_node
  300. nodes_after_top_before_chapter_(nodes/sections) (with USE_NODES and --split chapter)
  301. nodes_after_top_before_section_(nodes/sections) (with USE_NODES and --split chapter and only --split chapter)
  302. sectioning_part_appendix (--split chapter)
  303. nodes_no_node_top_explicit_directions (with USE_NODES and without)
  304. one_node_explicit_directions_anchor (with USE_NODES and without) Really useful?
  305. top_without_node_sections
  306. t/info_tests.t
  307. space_in_setfilename