Writer plugins now operational. Warning: this affects @auto-rst

26 views
Skip to first unread message

Edward K. Ream

unread,
Jul 28, 2014, 9:16:26 AM7/28/14
to leo-e...@googlegroups.com
Rev 7f25136...now connects the writer plugins in leo/plugins/writers.  As stated below, this is somewhat experimental code.  Please report any problems immediately.

Here is the checkin log:

QQQ
Connected the writers in leo/plugins/writers to the atFile write logic in at.writeOneAtAutoNode.

An important **escape hatch**: the code will use the *old* rst writer (for @auto-rst nodes) if leo/plugins/writers/rst.py is disabled, say by changing the file's extension.

All tests pass, but this must still be considered experimental code.
QQQ

Let me elaborate on the escape hatch.  Previously, @auto-rst used rst.writeAtAutoFile as the writer.  This is considerably more complicated than the code in plugins/writers/rst.py.  Actually, I don't really understand the old rst write code: it would work on @rst nodes, but I don't see how those would get turned into @auto-rst nodes.

It may be that some people would prefer the old @auto-rst writer.  In that case, just disable plugins/writers/rst.py, say by renaming it to rst.xxx.

If you do decide to do this, please let me know why. We can then discuss how the new rst writer should work.

Edward

Zoltan Benedek

unread,
Jul 28, 2014, 1:02:26 PM7/28/14
to leo-e...@googlegroups.com
Hi Edward,

I don't know how much is a problem, but recently when starting Leo I get some unusual messages in the log pane:

can not import leo.plugins,importers.ini.py
can not import leo.plugins,importers.php.py
can not import leo.plugins,importers.elisp.py
can not import leo.plugins,importers.html.py
can not import leo.plugins,importers.pascal.py
can not import leo.plugins,importers.csharp.py
can not import leo.plugins,importers.python.py
can not import leo.plugins,importers.otl.py
can not import leo.plugins,importers.rst.py
can not import leo.plugins,importers.javascript.py
...

My environment: Kubuntu 12.04, Python 2.7.3, PyQt version 4.8.1, Leo's commit:
5c0164b7e9bb7958fca85c4c87f84d9355515675

Best regards.
Zoltan

Zoltan Benedek

unread,
Jul 28, 2014, 1:09:03 PM7/28/14
to leo-e...@googlegroups.com
Sorry, the correct Leo commit:
7f25136c3cf91e365b591799c4aaae0ab65ed69b

Jacob Peck

unread,
Jul 28, 2014, 1:25:49 PM7/28/14
to leo-e...@googlegroups.com
Same here:

Leo 4.11 final, build 7f25136c3cf9 (branch: master), 2014-07-28 13:17:57
Python 2.7.6, PyQt version 4.8.5
Windows 7 x86 (build 6.1.7601) SP1
can not import leo.plugins,importers.c.py
can not import leo.plugins,importers.csharp.py

can not import leo.plugins,importers.elisp.py
can not import leo.plugins,importers.html.py
can not import leo.plugins,importers.ini.py
can not import leo.plugins,importers.java.py
can not import leo.plugins,importers.javascript.py
can not import leo.plugins,importers.markdown.py
can not import leo.plugins,importers.org.py
can not import leo.plugins,importers.otl.py
can not import leo.plugins,importers.pascal.py
can not import leo.plugins,importers.php.py
can not import leo.plugins,importers.python.py
can not import leo.plugins,importers.rst.py
can not import leo.plugins,importers.typescript.py
can not import leo.plugins,importers.xml.py

Additionally, if I don't have Leo running in a console, trying to open a .leo file freezes fails with no errors... but it freezes the app.

-->Jake
--
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 leo-editor+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Jacob Peck

unread,
Jul 28, 2014, 1:30:56 PM7/28/14
to leo-e...@googlegroups.com
Last working commit for me was 6ebc7629728013ed99588ea3ea56223fa725a8ee, which was right before the new importer switch was removed.

Something changed the file read logic in the new importer code, and it prevents me from opening .leo files other than the first file Leo loads with, unless I'm running Leo with a console attached.

-->Jake

Edward K. Ream

unread,
Jul 28, 2014, 3:22:31 PM7/28/14
to leo-editor
On Mon, Jul 28, 2014 at 12:02 PM, Zoltan Benedek <benz...@gmail.com> wrote:
> Hi Edward,
>
> I don't know how much is a problem, but recently when starting Leo I get
> some unusual messages in the log pane:
>
> can not import leo.plugins,importers.ini.py
[snip]

Thanks for this report. I see the same thing on my Ubuntu machine.

I'll fix this immediately.

Edward

Edward K. Ream

unread,
Jul 28, 2014, 3:35:32 PM7/28/14
to leo-editor
On Mon, Jul 28, 2014 at 2:22 PM, Edward K. Ream <edre...@gmail.com> wrote:
> On Mon, Jul 28, 2014 at 12:02 PM, Zoltan Benedek <benz...@gmail.com> wrote:

>> can not import leo.plugins,importers.ini.py

The fix is at commit: a05a50...I had forgotten to add
leo/plugins/importers/basescanner.py, so all the importers took an
ImportError.

Edward
Reply all
Reply to author
Forward
0 new messages