Rev 419a82d changes handling of orphan bits

32 views
Skip to first unread message

Edward K. Ream

unread,
Apr 17, 2015, 7:04:38 AM4/17/15
to leo-e...@googlegroups.com
Rev 419a82d changes several aspects of how Leo handles the so-called orphan bit in vnodes.  These are major changes, but I believe they will be for the best.

The orphan bit indicates that there was a problem writing an @<file> node.  It will be set, for example, when an @file node contains children but has no @others directive.  Leo simply cannot write the external file in that case.

However, Leo went overboard with the error logic. Here are the recent changes:

1. Leo no longer writes the orphan bit ('O' bit in vnode attr) in .leo files. This kind of persistent error bit seems unwise.

2. Leo clears the bit and issues a warning when reading a vnode with the 'O' attr.

Previously, Leo would refuse to update the outline from the external file if the orphan bit was set! This makes no sense because Leo never writes erroneous external files!  Why should Leo consider such files to be dangerous?

This change could have unforeseen consequences, but I suspect nobody will ever notice.  The foreseen consequence is that Leo will keep the outline and external files in synch more often.

Edward

Largo84

unread,
Apr 28, 2015, 10:39:38 AM4/28/15
to leo-e...@googlegroups.com
Just got several of these error messages:

orphan bit in @file blah.blah

Should I just ignore the error?
Rob............

Edward K. Ream

unread,
Apr 28, 2015, 11:12:24 AM4/28/15
to leo-editor
On Tue, Apr 28, 2015 at 9:39 AM, Largo84 <Lar...@gmail.com> wrote:
Just got several of these error messages:

orphan bit in @file blah.blah

Should I just ignore the error?

​I think so, assuming you are using a recent rev.

Edward

Largo84

unread,
Apr 28, 2015, 11:48:11 AM4/28/15
to leo-e...@googlegroups.com
Cool, thanks! Yes, I stay pretty current w/ GitHub.

Edward K. Ream

unread,
Apr 28, 2015, 4:31:36 PM4/28/15
to leo-editor

​There is no reason to have a warning for which the recommended action is to ignore it ;-).  Afaik, there is no scenario in which this warning would be helpful.  I've put it on the list to remove.

EKR
Reply all
Reply to author
Forward
0 new messages