Hi Edward
On Sunday, September 30, 2018 at 11:33:55 AM UTC+1, Edward K. Ream wrote:
>
>
>
> On Mon, Sep 17, 2018 at 4:41 AM jkn <[email protected] <javascript:>>
> 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.
>>
>
> Leo certainly does have this capability, provided the file actually exists
> on disk. You can verify this as follows:
>
> 1. Open a .leo file containing an @file or @clean node referring to the
> file.
> 2. Change the file outside of Leo, then select Leo again.
>
> You should get a dialog asking whether you want to update the
> corresponding tree in Leo.
>
> We have recently been discussing whether the dialog is perfectly clear,
> but in most cases you will be aware of what you have just done.
>
> Edward
>
I think there are a few parts to this. I did these basic tests:
1) create a leo file mytest.leo. This contains an @file headline: '@file
myexternalfile.txt'
2) Separately
touch myexternalfile.txt
3) switch back to leo. I get a dialog box:
dialog title: "Overwrite the version in Leo?"
dialog text: <...>/myexternalfile.txt has changed outside Leo. Reload
@file mysexternalfile.txt in Leo
dialog buttons: No to all | No | Yes to All | Yes
Comment: I think this action is file. The dialog box title might be betterl
"Reload @file into Leo?", for instance
4) Separately,
touch mytest.leo
5) Change back to Leo.
nothing shown(!)
6) CTRL-S. I get a similar dialog to above:
dialog title: "Overwrite the version in Leo?"
dialog text: <...>/mytest.leo has changed outside Leo. Overwrite it?
dialog buttons: No | Yes
Comment:
a) it is at (5) that I would hope that I get an indication that my .leo
file has changed; I'd like to then get an 'offer' to either reload from
file, or to ignore the change (so that my next CTRL-S overwrites the file
on disk without any prompt)
b) it is not clear what the 'workflow' at (6) is. I think you have to
choose either:
no: in which case the CTRL-S action is cancelled. It is not clear from
what I see that this is the case; or
yes (updated file on disk is overwritten with current mytest.leo
content)
A third alternative is 'save as', to save under a different name, I
suppose.
c) I think that trying to make one dialog box serve for these two
scenarios, in LeoExternalFiles.py, has made the text for both of them a bit
opaque.
Happy to suggest some alternative wording but I thought I'd illustrate what
I am seeing first. I guess the main request is around the ability to
reload(refresh?) a *leo* file from disk, if it has been detected to have
changed.
HTH and Regards
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.