Re: Contract Node and Descendants

2020-08-24 Thread perceptiblelogic
Success!  :-)


On Mon, 2020-08-24 at 17:45 -0500, Edward K. Ream wrote:
> 
> 
> 
> On Mon, Aug 24, 2020 at 5:41 PM  wrote:
> > I did actually see that under the tree options in leoSettings but
> > it appears to be set to true by default,
> > might there be something else that could be unsetting it? 
> > 
> > How might I go about checking its currently assigned value?
> 
> show-settings.  In any case, see my second reply.
> 
> Edward
> 
> 
> 
> -- 
> 
> You received this message because you are subscribed to a topic in
> the Google Groups "leo-editor" group.
> 
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/leo-editor/3w_vfg39w8Q/unsubscribe.
> 
> To unsubscribe from this group and all its topics, 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/CAMF8tS3Q-CnR1H2JkZUR4Z7xGNa3eCG3w-3ekUQVxjE%2BsXSyuA%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/d7956d99975a2d036e7087e6c4d8b64f5a2ac89f.camel%40gmail.com.


Re: Contract Node and Descendants

2020-08-24 Thread Edward K. Ream
On Mon, Aug 24, 2020 at 5:41 PM  wrote:

> I did actually see that under the tree options in leoSettings but it
> appears to be set to true by default,
> might there be something else that could be unsetting it?
>
> How might I go about checking its currently assigned value?
>

show-settings.  In any case, see my second reply.

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/CAMF8tS3Q-CnR1H2JkZUR4Z7xGNa3eCG3w-3ekUQVxjE%2BsXSyuA%40mail.gmail.com.


Re: Contract Node and Descendants

2020-08-24 Thread Edward K. Ream
On Mon, Aug 24, 2020 at 4:18 PM  wrote:

>
> I can't seem to find anything on how @command (within settings/commands)
> should work though.
>

The body text of any @command node can contain any Leonine script.

It could be a series of calls to k.simulateCommand. Here is tested code:

@command contract-and-go-left

c.k.simulateCommand('collapse-all-subheads')
c.k.simulateCommand('contract-or-go-left')

If this isn't exactly what you want, you can use *any* of Leo's code. For
example, you could copy, paste and modify the code in
c_oc.contractNodeOrGoToParent.

Remember that c, g, and p are defined in @command nodes.

HTH.

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/CAMF8tS1zSu5Nr-wnqexa_TqC-3uEKkyJpYUuPhFv-ZbUqsZ2Yg%40mail.gmail.com.


Re: Contract Node and Descendants

2020-08-24 Thread perceptiblelogic
I did actually see that under the tree options in leoSettings but it
appears to be set to true by default,might there be something else that
could be unsetting it? 
How might I go about checking its currently assigned value?


On Mon, 2020-08-24 at 17:34 -0500, Edward K. Ream wrote:
> 
> On Mon, Aug 24, 2020 at 4:18 PM  wrote:
> > So, what i'd ultimately like is for the left arrow key to first
> > 'collapse-all-subheads' and then 'contract-or-go-left', maybe
> > called 'collapse-or-go-left'.
> 
> This is almost what the default action of @bool collapse-on-lt-arrow
> is.
> 
> Edward
> 
> 
> 
> -- 
> 
> You received this message because you are subscribed to a topic in
> the Google Groups "leo-editor" group.
> 
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/leo-editor/3w_vfg39w8Q/unsubscribe.
> 
> To unsubscribe from this group and all its topics, 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/CAMF8tS0NqtS%3Dov9YVJV_p8h42wJCagMfjVhT9aDvXHJwXQMg9w%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/ee976f2bce20f89c8d2d08d13f369c53b4c5cfd3.camel%40gmail.com.


Re: Contract Node and Descendants

2020-08-24 Thread Edward K. Ream
On Mon, Aug 24, 2020 at 4:18 PM  wrote:

> So, what i'd ultimately like is for the left arrow key to first
> 'collapse-all-subheads' and then 'contract-or-go-left', maybe called
> 'collapse-or-go-left'.
>

This is almost what the default action of @bool collapse-on-lt-arrow 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/CAMF8tS0NqtS%3Dov9YVJV_p8h42wJCagMfjVhT9aDvXHJwXQMg9w%40mail.gmail.com.


Re: Contract Node and Descendants

2020-08-24 Thread perceptiblelogic
So, what i'd ultimately like is for the left arrow key to first
'collapse-all-subheads' and then 'contract-or-go-left', maybe called
'collapse-or-go-left'.I'm quite sure that I could accomplish this by
creating a custom command in my myLeoSettings file and then binding
that to hotkey.I can't seem to find anything on how @command (within
settings/commands) should work though.I do see the 'prompting for
command arguments' in the cheatsheet, but I'm not quite sure how that
relates.
If someone could maybe help point me in the right direction for this
I'd appreciate it :-)



On Mon, 2020-08-24 at 15:44 -0500, Edward K. Ream wrote:
> 
> On Mon, Aug 24, 2020 at 2:19 PM  wrote:
> > Wow, that was fast - thank you so much!
> 
> You're welcome.
> 
> Edward
> 
> 
> 
> -- 
> 
> You received this message because you are subscribed to a topic in
> the Google Groups "leo-editor" group.
> 
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/leo-editor/3w_vfg39w8Q/unsubscribe.
> 
> To unsubscribe from this group and all its topics, 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/CAMF8tS1A5mgoz8T2mSZRNXebkNY0BDBd09Fuo-COn4Hs16qbSQ%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/b64cf13fa665cfee713dd0072a4ab60768cba328.camel%40gmail.com.


Re: leo\doc\LeoDocs.leo.orig

2020-08-24 Thread Edward K. Ream
On Mon, Aug 24, 2020 at 3:44 PM George Zipperlen 
wrote:

PR #1630 deletes this
>> file. Edward
>>
>
> Gitignore is your friend.
>

Right. That's why I said that I would delete or ignore the file. In this
case, deleting was better, imo, because the file was added by mistake.

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/CAMF8tS0YXt2VEnqMuU%3DiffJz5Sj%3DAV2U8jBm4HQ2dWR9kDgfCw%40mail.gmail.com.


Re: leo\doc\LeoDocs.leo.orig

2020-08-24 Thread George Zipperlen


On Monday, 24 August 2020 10:27:58 UTC-4, Edward K. Ream wrote:
>
>
>
> On Sunday, August 23, 2020 at 7:37:26 AM UTC-5, Thomas Passin wrote:
>>
>>
>> So I don't know if it came from me, or if I got it via an update from 
>> Leo-editor.  But it can be deleted.  It's just like a .bak file created by 
>> some other program that someone used on the file.
>>
>
> PR #1630 deletes this 
> file. Edward
>

Gitignore is your friend

https://git-scm.com/docs/gitignore

-- 
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/b6aa8e06-022a-4ede-8629-3a4159137a3fo%40googlegroups.com.


Re: Contract Node and Descendants

2020-08-24 Thread Edward K. Ream
On Mon, Aug 24, 2020 at 2:19 PM  wrote:

> Wow, that was fast - thank you so much!
>

You're welcome.

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


Re: Contract Node and Descendants

2020-08-24 Thread perceptiblelogic
Wow, that was fast - thank you so much!

On Mon, 2020-08-24 at 11:32 -0700, Edward K. Ream wrote:
> On Monday, August 24, 2020 at 1:07:10 PM UTC-5, Edward K. Ream wrote:
> 
> > Leo does have an expand-all-subheads command. It should have the
> > corresponding contract-all-subheads command. I've just created
> > #1632 for this.  Expect it later today.
> 
> Done at rev 52610e6f in devel.  There are some minor issues.  See PR
> 1632 for details.
> 
> Edward
> 
> 
> 
> -- 
> 
> You received this message because you are subscribed to a topic in
> the Google Groups "leo-editor" group.
> 
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/leo-editor/3w_vfg39w8Q/unsubscribe.
> 
> To unsubscribe from this group and all its topics, 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/497d6f6a-f233-4f78-9dd5-265966e74f85o%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/a1cbb0d29f5387e150b954b377641c0fe4a75556.camel%40gmail.com.


Re: Contract Node and Descendants

2020-08-24 Thread Edward K. Ream
On Monday, August 24, 2020 at 1:07:10 PM UTC-5, Edward K. Ream wrote:

Leo does have an expand-all-subheads command. It should have the 
> corresponding contract-all-subheads command. I've just created #1632 
>  for this.  Expect 
> it later today.
>

Done at rev 52610e6f in devel.  There are some minor issues.  See PR 1632 
 for details.

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/497d6f6a-f233-4f78-9dd5-265966e74f85o%40googlegroups.com.


Re: Contract Node and Descendants

2020-08-24 Thread Edward K. Ream
On Mon, Aug 24, 2020 at 10:40 AM k-hen  wrote:

> Is there an option or function for Leo to contract all descendants of the
> selected node?
>

No there isn't, as you can see with contract.

Leo does have an expand-all-subheads command. It should have the
corresponding contract-all-subheads command. I've just created #1632
 for this.  Expect it
later today.

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


Re: Contract Node and Descendants

2020-08-24 Thread Thomas Passin
So you want "contract this node and all subtrees"?

On Monday, August 24, 2020 at 12:47:48 PM UTC-4, k-hen wrote:
>
> That doesn't seem to be exactly what I'm looking for, when you expand it 
> again, its children are still expanded :-/
>
>
> On Monday, August 24, 2020 at 11:57:18 AM UTC-4 tbp1...@gmail.com wrote:
>
>> Outline/"Expand/Contract"/"Contract Node".
>>
>>
>> On Monday, August 24, 2020 at 11:40:14 AM UTC-4, k-hen wrote:
>>>
>>> Is there an option or function for Leo to contract all descendants of 
>>> the selected node?
>>>
>>> e.g. if use this option on B, then D would collapse as well, but not G. 
>>> Collapse other nodes isn't quite what I want since that would do 
>>> everything.
>>>
>>> A
>>> .. B
>>>  C
>>>  D
>>> .. E
>>> .. F
>>> .. G
>>>  H
>>>
>>> Thanks,
>>> Kevin
>>>
>>>
>>>
>>>

-- 
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/066fe052-47f1-4085-94a1-904b8c64247co%40googlegroups.com.


Re: Contract Node and Descendants

2020-08-24 Thread k-hen
That doesn't seem to be exactly what I'm looking for, when you expand it 
again, its children are still expanded :-/


On Monday, August 24, 2020 at 11:57:18 AM UTC-4 tbp1...@gmail.com wrote:

> Outline/"Expand/Contract"/"Contract Node".
>
>
> On Monday, August 24, 2020 at 11:40:14 AM UTC-4, k-hen wrote:
>>
>> Is there an option or function for Leo to contract all descendants of the 
>> selected node?
>>
>> e.g. if use this option on B, then D would collapse as well, but not G. 
>> Collapse other nodes isn't quite what I want since that would do 
>> everything.
>>
>> A
>> .. B
>>  C
>>  D
>> .. E
>> .. F
>> .. G
>>  H
>>
>> Thanks,
>> Kevin
>>
>>
>>
>>

-- 
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/ebe547e7-e54b-476e-950d-e736c3f6046cn%40googlegroups.com.


Re: Leo Write-Only Mode

2020-08-24 Thread k-hen
Right, good point!, thanks Tom :-) 

On Monday, August 24, 2020 at 11:55:12 AM UTC-4 tbp1...@gmail.com wrote:

> Don't forget, viewrendered3 already uses @rst, @md, and @asciidoc.  Please 
> don't make these mean something else.
>
>
> On Monday, August 24, 2020 at 10:36:54 AM UTC-4, vitalije wrote:
>>
>>
>>
>> On Monday, August 24, 2020 at 3:15:50 PM UTC+2, k-hen wrote:
>>>
>>>
>>> Pardon the beginner question, but are you defining @coffee, @pug, etc 
>>> yourself? 
>>> Why not @md then instead of md: on the headline?
>>> Either's fine of course, just trying to understand the differences and 
>>> the best practices.
>>>
>>>  
>> Yes I am. Why not @md? There is no particular reason at all. A monkey 
>> sign is usually signaling some special meaning in Leo outlines, but it is 
>> just a convention. If you write your own script you can choose whatever 
>> scheme you like. I guess it would be better if instead plain `md:` I used 
>> `@md`, but either one has just a simple purpose to mark somehow nodes that 
>> I want to be processed.
>>
>> Vitalije
>>
>

-- 
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/1521883b-722d-480b-9f5d-e84a8dff8073n%40googlegroups.com.


Re: Contract Node and Descendants

2020-08-24 Thread Thomas Passin
Outline/"Expand/Contract"/"Contract Node".

On Monday, August 24, 2020 at 11:40:14 AM UTC-4, k-hen wrote:
>
> Is there an option or function for Leo to contract all descendants of the 
> selected node?
>
> e.g. if use this option on B, then D would collapse as well, but not G. 
> Collapse other nodes isn't quite what I want since that would do 
> everything.
>
> A
> .. B
>  C
>  D
> .. E
> .. F
> .. G
>  H
>
> Thanks,
> Kevin
>
>
>
>

-- 
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/524792bf-c32c-4451-89a8-aa9a3955b25ao%40googlegroups.com.


Re: Leo Write-Only Mode

2020-08-24 Thread Thomas Passin
Don't forget, viewrendered3 already uses @rst, @md, and @asciidoc.  Please 
don't make these mean something else.

On Monday, August 24, 2020 at 10:36:54 AM UTC-4, vitalije wrote:
>
>
>
> On Monday, August 24, 2020 at 3:15:50 PM UTC+2, k-hen wrote:
>>
>>
>> Pardon the beginner question, but are you defining @coffee, @pug, etc 
>> yourself? 
>> Why not @md then instead of md: on the headline?
>> Either's fine of course, just trying to understand the differences and 
>> the best practices.
>>
>>  
> Yes I am. Why not @md? There is no particular reason at all. A monkey sign 
> is usually signaling some special meaning in Leo outlines, but it is just a 
> convention. If you write your own script you can choose whatever scheme you 
> like. I guess it would be better if instead plain `md:` I used `@md`, but 
> either one has just a simple purpose to mark somehow nodes that I want to 
> be processed.
>
> Vitalije
>

-- 
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/0b7017aa-af36-47d5-bce4-9bb8e72b2c50o%40googlegroups.com.


Contract Node and Descendants

2020-08-24 Thread k-hen
Is there an option or function for Leo to contract all descendants of the 
selected node?

e.g. if use this option on B, then D would collapse as well, but not G. 
Collapse other nodes isn't quite what I want since that would do everything.

A
.. B
 C
 D
.. E
.. F
.. G
 H

Thanks,
Kevin



-- 
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/bca522cb-7c4f-4caa-98f9-60c5e62538d6n%40googlegroups.com.


Re: Leo Write-Only Mode

2020-08-24 Thread k-hen
Ok, makes sense, thanks.

On Monday, August 24, 2020 at 10:36:54 AM UTC-4 vitalije wrote:

>
>
> On Monday, August 24, 2020 at 3:15:50 PM UTC+2, k-hen wrote:
>>
>>
>> Pardon the beginner question, but are you defining @coffee, @pug, etc 
>> yourself? 
>> Why not @md then instead of md: on the headline?
>> Either's fine of course, just trying to understand the differences and 
>> the best practices.
>>
>>  
> Yes I am. Why not @md? There is no particular reason at all. A monkey sign 
> is usually signaling some special meaning in Leo outlines, but it is just a 
> convention. If you write your own script you can choose whatever scheme you 
> like. I guess it would be better if instead plain `md:` I used `@md`, but 
> either one has just a simple purpose to mark somehow nodes that I want to 
> be processed.
>
> Vitalije
>

-- 
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/1577db46-5564-44e8-b8e6-3d9eec7b1759n%40googlegroups.com.


Re: Nodes arbitrairily contract when inserting near the root node

2020-08-24 Thread Edward K. Ream
On Sunday, August 16, 2020 at 11:46:39 PM UTC-5, vitalije wrote:

> ...the behavior  that you see is just a consequence of the position 
instability. When you insert a node in to the tree (or delete one), 
positions of all following siblings and their subtrees become invalid. Leo 
decides which nodes should be expanded by keeping track of the expanded 
positions. When those positions become invalid the information is lost. 
There is nothing you can do about it at the moment.

Imo, Leo can and do something about this. I have just created #1631 
 for this general 
topic.

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/1a0e35ec-5344-4984-9fe3-d8ee72aa08a7o%40googlegroups.com.


Re: Leo Write-Only Mode

2020-08-24 Thread vitalije


On Monday, August 24, 2020 at 3:15:50 PM UTC+2, k-hen wrote:
>
>
> Pardon the beginner question, but are you defining @coffee, @pug, etc 
> yourself? 
> Why not @md then instead of md: on the headline?
> Either's fine of course, just trying to understand the differences and the 
> best practices.
>
>  
Yes I am. Why not @md? There is no particular reason at all. A monkey sign 
is usually signaling some special meaning in Leo outlines, but it is just a 
convention. If you write your script you can choose whatever scheme you 
like. I guess it would be better if instead plain `md:` I used `@md`, but 
either one has just a simple purpose to mark somehow nodes that I want to 
be processed.

Vitalije

-- 
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/ee357eb1-0623-441c-a121-d10b9147a748o%40googlegroups.com.


Re: leo\doc\LeoDocs.leo.orig

2020-08-24 Thread Edward K. Ream


On Sunday, August 23, 2020 at 7:37:26 AM UTC-5, Thomas Passin wrote:
>
>
> So I don't know if it came from me, or if I got it via an update from 
> Leo-editor.  But it can be deleted.  It's just like a .bak file created by 
> some other program that someone used on the file.
>

PR #1630 deletes this 
file. 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/9a9463d0-5a84-422f-b228-57a8da36b79eo%40googlegroups.com.


Re: Leo Write-Only Mode

2020-08-24 Thread Edward K. Ream
On Mon, Aug 24, 2020 at 7:51 AM k-hen  wrote:

>
> Re: the 'multiple update problem', I was thinking this would have to do
> with multiple read/write nodes which is why i was trying to build a stream
> with 1 reader and multiple writers.
> Is there something else here to be aware of?
>

No.

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/CAMF8tS2bOSYaGpG8tcrKMZsVkBbPSXfh%3DbqOu%2BUKxXtD74Pktw%40mail.gmail.com.


Re: Leo Write-Only Mode

2020-08-24 Thread k-hen
Thanks Vitalije, I'll have a look at that - thanks!

Pardon the beginner question, but are you defining @coffee, @pug, etc 
yourself? 
Why not @md then instead of md: on the headline?
Either's fine of course, just trying to understand the differences and the 
best practices.

I'm trying to use asciidoc over markdown because it seems to be a middle 
ground between rst (too complex) & md (too simple). 
Mainly because it has *comments*,  *includes*,  simpler tables, and broader 
language support beyond Python.
It's extremely similar to markdown and even the markdown headers work (#) 
so hopefully they'll eventually become more or less compatible someday.
Markdown is of course much more common though and its editor support and 
ecosystem is quite nice these days.


Kevin



On Friday, August 21, 2020 at 1:42:53 PM UTC-4 vitalije wrote:

>
>
> On Friday, August 21, 2020 at 4:08:35 PM UTC+2, k-hen wrote:
>>
>> Thank you for the import script and the responses.
>>
>> I feel like maybe I'm missing something with @nosent though, why is it 
>> much harder to use? 
>>
>> Let's say I have a directory of files that are each templated, i.e. 
>> possibly having a header and footer. 
>> These files are checked into git and synchronized using @auto nodes and 
>> can both be edited and read _into_ Leo when changes occur, e.g. after git 
>> pulling.
>> Then I can clone the body (inner section) of these nodes and write them 
>> out somewhere else using an @nosent file.
>> Never would I want a change to this output file to be read back _into_ 
>> Leo.
>> This file is local only and would not be checked into git, it could be 
>> deleted and would always be overwritten.
>> As you know, Git prefers small files rather than large ones and this one 
>> could be quite massive and treated as a 'large file' and therefore lose 
>> certain functionality. 
>>
>> Sure a script could do this too, but it's a poor man's version of using 
>> includes. 
>>
>>
>>
>
> You can try md_docer plug-in or write your own scripts using the code from 
> md_docer as an inspiration.
>
> In almost all my Leo documents now, the first thing I do is to add a node 
> with the headline '@button nsave @key=Ctrl-s'. So, whenever I press Ctrl-s 
> to save my Leo document, script in this node is executed. There is alwayas 
> a 'c.save()' line in this script, so that the document is saved, but then 
> my script writes all nodes that need to be written in some special way. For 
> example, nodes whose headline starts with '@coffee ...', are compiled with 
> the coffee compiler, '@pug' nodes are compiled with the pug compiler, @css 
> nodes are compiled with sass compiler, ... The limit is just your 
> imagination. You can easily write your nodes without sentinels and Leo 
> won't try to read file and synchronize Leo. Actually I don't have coffee, 
> scss, pug and other types of files that are considered to be source files. 
> I have just compiled versions written as a real files.
>
> HTH Vitalije
>

-- 
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/07169d79-7cbb-4c8e-b260-a4a89cbc79a2n%40googlegroups.com.


Re: Leo Write-Only Mode

2020-08-24 Thread k-hen
Ok, thanks. So 1: there doesn't seem to be an inherent issue with @nosent, 
it's just that doing so in conjunction with cloned nodes from @auto could 
be unstable.
Re: the 'multiple update problem', I was thinking this would have to do 
with multiple read/write nodes which is why i was trying to build a stream 
with 1 reader and multiple writers.
Is there something else here to be aware of? 

I can/will look into scripting though but that seems to really up the level 
of difficulty, not so much for my benefit, but for others I might want to 
share this with. 



On Friday, August 21, 2020 at 1:00:03 PM UTC-4 Edward K. Ream wrote:

> On Fri, Aug 21, 2020 at 9:08 AM k-hen  wrote:
>
> I feel like maybe I'm missing something with @nosent though, why is it 
>> much harder to use?
>>
>
> Clones are fragile in @auto trees, even when @persistence is enabled.
>
> Also, so-called cross-file clones can be problematic, due to a fairly 
> nasty version of the multiple update problem.
>
> It sounds to me like a script-based solution might be best. You could, 
> say, populate some specially marked nodes (of your own choosing) with 
> content. Examples might be @header and @footer. 
>
> 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/eff1651d-83cd-4318-b810-4efc706d07f2n%40googlegroups.com.