> > For sharing Leo outlines, I suggest using three commands > set-reference-file, update-ref-file and read-ref-file. >
Very interesting! I guess I wasn't paying attention when it came up before. In the docs there's a bit in the FAQ about this feature (https://leoeditor.com/FAQ.html#how-can-i-customize-settings-for-a-particular-external-file), but it's missing a script. Is this next bit the same thing? Quite often, I used to forget to invoke 'update-ref-file' before 'git > commit'. So, I always add one button node with the headline '@button n-save > @key=Ctrl-s', and in the body I put at least the following code: > > > c.save() > # the following is only to remove unknownAttributes which can be > # automatically regenerated so that they don't polute shared file > for v in c.fileCommands.gnxDict.values(): > if not hasattr(v, 'unknownAttributes'): continue > if tuple(v.u.keys()) in ((), ('icons',)): > del v.unknownAttributes > # now we can save the public part of this outline to the shared Leo file > c.fileCommands.save_ref() > c.frame.tree.declutter_update = True # signal to regenerate icons on the > next redraw > > > After reloading Leo, whenever I press Ctrl-s to save the outline, shared > outline is also saved. > -matt -- 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/801ec3ab-e91c-42f5-95c5-532c3e599ae8%40googlegroups.com.