On Thu, 25 Jun 2015 07:23:42 -0700 (PDT) Todd Mars <[email protected]> wrote:
> Hi, Why is it needed to know that another copy of Leo is running? > Thanks! > (this kind of thing is fascinating!) Load outline a.leo in Leo instance A, modify, iconify, forget. Now load outline a.leo (again) in Leo instance B, modify, save, close. Later, de-iconify Leo instance A, save, close. You just overwrote the changes you made to the outline in the second loading in instance B. So it's not really a matter of knowing another instance of Leo is running, which is fine and so routine it doesn't require any warning, it's a matter of knowing another Leo has the same outline open already, and if so issuing a warning. This is achieved by recording which outlines are open in the global shared database, and warning when an already open one is loaded again. I usually experience the flip side of the issue, load some outlines, rudely hard-kill Leo accidentally (kill a VNC server, break an X11 connection, etc). That means Leo never gets a chance to update the global db to record that an outline is no longer open (as it would normally do when Leo exits), so it things it's open elsewhere when it's not. The spurious warning does no harm in those cases, the lack of a warning can cause real heartache, as described in first para. Cheers -Terry > On Monday, June 22, 2015 at 5:18:01 PM UTC-4, Edward K. Ream wrote: > > > > On Mon, Jun 22, 2015 at 1:37 PM, Todd Mars <[email protected] > > <javascript:> > > > wrote: > > > > The thing where it says it's already open when it's not, now I > > understand > >> it! Where is this global db file and why is it necessary? > > > > It's (usually?) in ~/.leo/db/global/open-leo-files This a binary > > file (pickleshare). > > > > It's necessary because there is no portable way to determine > > whether another copy of Leo is running. > > > > EKR -- 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 http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
