On Sun, Jun 26, 2016 at 6:44 PM, 'Terry Brown' via leo-editor < [email protected]> wrote:
> On Sun, 26 Jun 2016 03:14:26 -0700 (PDT) > Mike Hodson <[email protected]> wrote: > > > I would like to be able to copy a single .leo file somewhere, and > > then have any related 'real files' (for lack of better term) be > > re-created out of content already contained within the .leo file be > > re-created upon import or something of this nature. > The official terminology for what you are calling "real" files is "external" files. Thanks, Terry, for you reply. I agree that @clean or @nosent will work. You're work flow is perhaps not one that has been thought about, but I > think it's possible. > > You can't use @file, @edit, or @auto as your external file type, > because they store no info. in the Leo file. But there are other > external file types you can use: > > @clean will notice and incorporate changes in the local file made > externally to Leo, but if the change is that the external file has > disappeared, the version in the .leo file will be used(*). > Or there's @nosent, which is similar except it ignores changes in the > external file, and always uses the content in the .leo file. > > Either could work, but I would say that @clean works, for your work > flow, more by luck than design, whereas @nosent probably matches your > workflow better in its design intent. So if you don't need @clean's > ability to notice and incorporate external changes in the external > files, @nosent might be less likely to spring surprises. By external > changes I mostly mean changes while Leo is not running, i.e. changes > detected when Leo loads the .leo file, because I think Leo will alert > you to changes in a file in the outline made while Leo is running, > regardless of external file type. > > The (*) is that Leo won't write the changed files unless it thinks it > needs to, and it won't think it needs to if you don't edit each one in > the outline, or, seeing that would be a pain, run this three line > script: > No need to do a script. You can simply select a tree of @clean/@nosent nodes and do write-at-file-nodes (Shift-Ctrl-W) to force the writing/creation of external files. So if *all* your @clean (or @nosent) nodes are children of a single root node, you can simply select that node and do Shift-Ctrl-W. Alternatively, you can write a script that selects that root node and then does c.k.simulateCommand('write-at-file-nodes'). HTH. Please feel free to ask more questions. 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 [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.
