Date: 2009-11-11 13:00:17 +0100 (Wed, 11 Nov 2009)
New Revision: 6193
More detailled description of "system messages from included sources" bug.
--- trunk/docutils/BUGS.txt 2009-11-11 11:58:33 UTC (rev 6192)
+++ trunk/docutils/BUGS.txt 2009-11-11 12:00:17 UTC (rev 6193)
@@ -162,19 +162,34 @@
For details, see `this posting by Alan G. Isaac
-* _`Line numbers` in system messages are inconsistent in the parser.
+* _`Line numbers` and "source" in system messages are inconsistent.
- In text inserted by the "include" directive, errors are often not
- reported with the correct "source" or "line" numbers. Perhaps all
- Reporter calls need "source" and "line" keyword arguments.
- Elements' .line assignments should be checked. (Assign to .source
- too? Add a set_info method? To what?)
+ reported with the correct "source" or "line" numbers.
This is partially fixed in the commits from 2009-09-25 and 2009-10-28.
The test in test/test_parsers/test_rst/test_directives/test_include.py
works, but there are still plenty of system messages pointing to the
+ - Perhaps all Reporter calls need "source" and "line" keyword arguments?
+ Alternatively, give `document.reporter` access to the state machine
+ instance `document.statemachine` and extract the "source" and "line"
+ info from `statemachine.input_lines`.
+ Except for special cases, there is even no need to call with "line":
+ During parsing, `document.statemachine` knows the current line number.
+ For system messages generated after the parsing is completed (i.e. by
+ transforms or the writer) "line" info must be present in the doctree
+ - Elements' .line assignments should be checked. (Assign to .source
+ too? Add a set_info method? To what?)
+ The "source" (and line number in the source) could either be added
+ explicitely to the elements or determined from the “raw” line number by
- Some line numbers in elements are not being set properly
(explicitly), just implicitly/automatically. See rev. 1.74 of
docutils/parsers/rst/states.py for an example of how to set.
@@ -189,6 +204,7 @@