As far as I know view-rendered (Alt-0) is only intended for html and
markup-like languages (rst, markdown, svg, etc) where the text is intended
to be converted (rendered) into something else for actual consumption
(reading, publishing). It breaks on `@language python` too, FWIW.
I don't understand why one would want to use it on code, which is already
in it's final reading form? Oh. perhaps you're looking for "show me the
whole tree from {this} point, with expanded nodes and all" ? You can get
that from the context menu when on a headline node, "Edit in...".
I'll leave the sphinx errors for someone else; I haven't used it yet.
-matt
On Mon, Jan 20, 2014 at 3:31 PM, cafea <[email protected]> wrote:
> So far I'm finding Leo disappointing because I don't see any feature that
> renders the contents of links in place. So Leo lets you create a
> structured document and generate html, code or other formats but you can
> never SEE that document while editing it.
>
> I was hopeful that alt-0 would render a full document but it not only
> doesn't seem to follow links, it also just fails in various ways. In some
> documents it refuses to bring up the render window at all at least after
> being shown and hidden once (I have to exit the document and reload). I'm
> also seeing errors when rendering c++ code and python code.
>
> A node that looks like:
> @language cplusplus
> #include <iostream>
> using namespace std;
>
> int main(void)
> {
> @others
> <<output_main>>
> return 0;
> }
>
> renders as:
> #include <iostream> using namespace std;
> int main(void) {
> System Message: ERROR/3 (<string>, line 6)
> Unexpected indentation.
> @others <<output_main>> return 0;
> System Message: WARNING/2 (<string>, line 9)
> Block quote ends without a blank line; unexpected unindent.
> }
>
> And getting rid of all indents may end the errors but still makes it
> something useless:
> #include <iostream> using namespace std;
> int main(void) { <<output_main>> return 0; }
>
> Why are all of the eols missing? Besides, code without indents is useless,
> and what's the point of rendering code, if it just shows the same code,
> badly formatted? Following nodes would at least be useful.
>
> Even the sample make-sphinx button code renders with an error ("System
> Message: ERROR/3 (<string>, line 8) Unexpected indentation."). Also the
> button doesn't work on my windows system, even after installing pyqt,
> pyenchant, docutils, sphinx etc. although <Alt-X>rst3 works.
>
> If I hit make-sphinx the log reads:
> saved: initial.leo
> wrote: C:\Users\User\myDocument.html.txt
> stylesheet not found
> C:\Users\User\Documents\leo\default.css
> @path: C:\Users\User\Documents\leo
> open path: C:\Users\User\Documents\leo
> Unexpected docutils exception
> Traceback (most recent call last):
> File "C:\Program Files\Leo-4.11-final\leo\core\leoRst.py", line 1909, in
> writeToDocutils
> settings_overrides=overrides)
> File "C:\Python33\lib\site-packages\docutils\core.py", line 414, in
> publish_string
> enable_exit_status=enable_exit_status)
> File "C:\Python33\lib\site-packages\docutils\core.py", line 659, in
> publish_programmatically
> settings_spec, settings_overrides, config_section)
> File "C:\Python33\lib\site-packages\docutils\core.py", line 141, in
> process_programmatic_settings
> **defaults)
> File "C:\Python33\lib\site-packages\docutils\core.py", line 128, in
> get_settings
> usage, description, settings_spec, config_section, **defaults)
> File "C:\Python33\lib\site-packages\docutils\core.py", line 115, in
> setup_option_parser
> usage=usage, description=description)
> File "C:\Python33\lib\site-packages\docutils\frontend.py", line 564, in
> __init__
> config_settings = self.get_standard_config_settings()
> File "C:\Python33\lib\site-packages\docutils\frontend.py", line 622, in
> get_standard_config_settings
> for filename in self.get_standard_config_files():
> File "C:\Python33\lib\site-packages\docutils\frontend.py", line 615, in
> get_standard_config_files
> import pwd
> File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
> File "<frozen importlib._bootstrap>", line 1523, in
> _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 1477, in _find_module
> File "<frozen importlib._bootstrap>", line 1309, in find_module
> File "<frozen importlib._bootstrap>", line 1288, in _get_loader
> File "<frozen importlib._bootstrap>", line 1360, in find_loader
> File "<frozen importlib._bootstrap>", line 1415, in _fill_cache
> TypeError: expected bytes, bytearray or buffer compatible object
> done
>
> Sure I can see rendered html properly in the html.txt file in the rendered
> pane, but I assume that only available after running rst3.
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.