Persistent ID for @auto nodes

2018-09-17 Thread Kent Tenney
Howdy,

p.gnx doesn't work, a new one is generated each time the
Leo file is loaded. It looks like a way around this would be
switching to at_clean, but I'd like to stick to at_auto if possible.

One approach would be to check for p.anyAtFileNodeName, and
if it's not none, parse parents until the file name is reached,
reconstructing fname.class.method. Presumable UNL could
also be parsed to extract such an ID.

Either of these seem tedious and fragile. When Leo imports the
file it parses the source in order to generate the required nodes,
is the result of this parsing persisted anywhere? If not, would it
be possible to make it an attribute of p?

Thanks,
Kent

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


Re: Leo options if file on disk gets updated?

2018-09-17 Thread jkn


On Monday, September 17, 2018 at 11:16:48 AM UTC+1, vitalije wrote:
>
> There has been some discussion about the formulation of this prompt 
> before. I am not 100% sure what was the final result of this discussion, 
> but when Leo asks you if you want it to overwrite some file because it was 
> changed on the disk, it means overwrite the version inside Leo with the 
> content from the disk. What really happens is that Leo reads changed file 
> from the disk and updates its own nodes to match content from the disk. 
> Perhaps a better formulation can be made by avoiding 'write' and using 
> 'read' instead.
>
> File <.> has been changed outside Leo. 
> Would you like me to read the new version of it?
> (Yes, No, Yes to all, No to all)
>
> I think using the word `overwrite` in this kind of situation causes 
> confusion and a bit of panic.
>
> Vitalije
>

Hi Vitalije
Yes it may be (just) that the prompts are confusing ... this started 
when I got a dialog box that ended 'Overwrite it?' [Y, N] and I wasn't very 
confident about what 'it' referred to.

I thought I'd leave the topic quite wide, see what other people know/think!

Thanks
Jon


> On Monday, September 17, 2018 at 11:41:04 AM UTC+2, jkn wrote:
>>
>> Hi all
>> I'm trying to understand whether Leo has the ability to reload a file 
>> that has been changed from under its feet, as it were.
>>
>> Background: I run Owncloud on some of my PCs, where a change to one file 
>> gets propagated to the others. This might include some .leo files.
>>
>> If I am working on a file and it gets changed via owncloud, I would like 
>> the new file to be loaded by Leo - either automatically, or perhaps with a 
>> prompt. This 'auto-reload' is how my other editor works, and it works well 
>> for me like this.
>>
>> From the prompts I get, and a little investigation (LeoExternalFiles.py) 
>> it seems that Leo wants to work the other way round - it can tell that the 
>> file has changed, but asks me to to confirm an overwrite to the updated 
>> file on disk.
>>
>> This could also be a useful way of working, I appreciate; but is there a 
>> way of having the new file on disk take precedence?
>>
>> Thanks
>> Jon N
>>
>

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


Re: Leo options if file on disk gets updated?

2018-09-17 Thread vitalije
There has been some discussion about the formulation of this prompt before. 
I am not 100% sure what was the final result of this discussion, but when 
Leo asks you if you want it to overwrite some file because it was changed 
on the disk, it means overwrite the version inside Leo with the content 
from the disk. What really happens is that Leo reads changed file from the 
disk and updates its own nodes to match content from the disk. Perhaps a 
better formulation can be made by avoiding 'write' and using 'read' instead.

File <.> has been changed outside Leo. 
Would you like me to read the new version of it?
(Yes, No, Yes to all, No to all)

I think using the word `overwrite` in this kind of situation causes 
confusion and a bit of panic.

Vitalije

On Monday, September 17, 2018 at 11:41:04 AM UTC+2, jkn wrote:
>
> Hi all
> I'm trying to understand whether Leo has the ability to reload a file 
> that has been changed from under its feet, as it were.
>
> Background: I run Owncloud on some of my PCs, where a change to one file 
> gets propagated to the others. This might include some .leo files.
>
> If I am working on a file and it gets changed via owncloud, I would like 
> the new file to be loaded by Leo - either automatically, or perhaps with a 
> prompt. This 'auto-reload' is how my other editor works, and it works well 
> for me like this.
>
> From the prompts I get, and a little investigation (LeoExternalFiles.py) 
> it seems that Leo wants to work the other way round - it can tell that the 
> file has changed, but asks me to to confirm an overwrite to the updated 
> file on disk.
>
> This could also be a useful way of working, I appreciate; but is there a 
> way of having the new file on disk take precedence?
>
> Thanks
> Jon N
>

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


Leo options if file on disk gets updated?

2018-09-17 Thread jkn
Hi all
I'm trying to understand whether Leo has the ability to reload a file 
that has been changed from under its feet, as it were.

Background: I run Owncloud on some of my PCs, where a change to one file 
gets propagated to the others. This might include some .leo files.

If I am working on a file and it gets changed via owncloud, I would like 
the new file to be loaded by Leo - either automatically, or perhaps with a 
prompt. This 'auto-reload' is how my other editor works, and it works well 
for me like this.

>From the prompts I get, and a little investigation (LeoExternalFiles.py) it 
seems that Leo wants to work the other way round - it can tell that the 
file has changed, but asks me to to confirm an overwrite to the updated 
file on disk.

This could also be a useful way of working, I appreciate; but is there a 
way of having the new file on disk take precedence?

Thanks
Jon N

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