Re: ekr-leoInteg.leo

2020-08-15 Thread Xu Wang
OK well noted with thanks

Félix  于2020年8月15日周六 下午10:54写道:

> Sorry - one last thing: you have to switch Leo to its 'devel' branch too!
> --
> Félix
>
> On Saturday, August 15, 2020 at 11:48:19 AM UTC-4, Austin(Xu) Wang wrote:
>>
>> OK noted. Thanks Felix for your work on bring Leo a modern GUI.
>>
>> and looking forward for the search feature.
>>
>> Félix  于2020年8月15日周六 下午10:45写道:
>>
>>> Hi Xu,
>>>
>>> Not Yet : I Have not yet implemented 'search' functions in leoInteg -
>>> although it is on the TODO list and will be implemented soon...
>>>
>>> Please make sure to report any details you would like to see added or
>>> corrected to leoInteg!
>>>
>>> Many thanks to you for trying it out and reporting errors or bugs!
>>>
>>> (Again, make sure to switch to the 'dev' branch)
>>> --
>>> Félix
>>>
>>> On Saturday, August 15, 2020 at 11:36:44 AM UTC-4, Austin(Xu) Wang wrote:
>>>>
>>>> Hi Felix,
>>>>
>>>> The video is good, I'm going to try it. :-)
>>>>
>>>> One more question, can I make a full text search for all the nodes in
>>>> the leo file in VSC?  something like the Nav tab of Leo QT GUI. I use it a
>>>> lot.
>>>>
>>>> BR,Xu
>>>>
>>>> Félix  于2020年8月15日周六 下午10:25写道:
>>>>
>>>>> Hey Xu, nice to meet you !
>>>>>
>>>>> LeoInteg is currently still in development, so a full 'compiled'
>>>>> extension package is not yet available in the vscode market.
>>>>>
>>>>> To try it out and install it, there's a readme file available at the
>>>>> repository, check it out at
>>>>> https://github.com/boltex/leointeg#development-version-installation
>>>>>
>>>>> A more specific "Contributing.md" file gives explicit details on how
>>>>> to go about and run the development version:
>>>>> https://github.com/boltex/leointeg/blob/master/CONTRIBUTING.md
>>>>>
>>>>>
>>>>> There's also this video https://www.youtube.com/watch?v=rutt11xL54I 
>>>>> ...which
>>>>> demonstrate the setup and install process,,, which I just realized I 
>>>>> forgot
>>>>> to put a link for into the 'Contributing.md' 臘
>>>>>
>>>>> *In any cases, I would recommend switching to the 'dev' branch while
>>>>> trying things out as it contains the most recent code updates.*
>>>>> --
>>>>> Félix
>>>>>
>>>>>
>>>>>
>>>>> On Saturday, August 15, 2020 at 11:10:06 AM UTC-4, Austin(Xu) Wang
>>>>> wrote:
>>>>>>
>>>>>> Thanks EKR for sharing this..
>>>>>>
>>>>>> Is there a HOWTO on using leoInteg with VS Code?
>>>>>>
>>>>>> For me, I enjoy using Leo for keeping my TODOs, meeting minutes and a
>>>>>> lot of information received everyday. However, I switch to another
>>>>>> editor(Textmate) for source code editing or some heavy editing work.
>>>>>>
>>>>>> If only I can use a modern editor with some Leo features, below is my
>>>>>> wish list:
>>>>>> - Node Clone
>>>>>> - Tree view for all the nodes
>>>>>> - Global search: The Nav tab of Leo QT editor.
>>>>>>
>>>>>> Do you think it's time for a normal user(not a Leo developer) to try
>>>>>> Leo/VSC?
>>>>>>
>>>>>> Best Regards,
>>>>>> Austin
>>>>>>
>>>>>>
>>>>>> Edward K. Ream  于2020年8月15日周六 下午9:34写道:
>>>>>>
>>>>>>> Attached is the study outline that I use to study the leoInteg
>>>>>>> sources.
>>>>>>>
>>>>>>> The @clean nodes in this outline correctly import all python and
>>>>>>> typescript files in the project without glitches.
>>>>>>>
>>>>>>> I'll be loading this outline in vs code using, you guessed it,
>>>>>>> leoInteg itself.
>>>>>>>
>>>>>>> Edward
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Goog

Re: ekr-leoInteg.leo

2020-08-15 Thread Xu Wang
OK noted. Thanks Felix for your work on bring Leo a modern GUI.

and looking forward for the search feature.

Félix  于2020年8月15日周六 下午10:45写道:

> Hi Xu,
>
> Not Yet : I Have not yet implemented 'search' functions in leoInteg -
> although it is on the TODO list and will be implemented soon...
>
> Please make sure to report any details you would like to see added or
> corrected to leoInteg!
>
> Many thanks to you for trying it out and reporting errors or bugs!
>
> (Again, make sure to switch to the 'dev' branch)
> --
> Félix
>
> On Saturday, August 15, 2020 at 11:36:44 AM UTC-4, Austin(Xu) Wang wrote:
>>
>> Hi Felix,
>>
>> The video is good, I'm going to try it. :-)
>>
>> One more question, can I make a full text search for all the nodes in the
>> leo file in VSC?  something like the Nav tab of Leo QT GUI. I use it a lot.
>>
>> BR,Xu
>>
>> Félix  于2020年8月15日周六 下午10:25写道:
>>
>>> Hey Xu, nice to meet you !
>>>
>>> LeoInteg is currently still in development, so a full 'compiled'
>>> extension package is not yet available in the vscode market.
>>>
>>> To try it out and install it, there's a readme file available at the
>>> repository, check it out at
>>> https://github.com/boltex/leointeg#development-version-installation
>>>
>>> A more specific "Contributing.md" file gives explicit details on how to
>>> go about and run the development version:
>>> https://github.com/boltex/leointeg/blob/master/CONTRIBUTING.md
>>>
>>>
>>> There's also this video https://www.youtube.com/watch?v=rutt11xL54I ...which
>>> demonstrate the setup and install process,,, which I just realized I forgot
>>> to put a link for into the 'Contributing.md' 臘
>>>
>>> *In any cases, I would recommend switching to the 'dev' branch while
>>> trying things out as it contains the most recent code updates.*
>>> --
>>> Félix
>>>
>>>
>>>
>>> On Saturday, August 15, 2020 at 11:10:06 AM UTC-4, Austin(Xu) Wang wrote:
>>>>
>>>> Thanks EKR for sharing this..
>>>>
>>>> Is there a HOWTO on using leoInteg with VS Code?
>>>>
>>>> For me, I enjoy using Leo for keeping my TODOs, meeting minutes and a
>>>> lot of information received everyday. However, I switch to another
>>>> editor(Textmate) for source code editing or some heavy editing work.
>>>>
>>>> If only I can use a modern editor with some Leo features, below is my
>>>> wish list:
>>>> - Node Clone
>>>> - Tree view for all the nodes
>>>> - Global search: The Nav tab of Leo QT editor.
>>>>
>>>> Do you think it's time for a normal user(not a Leo developer) to try
>>>> Leo/VSC?
>>>>
>>>> Best Regards,
>>>> Austin
>>>>
>>>>
>>>> Edward K. Ream  于2020年8月15日周六 下午9:34写道:
>>>>
>>>>> Attached is the study outline that I use to study the leoInteg sources.
>>>>>
>>>>> The @clean nodes in this outline correctly import all python and
>>>>> typescript files in the project without glitches.
>>>>>
>>>>> I'll be loading this outline in vs code using, you guessed it,
>>>>> leoInteg itself.
>>>>>
>>>>> Edward
>>>>>
>>>>> --
>>>>> 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-e...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/leo-editor/173b649b-976b-48a4-a246-dc2eeb72216an%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/leo-editor/173b649b-976b-48a4-a246-dc2eeb72216an%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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-e...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/leo-editor/dbb38f3f-db97-4519-9d58-0d1e4d99ac31o%40googlegroups.com
>>> <https://groups.google.com/d/msgid/leo-editor/dbb38f3f-db97-4519-9d58-0d1e4d99ac31o%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/1d0b6a44-d8ec-430c-97e8-aebbbd8590c7o%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/1d0b6a44-d8ec-430c-97e8-aebbbd8590c7o%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv9bmGhrncKyKKN5vTu4aJQ4bqH%3D81_v5QjMqv8Nr-Pzbw%40mail.gmail.com.


Re: ekr-leoInteg.leo

2020-08-15 Thread Xu Wang
Hi Felix,

The video is good, I'm going to try it. :-)

One more question, can I make a full text search for all the nodes in the
leo file in VSC?  something like the Nav tab of Leo QT GUI. I use it a lot.

BR,Xu

Félix  于2020年8月15日周六 下午10:25写道:

> Hey Xu, nice to meet you !
>
> LeoInteg is currently still in development, so a full 'compiled' extension
> package is not yet available in the vscode market.
>
> To try it out and install it, there's a readme file available at the
> repository, check it out at
> https://github.com/boltex/leointeg#development-version-installation
>
> A more specific "Contributing.md" file gives explicit details on how to go
> about and run the development version:
> https://github.com/boltex/leointeg/blob/master/CONTRIBUTING.md
>
>
> There's also this video https://www.youtube.com/watch?v=rutt11xL54I ...which
> demonstrate the setup and install process,,, which I just realized I forgot
> to put a link for into the 'Contributing.md' 臘
>
> *In any cases, I would recommend switching to the 'dev' branch while
> trying things out as it contains the most recent code updates.*
> --
> Félix
>
>
>
> On Saturday, August 15, 2020 at 11:10:06 AM UTC-4, Austin(Xu) Wang wrote:
>>
>> Thanks EKR for sharing this..
>>
>> Is there a HOWTO on using leoInteg with VS Code?
>>
>> For me, I enjoy using Leo for keeping my TODOs, meeting minutes and a lot
>> of information received everyday. However, I switch to another
>> editor(Textmate) for source code editing or some heavy editing work.
>>
>> If only I can use a modern editor with some Leo features, below is my
>> wish list:
>> - Node Clone
>> - Tree view for all the nodes
>> - Global search: The Nav tab of Leo QT editor.
>>
>> Do you think it's time for a normal user(not a Leo developer) to try
>> Leo/VSC?
>>
>> Best Regards,
>> Austin
>>
>>
>> Edward K. Ream  于2020年8月15日周六 下午9:34写道:
>>
>>> Attached is the study outline that I use to study the leoInteg sources.
>>>
>>> The @clean nodes in this outline correctly import all python and
>>> typescript files in the project without glitches.
>>>
>>> I'll be loading this outline in vs code using, you guessed it, leoInteg
>>> itself.
>>>
>>> Edward
>>>
>>> --
>>> 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-e...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/leo-editor/173b649b-976b-48a4-a246-dc2eeb72216an%40googlegroups.com
>>> <https://groups.google.com/d/msgid/leo-editor/173b649b-976b-48a4-a246-dc2eeb72216an%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/dbb38f3f-db97-4519-9d58-0d1e4d99ac31o%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/dbb38f3f-db97-4519-9d58-0d1e4d99ac31o%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv8Q56amzRSYbkoHhvPk1GLQcZxy-DUuQRerpVwYUT3O%3Dw%40mail.gmail.com.


Re: ekr-leoInteg.leo

2020-08-15 Thread Xu Wang
Thanks EKR for sharing this..

Is there a HOWTO on using leoInteg with VS Code?

For me, I enjoy using Leo for keeping my TODOs, meeting minutes and a lot
of information received everyday. However, I switch to another
editor(Textmate) for source code editing or some heavy editing work.

If only I can use a modern editor with some Leo features, below is my wish
list:
- Node Clone
- Tree view for all the nodes
- Global search: The Nav tab of Leo QT editor.

Do you think it's time for a normal user(not a Leo developer) to try
Leo/VSC?

Best Regards,
Austin


Edward K. Ream  于2020年8月15日周六 下午9:34写道:

> Attached is the study outline that I use to study the leoInteg sources.
>
> The @clean nodes in this outline correctly import all python and
> typescript files in the project without glitches.
>
> I'll be loading this outline in vs code using, you guessed it, leoInteg
> itself.
>
> Edward
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/173b649b-976b-48a4-a246-dc2eeb72216an%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv-g5sEvXNx5av4-XGHGN7JTWJ13%2B%3DN5wNhEw27%3D4L4wsg%40mail.gmail.com.


Re: Technical document writing using asciidoctor via Leo

2020-04-29 Thread Xu Wang
One more finding, in the generated .adoc file, there is one empty line
between the tittle and the author line,

= headline1

Austin Xu Wang
:doctype: book
:encoding: utf-8
:lang: en
:toc: left
:numbered:

The empty line should be removed, otherwise the generated html is with
wrong format.

Edward K. Ream  于2020年4月29日周三 下午9:18写道:

> On Wed, Apr 29, 2020 at 7:31 AM Xu Wang  wrote:
>
>> Some findings I have so far.
>>
>
> Good work. These should likely become part of Leo's AsciiDoctor page
> <http://leoeditor.com/leoandasciidoc.html>.
>
> Edward
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS0UhCsLztM3cTbensr0p4RrfGvtrrsx9hXn8aqCYzDOdQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS0UhCsLztM3cTbensr0p4RrfGvtrrsx9hXn8aqCYzDOdQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv9b7XhZR3YjV1xzyxg75K9yk7kYPLZW1kg5oUckzPgeMg%40mail.gmail.com.


Re: Technical document writing using asciidoctor via Leo

2020-04-29 Thread Xu Wang
Some findings I have so far.

1) which leo directive to enable syntax highlight for asciidoc

Use the @adoc node, for example a node with headline @adoc
leoasciidoctest.adoc,
Put @language asciidoc on the body of that node.

2) which directive to use for generating external .adoc file from Leoeditor
Use adoc command, it will generate both .adoc file and corresponding .html
file

3) how to use extensions in .adoc file, for example diagrams, slides

I put some diagram in the asciidoc file, the correct command for generating
html is
 asciidoctor -r asciidoctor-diagram leoasciidoctest.adoc

However, the default adoc command is without the -r asciidoctor-diagram
parameter.
Need to figure out a way to add parameters for the command.

4) which leo command to generate html from .adoc file
Use adoc command as #2

5) which leo command to generate pdf from .adoc file
May need to add new command by calling g.execute_shell_commands.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_L40foxFnpTX_ahe0Da1xVZqvQrmv%3DK0H3gK-2ZviBXQ%40mail.gmail.com.


Re: Technical document writing using asciidoctor via Leo

2020-04-28 Thread Xu Wang
Thanks Thomas for the information.

For now, I can live without preview, just use an external browser or PDF
reader for that purpose. The computer screen is too small, I will leave
more room for the body panel when writing. If only I can create buttons for
generating HTML/PDF from asciidoc tree, there is no problem for me to
refresh the external browser.

I tried @language asciidoc, however the syntax highlight is not complete,
only very few syntax are recognized. Even headlines are not highlighted.
This may be a problem when working on the body panel.

Best Regards,
Austin




Thomas Passin  于2020年4月29日周三 上午3:34写道:

>
> On Tuesday, April 28, 2020 at 1:27:41 AM UTC-4, Austin(Xu) Wang wrote:
>>
>> Dear All,
>>
>> I'm switching from Markdown to Asciidoctor for writing documents. I'd
>> like to use Leo as the central part for orgenizing all the docs.
>>
>> There are a list of questions I'm going to explore. If you have
>> experience or recommendations please share we me.
>>
>> 1) which leo directive to enable syntax highlight for asciidoc
>> 2) which directive to use for generating external .adoc file from
>> Leoeditor
>> 3) how to use extensions in .adoc file, for example diagrams, slides
>> 4) which leo command to generate html from .adoc file
>> 5) which leo command to generate pdf from .adoc file
>>
>
> I can not give you any comprehensive answers, but I can suggest some
> hope.  I have been enhancing the viewrendered3 plugin.  It inherited code
> from the older vewrendered plugin, and that code attempts to render
> asciidoc nodes in a separate viewing pane. I say attempts, because the code
> as is cannot find the asciidoc executable.  But I know how to fix that.
>
> So far, the plugin enhancements cover restructured text and Markdown.  It
> should be easy enough to enhance asciidoc nodes in a similar way.  When
> complete, you would be able to
>
> 1. Render asciidoc nodes and subtrees (by means of rendering to HTML);
> 2. Recognize @language asciidoc directives in node bodies and render
> those parts using asciidoc;
> 3. Recognize other @language directives and render as appropriate;
> 4. Render code and literal blocks differently from normal asciidoc text
> (e.g., in  tags for literal blocks);
> 5. Execute code blocks in the subtree (python only for the time being) and
> append any printed output;
> 6. Have code blocks colorized;
> 7. Export the HTML rendering to the system browser;
> 8. Render mathematics with MathJax, if asciidoc can work with or convert
> the math to latex. (RsT and MD can, and I imagine that asciidoc can too)
>
> To some extent, making all these capabilities available will depend on
> just how asciidoctor works, and I have never worked with it.  Still,
> everything should be possible.
>
> Developing these enhancements for asciidoc was fairly far down in my
> priority list, but if there is some interest out there I would be willing
> to move it up.  I realize that this would not address everything you
> mentioned, but it would be a good start.  Feedback, please!
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/17e109e2-db92-4f24-8ee7-586187f92088%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/17e109e2-db92-4f24-8ee7-586187f92088%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv-Cu4wWScW%3D54mmEDnhM%3D-X0wg9_XKW%2B-Z9UEskO_n4Mg%40mail.gmail.com.


Technical document writing using asciidoctor via Leo

2020-04-27 Thread Xu Wang
Dear All,

I'm switching from Markdown to Asciidoctor for writing documents. I'd like
to use Leo as the central part for orgenizing all the docs.

There are a list of questions I'm going to explore. If you have experience
or recommendations please share we me.

1) which leo directive to enable syntax highlight for asciidoc
2) which directive to use for generating external .adoc file from Leoeditor
3) how to use extensions in .adoc file, for example diagrams, slides
4) which leo command to generate html from .adoc file
5) which leo command to generate pdf from .adoc file

Best Regards,
Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_hgoLv2j3W_y_OuYtZ5S%2BD%3Dmy_TOXdtybosoRsVGfnqw%40mail.gmail.com.


Re: Importer for todo.txt files is ready for testing

2020-03-11 Thread Xu Wang
great. Thanks Edward. I will test this feature in the coming weekend.

Edward K. Ream  于 2020年3月10日周二 下午11:39写道:

> This is #1499 ,
> which I have just close. Summary:
>
> The 'import-todo-text-files' command prompts for one or more .txt files
> and shows the tasks in each file. At present, this command just prints the
> calculated list of ToDoTask objects.
>
> Scripts or plugins can use the list of ToDoTask objects as follows:
>
> import leo.core.leoImport as leoImport
> # path should be a full path to a todo.txt file
> tasks = leoImport.ToDoImporter(c).get_tasks_from_file(path)
> g.printObj(tasks, tag=f"tasks from {path}")
>
> "tasks" is a list of ToDoTask objects, which presents the parsed tasks in
> an easy-to-use form. Plugins could use the ToDoTask class as is, or adapt
> it to, say, set uA's.
>
> Imo, this is good enough for Leo 6.2. Let me know your experiences.
>
> Edward
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/12df2f0e-d441-41ea-9efa-14db70397df9%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv9LKvMfgjLCBmtK9Rc9_x8%2BnkhP3Y5Y0jMnSP7g%3DiTiLQ%40mail.gmail.com.


Re: best practice for test driven development leo script?

2020-03-02 Thread Xu Wang
ah... Ok


Edward K. Ream  于 2020年3月2日周一 下午6:41写道:

>
>
> On Sun, Mar 1, 2020 at 7:40 AM Xu Wang  wrote:
>
> >> What do you think the problem is?
>
> > I clicked "simple test cases collection" node first, so the p.h should
> be "simple test cases collection" when running the test.
>
> That's not how @test nodes work. For *each* @test node, p is bound to the
> position of the @test node *itself.* There is no way (and no need) to
> know the position of the node that was originally selected.  Clear?
>
> Edward
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS3GdSs6UD409MswrvpS5LHUsdF43DSaEwNM_ddiAvzt%3DQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS3GdSs6UD409MswrvpS5LHUsdF43DSaEwNM_ddiAvzt%3DQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_%2BsMh0nWzok6cSzOV5V0QjqAnsnteHaVMt842i%3DmeYAA%40mail.gmail.com.


Re: best practice for test driven development leo script?

2020-03-02 Thread Xu Wang
the two test cases were all passed when I (and Edward) execute them.

The second one in my opinion should fail.

Thomas Passin  于 2020年3月1日周日 下午11:42写道:

> Maybe you overlooked it because it scrolled way off the screen, but the
> output of your test outline, when I ran it, contained this:
>
>   File "D:\Tom\git\leo-editor\leo\core\leoNodes.py", line 1353, in copy
> return Position(self.v, self._childIndex, self.stack)
> RecursionError: maximum recursion depth exceeded
>
> I omitted the rest of the stack trace.
>
> On Sunday, March 1, 2020 at 8:20:34 AM UTC-5, Austin(Xu) Wang wrote:
>>
>> Strange...please find attached a mini outline file to reproduce.
>> Click node  "simple test cases collection"  and then "Do-@test" button.
>>
>> Below is the output on my console.
>>
>> Start of Do @test
>> ..
>> --
>> Ran 2 tests in 0.013s
>>
>> OK
>> End of Do @test
>>
>>
>> Edward K. Ream  于2020年3月1日周日 下午6:56写道:
>>
>>> On Sat, Feb 29, 2020 at 12:32 PM Xu Wang  wrote:
>>>
>>> > I tried to use run-all-unit-tests-locally command to execute the two
>>> test cases, still got same result. The position read by the test case code
>>> is not the real current position.
>>>
>>> Are you sure? I've never had this kind of trouble.
>>>
>>> Please show the code that appears to have this problem.
>>>
>>> Edward
>>>
>>> --
>>> 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-e...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/leo-editor/CAMF8tS3vWN2_BuP8KSau0pnFnTMyu%3D%3DaH4vTmOBOoS12QOidsg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS3vWN2_BuP8KSau0pnFnTMyu%3D%3DaH4vTmOBOoS12QOidsg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/1ad68899-ae32-4ad5-9a60-2a6ad72026e7%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/1ad68899-ae32-4ad5-9a60-2a6ad72026e7%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv8YaoA8ucW9R7jEeoHV%3DA6FUhagwYYyiPxLOrgViLcesA%40mail.gmail.com.


Re: best practice for test driven development leo script?

2020-03-01 Thread Xu Wang
>
>
>
> Everything seems fine to me. Both tests pass, as I think they should.
>
> Within an @test node, p is the position of the @test node itself.
>
> What do you think the problem is?
>
>
>
I clicked "simple test cases collection" node first, so the p.h should be
"simple test cases collection" when running the test.

The test case at node "@test 2nd test" should failed.

text = p.h
assert(text == "@test 2nd test")

"simple test cases collection"  !=  "@test 2nd test"

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv-aXYJX0rVhmqwpE9djChDsg5%3Dfdjqg2AV%2BSB2-N2Rajw%40mail.gmail.com.


Re: best practice for test driven development leo script?

2020-03-01 Thread Xu Wang
same result for minibuffer command: run-all-unit-tests-locally

Xu Wang  于2020年3月1日周日 下午8:20写道:

> Strange...please find attached a mini outline file to reproduce.
> Click node  "simple test cases collection"  and then "Do-@test" button.
>
> Below is the output on my console.
>
> Start of Do @test
> ..
> --
> Ran 2 tests in 0.013s
>
> OK
> End of Do @test
>
>
> Edward K. Ream  于2020年3月1日周日 下午6:56写道:
>
>> On Sat, Feb 29, 2020 at 12:32 PM Xu Wang  wrote:
>>
>> > I tried to use run-all-unit-tests-locally command to execute the two
>> test cases, still got same result. The position read by the test case code
>> is not the real current position.
>>
>> Are you sure? I've never had this kind of trouble.
>>
>> Please show the code that appears to have this problem.
>>
>> Edward
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/leo-editor/CAMF8tS3vWN2_BuP8KSau0pnFnTMyu%3D%3DaH4vTmOBOoS12QOidsg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS3vWN2_BuP8KSau0pnFnTMyu%3D%3DaH4vTmOBOoS12QOidsg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv-%3Dt5Yfmi1Nbju-cLcOysUrLVdR%3DJdPxNUovaY0s1BBUA%40mail.gmail.com.


Re: best practice for test driven development leo script?

2020-03-01 Thread Xu Wang
Strange...please find attached a mini outline file to reproduce.
Click node  "simple test cases collection"  and then "Do-@test" button.

Below is the output on my console.

Start of Do @test
..
--
Ran 2 tests in 0.013s

OK
End of Do @test


Edward K. Ream  于2020年3月1日周日 下午6:56写道:

> On Sat, Feb 29, 2020 at 12:32 PM Xu Wang  wrote:
>
> > I tried to use run-all-unit-tests-locally command to execute the two
> test cases, still got same result. The position read by the test case code
> is not the real current position.
>
> Are you sure? I've never had this kind of trouble.
>
> Please show the code that appears to have this problem.
>
> Edward
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS3vWN2_BuP8KSau0pnFnTMyu%3D%3DaH4vTmOBOoS12QOidsg%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS3vWN2_BuP8KSau0pnFnTMyu%3D%3DaH4vTmOBOoS12QOidsg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv-CUX7yhZt8WUOk_1CUrYkcE7shZAONPC_zgVhLRW%3DkiQ%40mail.gmail.com.


leo_unittest_position.leo
Description: Binary data


Re: Zettelkasten - Notes Jim but not as we know them.

2020-02-29 Thread Xu Wang
I tried to figure out which key is "Alt" on Mac, but never find out.

The "Command" key is catched as Ctrl,  the "Control" and "Option" key are
all catched as Meta on my MacBook.

Thomas Passin  于2020年3月1日周日 下午12:36写道:

>
>
> On Saturday, February 29, 2020 at 11:02:07 PM UTC-5, Thomas Passin wrote:
>
>>
>> I don't have a mac, but I installed the commands on a linux version --
>> I'm running one in a virtual machine.  It doesn't work there, either.  This
>> is a shock to me - everything in the code should work no matter what the
>> OS.  I'll see if I can track down what's going on.
>>
>
> The commands work on linux (and I was able to remove some unnecessary
> code).  The problem seems to be that Linux intercepts Alt-F8 and Alt-F7 for
> its own purposes (like resizing a window).  Presumably it's more or less
> the same on the Mac.  I'm trying to come up with alternate shortcut keys
> that aren't in use by either the OS or Leo.
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/0906031d-4c80-4c6e-b0be-9d43fd0e10e1%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv-uLwihwwgfaKtdr%2BGLK1ZdKPq5Pzo-d2OhS_2ajSYasw%40mail.gmail.com.


Re: best practice for test driven development leo script?

2020-02-29 Thread Xu Wang
>
> No, I would not call a bug. I simply meant that it's a lot easier to
> create outlines in unitTest.leo.
>
> Within a Test class, called by g.run_unit_test_in_separate_process, there
> will always be difficulties creating outlines, traversing them, etc. These
> difficulties can be overcome, it just takes more work.
>
>
Understood.

I tried to use run-all-unit-tests-locally command to execute the two test
cases, still got same result. The position read by the test case code is
not the real current position.


> Edward
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_a5j9wdnrj7mc%3DbrBEYuBUMKn8nGhi5%3DQ2XE6qKTqL9w%40mail.gmail.com.


Re: best practice for test driven development leo script?

2020-02-29 Thread Xu Wang
is the issue I raised in my previous email a Leo bug regarding accessing
position in the testcase?

BR,Austin

Edward K. Ream  于2020年2月29日周六 下午8:17写道:

>
>
> On Fri, Feb 28, 2020 at 9:31 PM Xu Wang  wrote:
>
>> Thanks Edward for the advice. I will try it later.  For now, I'm starting
>> from the basic one documented in unittest.leo
>>
>
> That's fine. It will be more convenient for tests that involve outlines.
>
> Edward
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS1ofKwjoE%2B%2BL6B__nk3j%2BSPbKBvosyWBuTpi-Bh0E5C_g%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS1ofKwjoE%2B%2BL6B__nk3j%2BSPbKBvosyWBuTpi-Bh0E5C_g%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_8u4%3Df1nxhQHmYeW1vtvhFtXsf21X3LJYVksTwYL1fkg%40mail.gmail.com.


best practice for test driven development leo script?

2020-02-27 Thread Xu Wang
Dear Leo Developer,


I am writing a script in Leo, it is located in the body of a @button node.

As adding more and more logic to the script, I feel I need to have some
test case to make me confident on the development progress.


As the moment, I am adding test case as below:

def func1():

...

def func2():

...

def main():

.


def test_scenario1():

func1()

func2()

def test_scenario2():

func2()

func1()

def test_main():

#test_scenario1()

test_scenario2()

c.redraw()

test_main()

#main()


I created a test_main() and put the test logic there. Using ctrl-b to see
the result of test_main().


It's not a good way:

1) The test cases and production code are mixed

2) Need manually disable/enable for different test scenarios.


I'm thinking to use python unittest library, but the way I use unittest
before was in command line, create a dedicated "test_button_body_code.py"
and "import button_body_code" to test button_body_code.py.


How shall I do the similar thing for leo @button script?

Or any other best practice for testing the script in the body of @button?


Best Regards,

Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_-URmxjabJA-OvcDMCpCD%2BaWnPvQZJDSp5vuuX_pcp7Q%40mail.gmail.com.


Re: clone one node as a child of current position

2020-02-27 Thread Xu Wang
Thanks for the detailed demo.. it's very helpful for me to getting familiar
with Leo scripting.

Edward K. Ream  于2020年2月26日周三 上午3:12写道:

> On Tue, Feb 25, 2020 at 12:42 PM Xu Wang  wrote:
>
>> Dear Leo Developer,
>>
>> If I know the GNX of one node, how shall I clone it to the position under
>> current node(as a child of current position)?
>>
>
> Good question.
>
> gnx's belong to vnodes, not positions. Your question is equivalent to
> asking, given a vnodes, how do I create the desired clone.
>
> Most of the time it will be easier to use positions rather than vnodes.
> For example, here is tested code that, given a *position, *moves a clone
> of that position to the last node of c.p:
>
> # Get the position of a node whose headline is 'Target Node'
> child_p = g.findNodeAnywhere(c, 'Target Node')
> assert child_p
> # Clone the node.
> clone = child_p.clone()
> # Move the node
> p = c.p
> n = p.numberOfChildren()
> clone.moveToNthChildOf(p, n)
> # Make all children visible and redraw.
> p.expand()
> c.redraw()
>
> If all you have is a gnx, then you can search for any position whose vnode
> has that gnx. Here is tested code.
>
> child_p = None
> for p in c.all_positions():
> if p.gnx == 'ekr.20200225134818.1': # The gnx of my target node.
> child_p = p
> break
> assert child_p
> clone = child_p.clone()
>
> And then you can proceed as before:
>
> p = c.p  # Don't use the p in the search loop!
> n = p.numberOfChildren()
> clone.moveToNthChildOf(p, n)
> p.expand()
> c.redraw()
>
> HTH.
>
> Edward
>
> P.S. If performance is a big consideration, you might be able to use one
> of Leo's dictionaries that associates vnodes with gnx's. But I'll leave
> that complication for (much) later :-)
>
> EKR
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/5a1e06e9-7fa1-4102-b810-dfe0aa01a1d4%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/5a1e06e9-7fa1-4102-b810-dfe0aa01a1d4%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv83t0pdYR7qn%2BwM%2BYmg_drfoGTYJ%3DVXQwUe4M9ic_%3Dd7g%40mail.gmail.com.


clone one node as a child of current position

2020-02-25 Thread Xu Wang
Dear Leo Developer,

If I know the GNX of one node, how shall I clone it to the position under
current node(as a child of current position)?

BR,Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv8D8JCkb8bX7Hpik%3DRbm_9U1kTwaUJKD5-pZVZvPed0kA%40mail.gmail.com.


Re: event for changing the order of nodes

2020-02-24 Thread Xu Wang
Thanks Edward, I am drafting some script to manipulate todo.txt file inside
Leo, will share it here when it's working.

BR,Austin

Edward K. Ream  于2020年2月24日周一 下午4:41写道:

> On Saturday, February 22, 2020 at 12:13:41 PM UTC-6, Austin(Xu) Wang wrote:
>>
>> Dear Leo Developer,
>>
>> If I have a node with 5 subnodes, the child #1 is focused, I clicked
>> SHIFT-DOWN, child #1 and child #2 will swap position.  Is there an event
>> for the position swap?
>>
>
> I have just created #1508
> <https://github.com/leo-editor/leo-editor/issues/1508> for this. The new
> code is in devel at rev c76e91.
>
> <https://github.com/leo-editor/leo-editor/commit/c76e91fe72445bf68ed14254366ef33c6dc361a1>
>
> This adds c.command_function and c.command_name ivars for use by event
> handlers.  For example:
>
> def command1_handler(tag, keys):
> c = keys.get('c')
> p = keys.get('p')
> print(f"command1: {c.command_name:>30} {p and p.h}")
>
> g.registerHandler('command1', command1_handler)
>
> I have closed this issue. Please reopen if there are problems.
>
> Edward
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/9550fb79-bbdf-4306-b840-4b1f72ce136e%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/9550fb79-bbdf-4306-b840-4b1f72ce136e%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_HCcHFXdHpy-oQXZLPJZBsPEHMj_1UK_Bo0s5x1AvFng%40mail.gmail.com.


Re: event for changing the order of nodes

2020-02-22 Thread Xu Wang
As an alternative solution, I'm thinking to create two new user defined
commands, @key=Move_up_key and @key=Move_down_key for moving current node
UP and DOWN.

Would you please share me where I can find of Leo code for moving node UP
and DOWN for reference?

Thanks,
Austin

Xu Wang  于2020年2月23日周日 上午1:13写道:

> Dear Leo Developer,
>
> If I have a node with 5 subnodes, the child #1 is focused, I clicked
> SHIFT-DOWN, child #1 and child #2 will swap position.  Is there an event
> for the position swap?
>
> I checked here
> http://leoeditor.com/slides/writingPlugins.html#handling-events
> but was not able to find a related one.
>
> Best Regards,
> Austin
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv9nNmhw8xApiFne90_K5wwx_uj_DBDMVTCjRkoLpKJT0g%40mail.gmail.com.


event for changing the order of nodes

2020-02-22 Thread Xu Wang
Dear Leo Developer,

If I have a node with 5 subnodes, the child #1 is focused, I clicked
SHIFT-DOWN, child #1 and child #2 will swap position.  Is there an event
for the position swap?

I checked here
http://leoeditor.com/slides/writingPlugins.html#handling-events
but was not able to find a related one.

Best Regards,
Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv8gqyi3gLpD_SOzpJprERdQN6Pc3Ry9QxbfVv%3DG%2BDByCA%40mail.gmail.com.


Re: todo.txt importer

2020-02-19 Thread Xu Wang
Thanks for the implementation plan. I put my comments on under #1499
<https://github.com/leo-editor/leo-editor/issues/1499> .

Edward K. Ream  于2020年2月19日周三 下午6:20写道:

> On Tue, Feb 18, 2020 at 9:59 AM Xu Wang  wrote:
>
> Does anybody implement an importer for todo.txt[1] file?
>> The file format is documented [2].
>>
>
> I have just created #1499
> <https://github.com/leo-editor/leo-editor/issues/1499> for this. It's
> topical, so I've assigned it to Leo 6.2. It should be straightforward.
>
> Edward
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS2KW%3Do04xH7fF%3DL7f5KNLgrCXAYQ3%2BLyBxMUQxHUDbTHg%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS2KW%3Do04xH7fF%3DL7f5KNLgrCXAYQ3%2BLyBxMUQxHUDbTHg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv-VJw9NFKeyDc_JByMimkmAC78fO_tf%2BCeYm3pQb7AE-w%40mail.gmail.com.


todo.txt importer

2020-02-18 Thread Xu Wang
Dear Leo Developers,

Does anybody implement an importer for todo.txt[1] file?
The file format is documented [2].

My initial idea is to create something like @auto-todo todo.txt
Each entry(task) in the todo.txt file will be a sub item under the
auto-todo node, and there can be another two sub items to show the project
view and context view.

BR,Austin

[1] http://todotxt.org/
[2] https://github.com/todotxt/todo.txt

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv9Fy-phD%3DPraTutPsXhm9b2RvJvB1%3DE%2B0vWa4s06MjL1Q%40mail.gmail.com.


Re: zombie process generated by g.execute_shell_commands

2020-02-11 Thread Xu Wang
updated to devel 9b6f29d12..93abd72c6, the problem fixed on my MacBook too.

Thanks EKR.

Brian Theado  于2020年2月12日周三 上午5:29写道:

> This is working fine for me now. I don't see zombie processes for the
> exited background commands anymore. Nice work.
>
> On Sun, Feb 9, 2020 at 8:07 AM Edward K. Ream  wrote:
>
>> On Sunday, February 9, 2020 at 6:08:42 AM UTC-6, Edward K. Ream wrote:
>>
>> > I have just created #1489
>>  for this topic.
>>
>> Rev 98530b0
>> 
>> in devel attempts a fix. I'm not sure it actually does anything useful.
>> Please reopen if problems remain, or if you have other suggested fixes.
>>
>>
>> Edward
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/leo-editor/e81a0a75-f12e-48ea-9bb3-0f81c447df95%40googlegroups.com
>> 
>> .
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAO5X8CyAVyKbeiLVxOB1JO_H28%2BR8zcg3qnNRjT8o2bkuSNnBQ%40mail.gmail.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv9etyY9mGrReBB8cndypyv3%2B-gXeb9PSdfHmzcNq2xThw%40mail.gmail.com.


zombie process generated by g.execute_shell_commands

2020-02-06 Thread Xu Wang
Dear Leo Developer,

I created one button in Leo, the corresponding script is:

c.save()
g.execute_shell_commands(['git -C /Users//leodata add austin.leo', 'git
-C /Users//leodata commit -mupdates', ' -C /Users//leodata
push'])


Basically, it will save the changes and do a git add/commit/push.
However, I notice the script will leave zombie process (git). See below ps
output.

Austin-MacBook-Pro:leodata wangxu$ ps -ef | grep git
  501 88822 20009   0  2:00AM ttys0000:00.00 grep git
  501 88678 88353   0  1:57AM ttys0010:00.00 (git)
  501 88683 88353   0  1:57AM ttys0010:00.00 (git)


Do I need to do something extra in g.execute_shell_commands ?

BR,Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv-LJuC6ozcmDe%2BG0Ts1Lt9jU%3DBPASs4FyuHu-GdHgVH5A%40mail.gmail.com.


mindmap view of one subtree

2019-12-19 Thread Xu Wang
Dear Leo User,

Is there any plugin can show a sub tree of Leo outlines into a mind map
view?

For example, like below
https://www.mindmaps.app/#

So user can edit outlines, or adding new childs..

BR,
Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv9dgZWncDNKQ6YbkdMNTQikgz3Qms_wh%3DwSXLSzqKE87g%40mail.gmail.com.


Re: macOS Catalina

2019-11-01 Thread Xu Wang
After upgraded to Catalina, the leo command does not work for unknown
reason.

But I can still invoke leo by go to the leo directory and run "python3
launchLeo.py"
Since I only run it every time the computer is reboot, so, it's not an
issue for me.

Rob  于2019年10月31日周四 上午6:33写道:

> I run Leo via python3 on my MacBook Pro (macOS Mojave) and it runs fine.
> I'm somewhat skeptical and nervous about updating to the next OS release,
> Catalina. Anyone have any experience or knowledge if this will break the
> tool chain for Leo? I'm really not in the mood to spend a lot of time
> reconfiguring python and pyQt to make it play nice with macOS. They (Apple)
> are kinda notorious for pushing updates which break things that they don't
> control (or get paid for).
>
> Rob...
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/946301cf-6072-4091-bbbd-3bc843c98a9a%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_cMPc1uGCU-k7tGXSe6-U19vOJ53PGM_ZkuXcrQWqV%2Bg%40mail.gmail.com.


Re: possible to convert all the tab in the body into space when save .leo file?

2019-09-10 Thread Austin(Xu) Wang
thanks Edward..

>
> Yes.  See the convert-* commands.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/2ecd355c-d07e-44d9-a4da-4969bce7b78a%40googlegroups.com.


possible to convert all the tab in the body into space when save .leo file?

2019-09-10 Thread Austin(Xu) Wang
Dear Leo User,

Is there such a command available to convert tab into space?

I'm facing one issue that the ReStructuredText table looks good in the body 
text, but when "make html" using sphinx, there are many Warnings regarding:

 WARNING: Malformed table.
Text in column margin in table line 2.


I believe the root cause is the mix use of space and tab in the body text.

BR,Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1d1d477b-ec36-4a55-8b51-b462f0255069%40googlegroups.com.


Re: difference between @auto and @clean node regarding generating rst file

2019-09-07 Thread Austin(Xu) Wang

>
>
>1. As to your PS question, that's a matter of personal preference and 
>how big the xxx.leo file will become. I prefer external files (most of the 
>time) as I can open and use with other editors and tools (e.g. pandoc).
>
>
Thanks Rob..I see. I switched to use @rst node. Compare with @auto-rst It 
requires an extro rst3 command, but can live with leoVUE peacefully.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ea18a0d9-3717-40aa-ac7d-e0802611c8f4%40googlegroups.com.


Re: difference between @auto and @clean node regarding generating rst file

2019-09-07 Thread Austin(Xu) Wang
also tried @nosent filename.rst with no luck.

On Saturday, September 7, 2019 at 7:39:44 PM UTC+7, Austin(Xu) Wang wrote:
>
> Dear Leo Users,
>
> I have one node "@auto filename.rst", under that node, there are a few 
> chapters of the rst file, which works great when I press save, the 
> filename.rst will be generated.
> If I change the node to "@clean filename.rst", I am not able to save. Leo 
> complains that:
>
> The following were not written because of errors:
> @clean filename.rst
>
>
> Is it possible to use @clean for generating rst?
> I cannot use @auto since the auto node is with no tnode in the .leo file, 
> which makes LeoVUE failed to load.  
> https://github.com/kaleguy/leovue/issues/9
>
> PS. what's the reason for not keeping the body of @auto node inside the 
> leo file?
>
> BR,Austin
>
>
>
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/452ed379-26f5-40bc-af5e-4b8a6f75442d%40googlegroups.com.


difference between @auto and @clean node regarding generating rst file

2019-09-07 Thread Austin(Xu) Wang
Dear Leo Users,

I have one node "@auto filename.rst", under that node, there are a few 
chapters of the rst file, which works great when I press save, the 
filename.rst will be generated.
If I change the node to "@clean filename.rst", I am not able to save. Leo 
complains that:

The following were not written because of errors:
@clean filename.rst


Is it possible to use @clean for generating rst?
I cannot use @auto since the auto node is with no tnode in the .leo file, 
which makes LeoVUE failed to load.  
https://github.com/kaleguy/leovue/issues/9

PS. what's the reason for not keeping the body of @auto node inside the leo 
file?

BR,Austin





-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/98b90b14-c6a0-42e7-bd9a-c222498ab3e9%40googlegroups.com.


leoVUE issues

2019-09-06 Thread Austin(Xu) Wang
Dear Leo User,

Just in case you are also a leoVUE user.. I need some help on two issues.

https://github.com/kaleguy/leovue/issues/8
https://github.com/kaleguy/leovue/issues/9

The two issues are quite similar, some valid leo directives @auto, @clean, 
@language rest make leoVUE display abnormal.


PS.
I managed to run leoVUE on my android mobile. So I can sync with remote git 
repo and browse the .leo file using leoVUE on mobile wherever I go.

BR,Austin





-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/34c666bc-c66d-4189-8c2a-d8e62ba84e89%40googlegroups.com.


Re: generate HTML from .txt via @rst node

2019-09-05 Thread Austin(Xu) Wang
On Thursday, September 5, 2019 at 8:04:54 PM UTC+7, Edward K. Ream wrote:

>
> cd leo/doc/html
> make html (or make clean)
>

I am using auto node for generating rst file for now.

@auto index.rst

The children are chapters, sub-chapters...So far so good, without using the 
rst3 command.
 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f9461dea-a2fd-4b1b-9520-6ed844135fcf%40googlegroups.com.


generate HTML from .txt via @rst node

2019-09-05 Thread Austin(Xu) Wang
Dear Leo User,

Follow the tutorial https://leoeditor.com/tutorial-rst3.html , I use the 
rst3 command successfully created on .html.txt file.

Is there any command I need to run from console to tell sphinx generate 
html from this .txt file?

I tried  sphinx-build ./ _build and got:
Sphinx error:
master file /./index.html.txt not found


BR,Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1bdce510-2343-4041-a435-246141ad45df%40googlegroups.com.


Re: Studying Robert Cholette's vs-code leointeg project

2019-08-30 Thread Austin(Xu) Wang

>
>
>
> Going forward, I'll take a couple hours to study leoVue a little bit, to 
> maybe make a tcp/ip communication instead of just stdIn/Out...
>

I vote for a standard RESTFUL API to access the nodes information.

 

> So all right for now, I'm going to bed!  Cheers! :D
>
>
Have a good rest..
 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/746e1432-9a16-4241-b04b-dfc0a1d8068c%40googlegroups.com.


Re: best practice for managing calendar events

2019-08-27 Thread Austin(Xu) Wang

>
>
>>> If you put the following code into a node with the headline `@button 
> clone-to-calendar @key=Alt-4`:
> v = p.v
> cal = c.find_h('Calendar')[0]
> cal_v = cal.v
> if cal_v not in v.parents:
> cal_v.children.append(v)
> v.parents.append(cal_v)
> cal_v.children.sort(key=lambda x:x.h)
> c.redraw()
>

Yes. The code works. I put it under one @command button, and I can use a 
shortcut key to clone current node.  Like a magic!

I'm trying to optimize it by adding an abbreviation.  I put below to 
my @data abbreviations

cal;;={|{

\:v = p.v

\:cal = c.find_h('Calendar')[0]

\:cal_v = cal.v

\:if cal_v not in v.parents:

\: cal_v.children.append(v)

\: v.parents.append(cal_v)

\: cal_v.children.sort(key=lambda x:x.h)

\: c.redraw()

\:}|}


I am expecting when I key in cal;;, the node will be automatically cloned. 
So I will not need to lose my focus when editing the meeting node body. 

However, the cal;; is not working as my expected. The editor must 
understood cal;; since I cannot key in another ';' after cal;;.


Do you know is there any limitation to implement such logic inside an 
abbreviation?


Thanks Again.


BR,Austin




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/d6ff9103-6fc9-4dd8-8530-2b3638171d6e%40googlegroups.com.


Re: best practice for managing calendar events

2019-08-27 Thread Austin(Xu) Wang
Thanks Matt.. 

I checked http://leo.zwiki.org/Tododoc for document. Also play with the 
[task] tab.  
My understanding is todo.py can set priority and progress of node.

My use case is I have too many projects, and each project may have one or 
more meeting reservations. 
I want to have one list or a calendar to check all the events.

I am trying the following solutions:
1) Modify the headline of the node if it's a meeting. make it starting with 
"20190827-10:00..."
2) Clone the node to one top level node named "Calendar"
3) Sort the Calendar children, so I get a list of coming events.

For Step #2, is there an easy way to clone one node and move it under 
another specific node?

BR,Austin





On Tuesday, August 27, 2019 at 2:32:14 AM UTC+7, Matt Wilkie wrote:
>
> Have a look at todo.py plugin. I think it's enabled by default, see [Task] 
> tab next to [Nav], [Tags] etc. (Disclaimer I haven't used it)
>
> matt
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/13e916f6-1de1-461e-bc26-bb591d3f4a70%40googlegroups.com.


best practice for managing calendar events

2019-08-26 Thread Austin(Xu) Wang
Hello Leonine,

I have a number of projects in my leo file, some of the projects have 
events.  For example:

ProjectA -> Meeting With Donald (Next Monday 10:00)
ProjectB -> Meeting with Steve(6th Sept 15:30)


Is there a way I can see a list of events for all the projects?

BR,Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/d9f7e541-7c5a-429e-8161-f58c23b918e6%40googlegroups.com.


Re: clone short cut for Mac

2019-08-25 Thread Austin(Xu) Wang
I am using Mackbook pro too. MacOS Majave 10.14.6

I press Option=x, on Body Panel, it produced on capitalized X.
on Log Panel, it produced a string "meta+x".

In any cases, focus was not changed to minibuffer.

On Monday, August 26, 2019 at 10:09:02 AM UTC+7, Rob wrote:
>
> Option key works for me as Alt key. However, I only use a MacBook Pro 
> which, perhaps has a different keyboard than a desktop Mac (don't know 
> since I don't have one).
>
> Rob...
>
> On Sunday, August 25, 2019 at 12:39:33 AM UTC-5, Austin(Xu) Wang wrote:
>>
>> Looks like in my Mac, the Command button is Ctrl.
>> Command-u/d/r/l/i all works.
>>
>> However, Command-` doesn't.  I redefined clone in myLeoSettings.leo to 
>> Crtl-\  for now.
>>
>> Another question is, which key is Alt key?
>> Tried Option-- and Option-] with no luck..
>>
>>
>>
>> On Sunday, August 25, 2019 at 8:02:10 AM UTC+7, Austin(Xu) Wang wrote:
>>>
>>> Shift-Command-C doesn't work in my Mac.
>>> Shift-Command-X copy one node
>>> Shift-Command-V paste one node ( not clone)
>>>
>>> If the body editor control is focused, 
>>> Option-x will put one capitalized X.
>>>
>>> If the log panel is focused,
>>> Option-x will put meta-x
>>>
>>>
>>>
>>> On Sunday, August 25, 2019 at 3:24:45 AM UTC+7, Rob wrote:
>>>>
>>>> Maybe not the best way, but what I do on my Mac is:
>>>>
>>>> Shift-Command-C (copy node)
>>>> Option-x (mini-buffer) paste-retaining-clones
>>>>
>>>> HTH
>>>> Rob...
>>>>
>>>> On Friday, August 23, 2019 at 3:19:15 PM UTC-5, Austin(Xu) Wang wrote:
>>>>>
>>>>> Hello Mac Leo User,
>>>>>
>>>>> Please how to clone a node via keyboard?
>>>>> It should be Ctrl-` , but I tried Command-` , Control-`, Option-`, no  
>>>>> one works...
>>>>>
>>>>> Also, Alt-x on my key board doesn't work too.. 
>>>>>
>>>>> BR,Austin
>>>>>
>>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/70b327a6-4f4d-4966-8d45-a382f2624c30%40googlegroups.com.


Re: source code for http://leoeditor.com/load-leo.html

2019-08-25 Thread Austin(Xu) Wang
Thanks Edward...Downloaded.
It's time for me to learn the best programming language. ;)

On Monday, August 26, 2019 at 3:35:23 AM UTC+7, Edward K. Ream wrote:
>
> On Sun, Aug 25, 2019 at 12:24 PM Austin(Xu) Wang  > wrote:
>
>> The .leo file browsing logic is in the script do-leo.php? 
>>
>
> Apparently.  I have just downloaded do-leo.php from Leo's web site, and 
> added it to the leo-editor directory.  Rev e6fc7d9 in devel adds it to 
> Leo's GitHub repo.
>
> I am pretty sure I didn't write do-leo.php, and I remember nothing about 
> it's history.
>
> Edward
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/4b37e3e5-ee83-481b-95c3-7df6e007adb1%40googlegroups.com.


Re: how to trigger double-click-icon-box

2019-08-25 Thread Xu Wang
OK.  The new binded key works. 

Edward K. Ream  于2019年8月25日周日 下午9:12写道:

>
>
> On Sun, Aug 25, 2019 at 4:16 AM Austin(Xu) Wang  wrote:
>
>>
>> Tried in minibuffer running command double-click-icon-box, it works as
>> expected.  My questions is how to trigger the event "double-click-icon-box"?
>>
>
> Bind double-click-icon-box to some key:
>
> @command dbl-click-icon-box @key=
> c.k.simulateCommand('double-click-icon-box')
>
> Edward
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS2OxJ0nMHcDrWJfnkgAB9vcUUag1o6xu_YAs2U1Sz%2BVrA%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS2OxJ0nMHcDrWJfnkgAB9vcUUag1o6xu_YAs2U1Sz%2BVrA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv9FGfF1oZZAS6n7KuczF8WTB1%3Dan_DDxpMxin%2BU%2BWRQpQ%40mail.gmail.com.


Re: clone short cut for Mac

2019-08-24 Thread Austin(Xu) Wang
Looks like in my Mac, the Command button is Ctrl.
Command-u/d/r/l/i all works.

However, Command-` doesn't.  I redefined clone in myLeoSettings.leo to 
Crtl-\  for now.

Another question is, which key is Alt key?
Tried Option-- and Option-] with no luck..



On Sunday, August 25, 2019 at 8:02:10 AM UTC+7, Austin(Xu) Wang wrote:
>
> Shift-Command-C doesn't work in my Mac.
> Shift-Command-X copy one node
> Shift-Command-V paste one node ( not clone)
>
> If the body editor control is focused, 
> Option-x will put one capitalized X.
>
> If the log panel is focused,
> Option-x will put meta-x
>
>
>
> On Sunday, August 25, 2019 at 3:24:45 AM UTC+7, Rob wrote:
>>
>> Maybe not the best way, but what I do on my Mac is:
>>
>> Shift-Command-C (copy node)
>> Option-x (mini-buffer) paste-retaining-clones
>>
>> HTH
>> Rob...
>>
>> On Friday, August 23, 2019 at 3:19:15 PM UTC-5, Austin(Xu) Wang wrote:
>>>
>>> Hello Mac Leo User,
>>>
>>> Please how to clone a node via keyboard?
>>> It should be Ctrl-` , but I tried Command-` , Control-`, Option-`, no  
>>> one works...
>>>
>>> Also, Alt-x on my key board doesn't work too.. 
>>>
>>> BR,Austin
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/90ba9768-1578-48cd-880d-e653d221b7e9%40googlegroups.com.


source code for http://leoeditor.com/load-leo.html

2019-08-24 Thread Austin(Xu) Wang
Dear Leonine,

Checking the documentation website, I found this tool
http://leoeditor.com/load-leo.html

which looks simple and easy to use.

Is the source code for the tool in leo git repo?

BR,Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0c66f7c7-0eb5-4994-9b35-1efd982c4669%40googlegroups.com.


Re: clone short cut for Mac

2019-08-24 Thread Austin(Xu) Wang
Shift-Command-C doesn't work in my Mac.
Shift-Command-X copy one node
Shift-Command-V paste one node ( not clone)

If the body editor control is focused, 
Option-x will put one capitalized X.

If the log panel is focused,
Option-x will put meta-x



On Sunday, August 25, 2019 at 3:24:45 AM UTC+7, Rob wrote:
>
> Maybe not the best way, but what I do on my Mac is:
>
> Shift-Command-C (copy node)
> Option-x (mini-buffer) paste-retaining-clones
>
> HTH
> Rob...
>
> On Friday, August 23, 2019 at 3:19:15 PM UTC-5, Austin(Xu) Wang wrote:
>>
>> Hello Mac Leo User,
>>
>> Please how to clone a node via keyboard?
>> It should be Ctrl-` , but I tried Command-` , Control-`, Option-`, no  
>> one works...
>>
>> Also, Alt-x on my key board doesn't work too.. 
>>
>> BR,Austin
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/7693e5fc-302c-4d58-8de1-043bd80ffaf6%40googlegroups.com.


Re: locate one node by it's path via leoBridge

2019-08-24 Thread Austin(Xu) Wang
thanks vitalije for the instruction. much appreciated. 

On Saturday, August 24, 2019 at 4:00:21 PM UTC+7, vitalije wrote:
>
> You can try the following:
> def get_child_headlines(c, address):
> return g.recursiveUNLSearch(address.split('-->'), c)
>
> You can find nodes even faster if you know their gnx (you can obtain a gnx 
> value by using p.gnx or v.gnx). 
> def get_node(c, gnx):
> return c.fileCommands.gnxDict.get(gnx)
>
> def get_body_and_headline(c, gnx):
> v = get_node(gnx)
> return v.h, v.b
>
> I assume that you have obtained the address of the 
> node "IT-->Leo-->Writing Plugin-->Display Message" by copying it from the 
> status line in Leo window. If you want to copy gnx of some node you can do 
> this using the following script.
> g.app.gui.replaceClipboardWith(p.gnx)
>
> This script you can make a button of it and then when you want to copy gnx 
> of some node, just select it and click the button.
>
> HTH Vitalije
>
>
>
> On Saturday, August 24, 2019 at 9:07:44 AM UTC+2, Austin(Xu) Wang wrote:
>>
>>
>> I realized  get_headline ("IT-->Leo-->Writing Plugin-->Display Message") 
>> is with no sense..
>>
>> What I want is:
>>
>> - get_child_headlines ("IT-->Leo-->Writing Plugin-->Display Message")
>>   # return a list of headlines for each child node.
>> - get_body ("IT-->Leo-->Writing Plugin-->Display Message")
>># return the body text
>>
>>
>> On Saturday, August 24, 2019 at 12:46:07 PM UTC+7, Austin(Xu) Wang wrote:
>>>
>>> Dear Leo User,
>>>
>>> I want to access the headline and body of a specific node inside that 
>>> file using the leoBridge interface.
>>> Is it possible to get the body and headline from the path of that node?
>>>
>>> For example, for one node with headline "Display Message":
>>> /Users/wangxu/Documents/Leo/austin.leo#IT-->Leo-->Writing 
>>> Plugin-->Display Message
>>>
>>> Is it doable to implement function:
>>> - get_headline ("IT-->Leo-->Writing Plugin-->Display Message")
>>> - get_body ("IT-->Leo-->Writing Plugin-->Display Message")
>>>
>>> Please guide me on this..
>>>
>>> BR,Austin
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0c0c0762-06e0-4b8f-a607-8dd57880b7b2%40googlegroups.com.


Re: locate one node by it's path via leoBridge

2019-08-24 Thread Austin(Xu) Wang

I realized  get_headline ("IT-->Leo-->Writing Plugin-->Display Message") is 
with no sense..

What I want is:

- get_child_headlines ("IT-->Leo-->Writing Plugin-->Display Message")  
# return a list of headlines for each child node.
- get_body ("IT-->Leo-->Writing Plugin-->Display Message")  
 # return the body text


On Saturday, August 24, 2019 at 12:46:07 PM UTC+7, Austin(Xu) Wang wrote:
>
> Dear Leo User,
>
> I want to access the headline and body of a specific node inside that file 
> using the leoBridge interface.
> Is it possible to get the body and headline from the path of that node?
>
> For example, for one node with headline "Display Message":
> /Users/wangxu/Documents/Leo/austin.leo#IT-->Leo-->Writing Plugin-->Display 
> Message
>
> Is it doable to implement function:
> - get_headline ("IT-->Leo-->Writing Plugin-->Display Message")
> - get_body ("IT-->Leo-->Writing Plugin-->Display Message")
>
> Please guide me on this..
>
> BR,Austin
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b109022c-9247-422e-8a81-14e89f164222%40googlegroups.com.


locate one node by it's path via leoBridge

2019-08-23 Thread Austin(Xu) Wang
Dear Leo User,

I want to access the headline and body of a specific node inside that file 
using the leoBridge interface.
Is it possible to get the body and headline from the path of that node?

For example, for one node with headline "Display Message":
/Users/wangxu/Documents/Leo/austin.leo#IT-->Leo-->Writing Plugin-->Display 
Message

Is it doable to implement function:
- get_headline ("IT-->Leo-->Writing Plugin-->Display Message")
- get_body ("IT-->Leo-->Writing Plugin-->Display Message")

Please guide me on this..

BR,Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b6a51598-ac6f-449e-9f43-90e2f19836c7%40googlegroups.com.


clone short cut for Mac

2019-08-23 Thread Austin(Xu) Wang
Hello Mac Leo User,

Please how to clone a node via keyboard?
It should be Ctrl-` , but I tried Command-` , Control-`, Option-`, no  one 
works...

Also, Alt-x on my key board doesn't work too.. 

BR,Austin

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ac4fdb35-3738-424f-a5e4-7cf24a5fd1b5%40googlegroups.com.


Re: render dock and tabs dock lost

2019-08-21 Thread Austin(Xu) Wang
ha.. alt-click works.. thanks.
On Wednesday, August 21, 2019 at 5:25:52 PM UTC+7, Edward K. Ream wrote:
>
>
>
> On Tue, Aug 20, 2019 at 10:19 PM Austin(Xu) Wang  > wrote:
>
>> Dear All,
>>
>> For some reason, I cannot find my render dock and tabs dock.
>>
> ... 
>
>> How to recover those useful windows? 
>>
>
> Alt-click (right or left click, depending on your platform settings) the 
> title of any dock.  You will see a list of docks.  Click on the desired 
> dock to change its visibility.
>
> Or you can run Leo with --init-docks, but then you have to reposition all 
> docks.
>
> Edward
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/dbda5f62-58dd-4948-9081-8352a21fa79c%40googlegroups.com.


Re: enable theme file

2019-08-20 Thread Xu Wang


在 2019年8月19日星期一 UTC+7下午7:16:31,vitalije写道:
>
> myLeoSettings.leo file should be in ~/.leo/ folder. not in ~/   (your home 
> folder).
>
> and the setting you should have under the @settings node is:
> @string theme-name=BreezeDark2Theme.leo
>
>

thanks Vitalije..  it's solved. 

Vitalije
>
> On Monday, August 19, 2019 at 12:57:59 PM UTC+2, Austin(Xu) Wang wrote:
>>
>> Dear All,
>>
>> I'm trying to enable a theme, below is the procedure I followed:
>>
>> 1) Create one empty leo file, name it myLeoSettings.leo, put is under my 
>> home folder.
>> 2) Added one node in the empty myLeoSettings.leo with following headline:
>>
>> @string BreezeDark2Theme BreezeDark2Theme.leo
>>
>> 3) save myLeoSettings.leo
>> 4) quit leo and restart leo.
>>
>> The theme was not enabled.
>> There must be something wrong in my myLeoSettings.leo?
>>
>> I also tried 
>> 1) put another @settings node and make 
>> @string BreezeDark2Theme BreezeDark2Theme.leo under that node
>> 2) change @string BreezeDark2Theme BreezeDark2Theme.leo to 
>> @string BreezeDark2Theme=BreezeDark2Theme.leo
>>
>> all failed.
>>
>> Finally, I workaround this by making a copy of BreezeDark2Theme.leo to 
>> ~/myLeoSettings.leo and the theme began to work.
>>
>> This should not the proper way.. how to enable a them in 
>> myLeoSettings.leo?
>>
>> BR,Xu
>>
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8e4e4857-eeb3-47c9-86de-bbed5467fe0c%40googlegroups.com.


Re: How to customize look?

2019-08-19 Thread Austin(Xu) Wang
Thanks Chris..

Suggest to put this procedure in the document something like a best 
practice(for newbie?)..  

I was not able to config theme successfully following the instructions at 
https://leoeditor.com/customizing.html#theme-files

Until I found this email.

On Thursday, June 20, 2019 at 10:55:31 PM UTC+7, Chris George wrote:
>
> HI Gar,
>
> Here is how I use themes.
>
> In the directory leo-editor/leo/themes are a number of theme files. These 
> can be loaded using the File, Open Outline menu option in Leo. Opening an 
> outline automatically loads it. Keep opening outlines until you find one 
> you like.
>
> Then close all of the theme files.
>
> Copy the theme file you chose from leo-editor/leo/themes to ~/.leo/themes 
> (you will have to create the themes folder here) and rename it something 
> like this: Original file is BreezeDarkTheme.leo rename to 
> BreezeDarkThemeLocal.leo
>
> Now open your myLeoSettings.leo file.
>
> Add the following to the headline of a new node as a child of your 
> @settings node:
> @string theme-name = BreezeDarkThemeLocal
>
> Now save the file and restart Leo.
>
> You should now be using the theme of your choice. From here you need to 
> open the local theme file with Leo. The font sizing and colors are under 
> Theme Settings in the tree.
>
> HTH,
>
> Chris
>
>
> On Thursday, June 20, 2019 at 8:40:10 AM UTC-7, gar wrote:
>>
>> Strange... My settings contain (for example) @string font-size-body = 12px
>> But when I dump all the settings via menu command I see that: [F] @string 
>> fontsizebody = 22px
>> Got no idea what does that mean and why does it go in this way.
>> It seems strange to me to spend hours debugging setup of font sizes of 
>> the editor
>>
>> четверг, 20 июня 2019 г., 18:23:45 UTC+3 пользователь gar написал:
>>>
>>> I'm trying to customize Leo for my likings. 
>>> First of all I took a theme and placed it's name into appropriate 
>>> setting of myLeoSettings project. Ok, it applied, but font size is so huge 
>>> that all texts run out of my screen.
>>>
>>> Ok. I added a setting for base font size. It didnt work. Fonts remained 
>>> huge.
>>> Ok, I said. I copied theme node into mySettings. Changed font sizes 
>>> everywhere I found their traces. And nothing has changed again. Magic.
>>>
>>> Is there any way to customize fonts when theme is used? I suspect that 
>>> their sizes hardcoded somewhere in qml files - seems like so.
>>>
>>>
>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f96819c9-b687-47c4-8228-ececacc607f4%40googlegroups.com.