Re: @button for displaying all parents of a clone to log pane

2019-10-07 Thread Segundo Bob
On 10/7/19 3:23 PM, Brian Theado wrote:
> You interpreted SegundoBob's request differently, than I did. I was
> thinking he didn't mind that the duplicates are there (and maybe prefers
> it?), just that he wanted the displayed links go to the separate
> instances of the clones.
> 

Brian is right.  Edward, I think your fix does not fix the problem.

The title given the code is misleading.  Yes, it displays the parents of
all the occurrences of the selected cloned node, but the clickable links
are intended to jump to each occurrence of the cloned node.

I think this is the most reasonable and useful design.  The user is
interested in all the occurrences of a cloned node, not in the parents
of these occurrences.  The parent headlines are displayed because these
are the most likely to be distinct identifiers of the occurrences available.

-- 
Segundo Bob
segundo...@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/3e89f32d-d5b9-afa8-e923-d31072eab87c%40gmail.com.


Re: @button for displaying all parents of a clone to log pane

2019-10-07 Thread Brian Theado
Thanks, Edward for putting this code into the core as a command.

You interpreted SegundoBob's request differently, than I did. I was
thinking he didn't mind that the duplicates are there (and maybe prefers
it?), just that he wanted the displayed links go to the separate instances
of the clones.

SegundoBob, could you clarify?

On Mon, Oct 7, 2019 at 4:58 PM Edward K. Ream  wrote:

>
>
> On Monday, October 7, 2019 at 3:42:17 PM UTC-5, btheado wrote:
>>
>>
>> The short answer is that this is standard, core Leo code I'm calling. The
>> long answer is that it will take some investigation.
>>
>
> Here is the fix, at rev cc6c47b in devel:
>
> @g.command('show-clones')
> def show_clones(event=None):
> """Display links to all parent nodes of the node c.p."""
> c = event.get('c')
> if not c:
> return
> seen = []
> for clone in c.vnode2allPositions(c.p.v):
> parent = clone.parent()
> if parent and parent not in seen:
> seen.append(parent)
> g.es_clickable_link(c, clone, 1, f"{parent.h} -> {clone.h}\n")
>
> Note that the more pythonic: `for clone in
> list(set(c.vnode2allPositions(c.p.v)))` fails because positions are (on
> purpose) not hashable.
>
> 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/5b3979ca-dc8a-482b-9698-691a304d7379%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/CAO5X8CztAPVPMwfGXmsYNvGRQmC-agnrxYynpgpZPAunznrgZg%40mail.gmail.com.


Re: @button for displaying all parents of a clone to log pane

2019-10-07 Thread Edward K. Ream


On Monday, October 7, 2019 at 3:42:17 PM UTC-5, btheado wrote:
>
>
> The short answer is that this is standard, core Leo code I'm calling. The 
> long answer is that it will take some investigation.
>

Here is the fix, at rev cc6c47b in devel:

@g.command('show-clones')
def show_clones(event=None):
"""Display links to all parent nodes of the node c.p."""
c = event.get('c')
if not c:
return
seen = []
for clone in c.vnode2allPositions(c.p.v):
parent = clone.parent()
if parent and parent not in seen:
seen.append(parent)
g.es_clickable_link(c, clone, 1, f"{parent.h} -> {clone.h}\n")

Note that the more pythonic: `for clone in 
list(set(c.vnode2allPositions(c.p.v)))` fails because positions are (on 
purpose) not hashable.

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/5b3979ca-dc8a-482b-9698-691a304d7379%40googlegroups.com.


Re: @button for displaying all parents of a clone to log pane

2019-10-07 Thread Brian Theado
SegundoBob,

I don't ever have clones with the same parent in my workflow and I didn't
think to test that case. It looks like the g.es_clickable_link method is
making use of UNL rather than positions. It looks to me like the leo getUNL
functionality handles multiple clones with the same parent.  Maybe the
g.handleUnl method (which is the callback when a UNL link is clicked) is
doing something wrong.

The short answer is that this is standard, core Leo code I'm calling. The
long answer is that it will take some investigation.

Brian

On Mon, Oct 7, 2019 at 2:05 PM SegundoBob  wrote:

> btheado,
>
> Thanks, but your code doesn't work if several positions have the same
> parent.  In this case, multiple links for the positions are displayed, but
> they all go to only one of the positions.  I did not figure out what
> determines which of the positions wins.
>
> SegundoBob
>
> --
> 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/daac2df5-8483-4952-9145-78a76d3eaffa%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/CAO5X8CwZLcZhGzyYnxczJMLczQ%3DQzMAiH0pw1dZx1%2Bwrxs6hvQ%40mail.gmail.com.


Re: Improved asciidoc, asciidoctor and pandoc support

2019-10-07 Thread Edward K. Ream
On Mon, Oct 7, 2019 at 11:39 AM Offray Vladimir Luna Cárdenas <
off...@riseup.net> wrote:

> Nice to see those additions. In the Leo's documentation, I would expand
> about why the "pandoc tool must exist".
>
Done in devel.

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/CAMF8tS3cQN0jy2rfUEYWXSPsKpOgEDOWkvJG8yCMSXM2M7bD1g%40mail.gmail.com.


Re: For Leo 6.0 on Windows 10 - PyQt 4 or PyQt 5?

2019-10-07 Thread Viktor Ransmayr
Hello Edward,

Am Sonntag, 6. Oktober 2019 19:31:33 UTC+2 schrieb Edward K. Ream:

> On Sun, Oct 6, 2019 at 11:39 AM Viktor Ransmayr  > wrote:
>
> Which other references do you recommend related to 'dark themes' beside 
>> the ones that I found so far?
>>
>
> I would look at actual theme files. There are known problems with class 
> selectors. See if any are interfering with your style sheets.
>

Thanks for your advice. - I'll give it a try & report back once I've made 
real progress.

With kind regards,

Viktor

-- 
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/668ac9cf-158b-40ec-93ba-558847f42817%40googlegroups.com.


Re: Improved asciidoc, asciidoctor and pandoc support

2019-10-07 Thread Matt Wilkie

>
> Please report your experiences with these new features.
>

For me the external file is not created. See the desktop-integration.leo 
file at rev f0c07886d25ea892b15159d00f4ef531aae8a723 in devel.

Leo Log Window
Leo 6.1-devel, devel branch, build bd1ac64b20
2019-10-07 10:51:57 -0500
Python 3.6.9, PyQt version 5.13.0
Windows 10 AMD64 (build 10.0.18362) SP0
read 4 files in 0.03 seconds
read outline in 0.06 seconds
 saved: Desktop-integration.leo
 saved: Desktop-integration.leo
 saved: Desktop-integration.leo

-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/3a79b955-c611-46dc-8587-2605b807d271%40googlegroups.com.


Re: @button for displaying all parents of a clone to log pane

2019-10-07 Thread SegundoBob
btheado,

Thanks, but your code doesn't work if several positions have the same 
parent.  In this case, multiple links for the positions are displayed, but 
they all go to only one of the positions.  I did not figure out what 
determines which of the positions wins.

SegundoBob

-- 
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/daac2df5-8483-4952-9145-78a76d3eaffa%40googlegroups.com.


Re: Improved asciidoc, asciidoctor and pandoc support

2019-10-07 Thread Offray Vladimir Luna Cárdenas
Hi,

Nice to see those additions. In the Leo's documentation, I would expand
about why the "pandoc tool must exist".

Cheers,

Offray

On 7/10/19 10:31 a. m., Edward K. Ream wrote:
> There are several major features here, spanning several issues, both
> open and closed.
>
> This post will be pre-writing for Leo's documentation.
>
> *Support for @language pandoc*
>
> leo/modes/pandoc.py is based on leo/modes/md.py.
>
> *Live rendering of asciidoc and pandoc markup*
>
> The VR plugin recognizes @adoc nodes, @pandoc nodes (see below) and
> @language pandoc and @language md.
>
> The VR plugin renders only p.b. Read on if you want render entire files...
>
> *Improved adoc command*
>
> Given an @adoc node of the form @adoc , this command does
> the following:
>
> 1. Scan the @adoc tree, writing the result to adoc_test.adoc.
>
> The scan converts headlines to section markup. See help-for-command
> for adoc for more details.
>
> 2. Calls asciidoctor or asciidoc3 to convert adoc_test to adoc.html.
>
> This command prefers asciidoctor to to asciidoc3 if both exist. 
>
> *New adoc-with-preview command*
> *
> *
> Runs the adoc command, then shows the resulting html in the default
> browser.
>
> *New pandoc and pandoc-with-preview commands*
>
> Much like the corresponding adoc commands, but uses pandoc markup,
> which is a variant of markdown.
>
> The pandoc tool must exist.
>
> *Summary*
>
> Leo now supports @language pandoc.
>
> The VR pane now renders asciidoc or pandoc markup live, but only for p.b.
>
> The new adoc, adoc-with-preview,  pandoc, and pandoc-with-preview
> commands work on @adoc or @pandoc trees.
>
> Please report your experiences with these new features.
>
> 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/5af2ac1d-ccf7-4f15-8301-efdcfff26828%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/f0e36c5a-6a97-a2bc-4fb8-cea01cfa3f8d%40riseup.net.


Re: Success! Sant Mat lineage chart converted from Freeplane to OPML to Leo to LeoVue!

2019-10-07 Thread Matt Wilkie
Great to hear of success from outside the usual suspects developer pool!
 

> Leo was rendered on the web via LeoVue:
> http://santmat.livingcosmos.org/surat-shabd-yoga/ssy-leo.html#/t/1
>

Unfortunately I get the table of contents on the left but the body pane 
remains blank. Using the collapsed menu at top right I can switch between 
Outline, Dendrogram, etc. but only the ToC changes. Developer Tools 
javascript console reports several "Error: TypeError: "e is undefined" in 
Item.vue:144 (from main.js). I'm using Firefox on Win10. I didn't test any 
other browsers.

-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/8962061a-3eba-482e-8182-a8aaf67d3d29%40googlegroups.com.


Improved asciidoc, asciidoctor and pandoc support

2019-10-07 Thread Edward K. Ream
There are several major features here, spanning several issues, both open 
and closed.

This post will be pre-writing for Leo's documentation.

*Support for @language pandoc*

leo/modes/pandoc.py is based on leo/modes/md.py.

*Live rendering of asciidoc and pandoc markup*

The VR plugin recognizes @adoc nodes, @pandoc nodes (see below) and 
@language pandoc and @language md.

The VR plugin renders only p.b. Read on if you want render entire files...

*Improved adoc command*

Given an @adoc node of the form @adoc , this command does the 
following:

1. Scan the @adoc tree, writing the result to adoc_test.adoc.

The scan converts headlines to section markup. See help-for-command for 
adoc for more details.

2. Calls asciidoctor or asciidoc3 to convert adoc_test to adoc.html.

This command prefers asciidoctor to to asciidoc3 if both exist.  

*New adoc-with-preview command*

Runs the adoc command, then shows the resulting html in the default browser.

*New pandoc and pandoc-with-preview commands*

Much like the corresponding adoc commands, but uses pandoc markup, which is 
a variant of markdown.

The pandoc tool must exist.

*Summary*

Leo now supports @language pandoc.

The VR pane now renders asciidoc or pandoc markup live, but only for p.b.

The new adoc, adoc-with-preview,  pandoc, and pandoc-with-preview commands 
work on @adoc or @pandoc trees.

Please report your experiences with these new features.

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/5af2ac1d-ccf7-4f15-8301-efdcfff26828%40googlegroups.com.


Re: Question about running / driving leo 'headless' to integrate it in my own GUI

2019-10-07 Thread Robert Cholette
Many Thanks! 'Real' 

Editing functionality is coming soon as this first phase of 'leoBridge 
communication & browsing stability' is almost done.
--
Félix


On Saturday, August 10, 2019 at 3:49:34 PM UTC-4, Robert Cholette wrote:
>
> First I'd like to apologize for just asking this on github, I didnt 
> realise here was perhaps a better place to ask this kind of thing... 
>
> Hi! Long time leo user here. I use it mainly for the 'core' features: 
> outline organisation of my code : @clean nodes, structure with @others. And 
> I alt-tab leo alongside with another editor/IDE for 
> running/debugging/compiling/linting/beautifying/etc...
>
> I dont care so much about vim/emacs integration nor dont even understand 
> what those buffers/minibuffers are and all around feel like that qt-gui 
> framework didnt age very well. (no offence meant here, as I would be 
> devastated to think I offended edream, he's like my programming 'idol')
> I also do not use @buttons and internal scripting in leo altough i can see 
> its use for some people. 
>
> I mainly use Leo for its 'file-generation'/'file-reading' (mainly @clean) 
> feature via the outline structure that it provides. Organising a program 
> with an outline, clones and @others is the best! Which also, if I may say 
> so, is Leo's 'killer feature'.
>
> So i'd like to try and integrate, or 'roll my own' leo in my other 
> favorite editor so that I have the subset of leo's features that I just 
> defined as its 'killer features' available without having Leo 'opened'. 
> Is leoBridge the way to go? ...or is there a way to start leo with no GUI 
> and have it listen for commands on a specific port for input/output of 
> commands and answers? 
>
> Many thanks in advance!!  
>

-- 
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/5b26fe49-3952-4a34-b49e-eb34b58d17b4%40googlegroups.com.


Re: Anyone using the pyzo_in_leo plugin?

2019-10-07 Thread lewis
I'm using pyzo_in_leo only to see how useful it can be.
It uses a lot of screen area in Leo; pyzo docks have minimum size, so you 
can't drag them to very narrow space. At least you can toggle pyzo docks 
on/off if you like. This is one reason think it's good to retain the 
python_terminal plugin for now.

With pyzo_in_leo active, several times I have observed a bug where the 
outline column goes blank, but is still functioning. You can arrow up/down 
but the headline text is invisible.

Regards
Lewis

-- 
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/fd5c2689-dc95-4418-9512-c91e78d8aaa5%40googlegroups.com.


Help wanted: #990: neovim plugin

2019-10-07 Thread Edward K. Ream
I have just changed the name of #990 
 to "Two-way 
communication between Leo and neovim".  At present, this issue is scheduled 
for Leo 6.2, but it might be the work of just a few hours...

neovim uses MessagePack to enable 
two-way communication with any language. There is a python binding 
 for MessagePack, so the entire project 
should be relatively straightforward.

Imo, it would be best if a real vim users did this.  Anyone want to have a 
go?

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/d6d3412b-d51f-4849-8635-2339bd40b7b2%40googlegroups.com.


Anyone using the pyzo_in_leo plugin?

2019-10-07 Thread Edward K. Ream
I'm curious about how much interest there is.

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/84138607-f7d1-4bb9-a13f-0c9622a09638%40googlegroups.com.


Re: @button for displaying all parents of a clone to log pane

2019-10-07 Thread Edward K. Ream
On Monday, October 7, 2019 at 3:41:26 AM UTC-5, Edward K. Ream wrote:

> Elegant.  Thanks for sharing this with us.

Rev cb630a3 in devel adds the show-clones command.  The definition is in 
leo/commands/editCommands.py

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/b77845f4-9f23-4e4e-92dc-546426d89941%40googlegroups.com.


Re: @button for displaying all parents of a clone to log pane

2019-10-07 Thread Edward K. Ream
On Sun, Oct 6, 2019 at 9:15 PM Brian Theado  wrote:

the [goto-next-clone] command...feels uncomfortable and slow to me.
>
...

> this small script button [displays] links to all the clones of the
> current selected position. The headline of the parent and the clone is
> displayed:
>
> @button show clones
> for clone in c.vnode2allPositions(p.v):
> parent = clone.parent()
> if parent:
> g.es_clickable_link(c, clone, 1,
>
>f"{parent.h} -> {clone.h}\n")
>
>
Elegant.  Thanks for sharing this with us.

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/CAMF8tS1fhJ7MPD%2B5oGz2MdxYNAqNxFimvGw9xufc-Dr9jhSxcQ%40mail.gmail.com.