On Saturday, January 14, 2012 5:27:36 AM UTC+7, Matt Wilkie wrote:
>
> > P.S.  In your particular situation, I would suggest, if at all possible, 
> that you make complete external files, rather than clones, to be the "units 
> of sharing".  That way there is only one copy of the data, so if you change 
> that data outside of Leo all clones of (parts of) that data will be in 
> synch the next time you open Leo.
>
> Oh.
>
> I thought one of the major reasons for clones was to be able to
> "boiler plate" common content across many files. Examples might
> include copyright notices, written by _____, code functions that get
> re-used a lot and so on.
>
> Is this an incorrect, or at least inadvisable, use of clones?
>

I honestly think the lack of a clear statement on this topic in the docs is 
dangerous for relative newcomers to Leo and threatens its acceptance as a 
data-safe working environment.

I would **really** like for us to work together here to create a starting 
point for documenting this issue, so I've compiled a summary from my past 
notes as a general starting point

Note that all the below statements are based on my limited knowledge and my 
reading of some rather old threads, those with more knowledge **please** do 
correct any inaccuracies. Note also these statements should be taken to 
apply to recent versions of Leo only, and I've ordered them by 
simplicity/safety/my certainty:

--------------------

It's safe to allow clones to appear in multiple @ <file> branches as long 
as you make sure that one of the following is true

  - you are doing all your editing within Leo

  - you make sure that any given clone only appears in one @ <file> that 
imports (reads) changes made outside Leo
    - note my SOP to ensure this is to 
      - use a designated "master" @thin or @shadow file to bring in any 
external changes
      - all the other clone instances are @nosent or @asis, therefore 
export only (and treated as read-only outside Leo)

  - you take into account the relative priority guidelines outlined by Ed

    - @all vs (sections+@others)
      - have the (only one) "master location" use sections+@others, the 
other instances must use @all

    - position in the outline
      - last @ <file> read (= lower in the outline) wins - you will get 
"Recovered nodes" showing the conflict/differences
      - in-Leo-only clones (not included in an @ <file> ) will always lose 
to imported changes


--------------------

I'm pretty sure there isn't a safe way to clone the @ <file> node itself to 
different paths

Including a given clone multiple times within a single @ <file> tree is 
fine, but it only actually gets written more than once when using 
<<sections>>, not via multiple @others.


--------------------

References:
https://groups.google.com/d/msg/leo-editor/j7BOnRqCFcI/tyE_SvNwfHMJ
https://groups.google.com/forum/#!topic/leo-editor/Z6KJhGFtCck/discussion

Pretty old, not sure how much still applies probably best to *not* revive 
these zombies but continue the discussion here, using the above summary as 
a starting point:
https://groups.google.com/forum/#!topic/leo-editor/-DFuSJwHP2E/discussion
https://groups.google.com/d/msg/leo-editor/wulhmob-Ne4/k_lyAWIQPLQJ

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/leo-editor/-/dx5rsOwQ1L8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to