Inspecting and Repairing Notefiles Xerox Corporation Randy Trigg [First written: 8/9/85 Randy Trigg] [Last updated: 7/16/86 Randy Trigg] [Stored: {qv}1.3k>doc>NoteFileInspector.ted] This document describes the Notefile inspector facility available via the Inspect&Repair option on the Notefile Ops menus in NoteCards Release1.3k. The old Repair Notefile facility rebuilt the links in a Notefile from the contents of card substances. This was used whenever a notefile was thought to have inconsistent links. The problem was that notefiles with inconsistent links often had other problems that caused Repair to break. Thus the motivation for developing the notefile inspector documented here was to verify a notefile's readability before invoking the link rebuilder. As it turns out, this inspector is useful generally for checking the health of a notefile, deleting cards and backing up other cards (or more precisely, card parts) to previous versions. Thus, you may want to use the inspector even if your notefile is healthy and doesn't need its links rebuilt. [Note that the inspector can also be entered from OpenNotefile if NoteCards finds work after the last checkpoint. See Section 4 below for details.] The notefile inspector has three separate phases: reading the notefile's data area searching for healthy card parts, allowing the user to make modifications, and rebuilding the links. The process can be aborted after phase 1 or 2 if desired. This document describes each of the three phases in turn and concludes with tips, strategies and pitfalls to watch for. Using the notefile inspector requires some knowledge of the innards of notefile organization. I STRONGLY recommend that you read the document entitled "An Introduction to Notefile Organization," before continuing. (This can be found in {qv}1.3k>doc>notefileconcepts.ted.) 1. Running the Notefile inspector: Phase 1: Scouring the data area To start the inspector on a notefile, first be sure that the notefile is not open. Then select the item Inspect&Repair from one of the NoteFile Ops menus (i.e. from the notefile icon, the main notecards icon or the notefile filebrowser). There is one option available at this level by "pulling to the side" called ReadSubstances. This ensures that substances of all cards pronounced valid by the inspector are readable. If this option is not invoked, then a check is still run on the length of the substance, but not on its contents. Unfortunately, the ReadSubstances option requires MUCH more work by phase 1. I recommend that you only use this option if Phase 3 (link rebuilding) breaks with some error like "Bad Piece Tbl" from TEdit. In that case, up-arrow out of the break and start the Inspect&Repair process over again, this time using the slower but more comprehensive ReadSubstances option. Selecting Inspect&Repair will invoke phase 1 of the inspector, wherein the data area of the notefile is scoured for valid card parts. A record of all such parts is kept and statistics printed out at the end. You'll be asked to position the window in which those statistics as well as later inspector communications will be printed. (Note that closing this window will abort the Inspect&Repair process if you confirm.) You can monitor the progress of phase 1 by watching the prompt window. It will be printing messages like "Processing byte xxxxx of yyyyy." When phase 1 has completed and you've positioned the interaction window, statistics on your notefile will be provided. You'll be told the total number of cards and the number of deleted ones. If all seems well with the world, the next line will read "All non-deleted cards look okay." If not, there will be various messages outlining the problems. (See Figure 1.) DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@OOO'<'>fyy'|$UUUUUUUUUUUUUUUpO>@'3>?>f?'|0O>O3?0?>f>'|09>Os?'?>f<'|9UUUUUUUUUUUUUUUp933g?>g9<9g8yUUUUUUUUUUUUUUUpOx8?>c>ϪO??UUUUUUUUUUUUUUUp?UUUUUUUUUUUUUUUpOL000L80@0L! 0@0@xxQ8qgG0@! QDȐ0L@! @9G0L@! @@0!! DȀ0 8uG0L0L000LDp A0LD`0Ë8,x 8s#ŝ€9Ë:80F$MD50 D$A&"BD$MFD0LD'|! G!D |B80LD$@! dD$! G @HB0D$HD! DA$#"@D$HFD04#8p :pЃP@8gè:80L0L000L"@0L!"@0@zxG8t0@# ĄȒ$D"0L@"O|0L@"H@0!" Ȓ$D"0xG8t`0L 0L@000L 0L 0x"8\YŅq.ty0"D2bj&d1H" 0L|"BBD9! 0L@"BBD! # 0D"bB$D!H"$08"\ADu!Pt0L@0L@000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000L0L000OO Figure 1: Snapshot of a sample interaction window Normally, the messages describing problems are of the form shown in Figure 1, namely a count of the number of cards broken in a given way. Some messages are a bit trickier. If you have fileboxes with bad substances (i.e. main card data), then you're told that if you don't wish to delete or back up such fileboxes to previous versions, then phase 3 will rebuild them. If, however, the filebox is one of the top level boxes (Contents, Orphans, ToBeFiled), then deletion is not an option. (See Section 3.) If there are cards having user-defined types whose type definition code has not been loaded, then you'll get a message to that effect, something like " cards have unknown card types (FOO BAR)." At this point you should load the lisp files containing the definitions of the unknown card types. If not, then these cards will show up with bad substance in phase 2. If you do load the appropriate files, then run Recheck Bad Cards to get the bad cards list recomputed before inspecting any cards. If you have a card for which no substance versions could be read, then you'll also get unknown card type messages for it (reading something like " cards have unknown card types (NIL)"). This is because the inspector couldn't find a card type on the notefile for that card. A menu of options appears attached to the upper right corner of the interaction window. (See Figure 2.) The particular options you get in that menu depend on the state of your notefile and are described below. The last three options appear in all cases. The other two may or may not be present in the menu you get. In any case, you should select one of the options before attempting any other NoteCards-related work. M""""""""""""""""" @0``0 0`` 0@Ϸ3 3@ lf666066f` lf6660 660f`llf667 73@llf666 66f@llf6660 666f`c3 3`@@``0@0 @0 `7υ|`ߘ66lllf3l@67 ll3`@63o``60l f3``66lllf3`@63Ïv`@ ` ` @@ ` `nj@ǏϾ@Člm`ll`ll@ll@lll`o`@@`` @` @` 0`g0?<`llllm0cf@ll ll0cp@o oϘ0Ϙc<`l ll m٘0٘c`llllll٘٘cf@gg`?<@``@@``0@0?<@66630cf `660cp`70Ϙc< @v630٘c@6663٘cf`?<`@@`"""""""""""""""" """""""""""""""" Figure 2: The Phase 1 options menu. Continue Repair: This option is only available if the notefile is in fairly good health (i.e. okay except for fileboxes to rebuild or global links to rebuild - see Section 3). Selecting it causes Inspect&Repair to move to phase 3 and rebuild your notefile's links. End Inspect&Repair: This option is only available if it seems that you don't need to continue to the link rebuilding phase. You will not get this option if you've deleted any cards, or generally if there are problems with the notefile. Choosing this option causes the Inspect&Repair process to end gracefully (via a normal checkpoint and close notefile), thus skipping phase 3 of rebuilding links. Abort: Choosing this option aborts the Inspect&Repair process entirely, throwing away any changes you might have made (such as card deletions or back ups.) It requires your confirmation in the prompt window. Recheck Bad Cards: Recompute the bad cards list by running the last part of phase 1 again. This is useful if you've loaded files containing definitions of previously undefined card types. Inspect Cards: This brings up a menu of titles of active cards with which you can inspect, delete, or back up particular cards. There is a "pull-across" menu item called Include Deleted Cards, which if selected will include card titles for deleted cards as well as active ones. Using this option, one can undelete deleted cards and restoring them to some previous version. 2. Running the Notefile inspector: Phase 2: Your chance to tinker After selecting Inspect Cards in the interaction window's attached menu, a menu containing numbered titles of notecards pops up and is attached to the interaction window's lower left corner. It contains the first 10 characters of titles for all active cards and possibly deleted cards as well if you selected the submenu item Include Deleted Cards described above. The menu can hold some 100 card titles. If your notefile has more than that, then the menu is composed of several pages each containing around 100 cards. Rapid switching between pages is possible. Figure 3 below shows a sample card inspector menu. Attached to the upper right corner of the cards inspector menu is a menu containing at least the three options: Abort, Done and Search. If the menu has multiple pages (there are more than 100 active cards in the notefile), then the attached menu will also include the items Next Page, Previous Page, and First Page. Selecting these causes the current menu to be exchanged for either the next menu, previous menu, or first menu, respectively. Clicking Abort causes the entire Inspect&Repair process to quit, throwing away any changes you've made. It requires your confirmation in the prompt window. (This is equivalent to choosing Abort from the inspector window as described in Section 1.) Choosing Done from this attached menu indicates that you're done tinkering with card parts and wish to return to the main interaction window. This causes the card inspector menu to close and the phase 1 process outlined in Section 1 to be performed again (leaving you looking at something like Figure 1). Note, however, that the scanning of the data area is not repeated (it takes way too long). Rather, your changes are made to the in-core index array and the statistics on bad cards are recomputed. This cycle of compute statistics (phase 1) followed by inspect and tinker (phase 2) can be repeated as often as desired. Eventually, you must either abort, end the Inspect&Repair via End Inspect&Repair, or continue to phase 3 via Continue Repair. Choosing Search from the attached menu allows you to find those cards having titles matching a given string. This works much like the Search card in Notecards. That is, you specify a string and the list of cards whose titles contain that string is printed out. This is handy, for example, if you want to undelete a card, but only know its title. Note that the search is case insensitive. 2.1 The card inspector menu In the card inspector menu, those titles corresponding to deleted cards have a line drawn through them. Those having some sort of problem appear shaded. In addition, an upper-case letter suffix is attached to such entries indicating the problem. For example, in the card inspector menu shown in Figure 3, the shaded menu item "10: BNF for Li|S" indicates that the card with title beginning "BNF for Li" has bad substance. The letter codes are S, L, P, and T indicating bad substance, links, property list, and title, respectively. If such a letter code appears in lower case, then the meaning is that the current version of that card part is beyond the last checkpoint pointer. (There may have been a crash, for example, thus preventing the notefile from closing normally.) Figures 3 and 4 show both pages of a two page card inspector including deleted cards. Sometimes deleted cards (e.g. "110: NIL|LSPT" in Figure 4) show up shaded with LSPT suffixes. This is because they were deleted before any data about the card was written to the notefile. Thus there are no valid card parts to back up to for those cards. But often, deleted cards can be backed up to previous versions. (See Figure 6 and discussion below.) HGDDDDDDDDDDDDDDDG0??00Gϟ0$G??<x$82pa?<x|0gr93qHـ0Fϟ~|O3>Gϙ<$Fϟ|O>O?$0ϟ|>O$?0?'ϟr|>O?0Ggr9g3q?|$Gq$0s0G$D~$c0 pp~0@ @a0D0 @A0@ @a?$Ds.y Ë AA Q\D.@a$ 1" &$LH1B~""QbH1"@a0 !!0$!GBA> >BP!>@a0D ! @$&H@BA  Bh! @a$D !" $$HHBA" "BD1"@c1$!#GqA~ BB@~100D$D$0xppH0D@@H1$D9DË8B8B8H1$ 2DD&$MD!BDqBD"H<>|08('8 rB|rB|>H160D ($$@B@B@ H0$D 2D&$HD@AFDHAFD"H10$q8hqÈ8A@:8q@:8H1300100D`|$D$Ȉ0p " 8G  80D 1 H 0` 1$D.zzyHyŬÞ<~~$1#P"ʊψ"I"B&$Hcc0x!""I"@@ I"`$"!cc0D!"")"@  )"$"&Hc|Ϙc$D!"""H  " $"$Hcmـcfcc$q!ꉈȈ" !"#~a~cc0@`a`>c0D@`aHÀ`fc`$D`axـ`fcc$``0Ϗ`;?>0` 0D10`01c$DÇ1q #1qY9/8q.>$b$HLɉ DLɉ"fLI"DDDĉ!1"0H  ȉ >DHI |q!!0DH H DHI d@ !! `$D$HH DH"DLI"DDD!!" `$Çp"#qDK:h#8q!| g0 ll`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$$$$$D  $@"DDDDDDDDDDDDDD2"DH$$dd$D"$dD  d$D"DDDDDDDDDDDDDp8p#ã#8päDq#8p" DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD Figure 3: A card inspector menu: Page 1. @GG ?? 0 Gϟg 0` G??<0` 82pa?<?> gr93q1` Fϟ~|O3>Gϙ<31` Fϟ|O>O??1` 0ϟ|>O$??31` ?'ϟr|>O?a` Ggr9g3q?a08 Gq  s G D  p @` D1  @g D$BGlͱ D$ $! B@`01 D@& $#"FH o01 Dgp:G l 1 B ll1 D<l1 D  q D1 D DD :x"#߀0 ;nݹw۳oomX0  C>B@GH D L BDH>a3όD  H"FHHca66`٘ N:pFߘc36673663D`660 Dc666`> 3ωp@H D1 @@ D$b9x\H D v@  BGHa D dBDHq0 D D BDHIq0 :gpB3Hy3| y03 Dm03 Dm0 g03 ! g03 D0b @0`c3 D$K<:YŘ,xKp ٛ3n{nv@ " BB@D  OD D" BBC$D  HD D" BFB$D  HD` !<:AD " Dp``0 B`0 D<`o| D~m03 `l803 ! @`l0 D0b  1@`l03 D$:px,@`l303  $MF bI!5@`l  BQ ! r@ D!HBQ I!!@ D"$HF! I!!@ #è:!p @!DDDDDDDDDDDDDDDDDDDDDDDDDD D0`1DDDDDDDDDDDDDDxxx<<DDDDDDDDDDDD޻{{"@BBD#BBDDDDDDDDDDDDD @BBDDDDDDDDDDDD Dxx<<DDDDDDDDDDDDDDDDDDDDDDDDDD #8 $D0`  ȈDDDDDDDDDDDDDDxx $@DDDDDDDDDDDD{nn= !  $#@D! ! ٨ȈDDDDDDDDDDDDD!# 1 $@DDDDDDDDDDDD!N ?'@ DDDDDDDDDDDDDDDDDDDDDDDDDD!ppD0b @DDDDDDDDDDDDD$yx D@D BBd$  D@DDDDDDDDDDDDD 2BbD$"DH@DDDDDDDDDDDD<\:p3@DDDDDDDDDDDDDDDDDDDDDDDDDD 0D1  "1DDDDDDDDDDDDD$#"xQ#DDDDDDDDDDDDb$$H"Q$LH#GHD  HDHDDDDDDDDDDDDD $HHHDDDDDDDDDDDDÇFDDDDDDDDDDDDDDDDDDDDDDDDDD`@0 D0`1 DDDDDDDDDDDDD 0xP8ÀDDDDDDDDDDDDD" & P"D&$@ @ ` |'D@  @$$DDDDDDDDDDDDD @"$ D"D$$@DDDDDDDDDDDD D D8#D DDDDDDDDDDDDDDDDDDDDDDDDDa0`"D0b @0`@DDDDDDDDDDDDD$@,xP\:8<DDDDDDDDDDDD~E3&$PbFD" @"$$ BB8 D @"$$BBB DDDDDDDDDDDDD" @E"&$ "BFD"DDDDDDDDDDDD!%"B:8DDDDDDDDDDDDDDDDDDDDDDDDDDaD0aDDDDDDDDDDDDDpDDDDDDDDDDDD$H D HDDDDDDDDDDDDD" HDDDDDDDDDDDD!ㆄp@DDDDDDDDDDDDDDDDDDDDDDDDDD Figure 4: A card inspector menu: Page 2. At the top of the first page of any notefile's card inspector, there are entries for the top level boxes and special cards. These are labeled "1: Contents", "2: Orphans", "3: To Be File", "4: Link Label", and "5: Registry". Note that if the inspector shows no entry in the card inspector menu for some card, it is because that card has been deleted. If you've asked to show deleted cards and it still doesn't appear, it's because the notefile has been compacted since that card was deleted. If you button card title entry in the card inspector menu, then a popup menu allows up to two choices Inspect and/or Delete. If the card is currently deleted (has a line drawn through it), then the Delete option is replaced by Undelete. Certain cards cannot be deleted and thus their popup menus only contain the Inspect option. These are the 5 special cards mentioned above. Choosing Delete or Undelete from this popup menu causes the card to be deleted or undeleted, respectively and the line through the menu item either drawn or undrawn. Note, however, that this action (and all others) can be undone by choosing ABORT from either the card inspector menu or the interaction window menu. Choosing Inspect from the popup menu for a card entry brings up a card parts inspector for that card. 2.2 The card parts inspector Figures 5 and 6 below show examples of card parts inspectors. A card parts inspector is composed of four attached menus arranged vertically and one attached operations menu atop the stack. cDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD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D 0"DDDDDĈ@D""(DDDDD@DB"(QD@< @"HQDD@ "|DDDDDD@D "DDDDDp@8Q@QDDDDDDDDDDQDq88QDĈ@D 0"DDDDDDĈ@D""DDDDD@DB"QD@< @"QDD@ "DDDDDD@D "DDDDDDp@88Q@QDDDDDDDDDDQDq8 8QDĈ@D 1 DDDDDDĈ@DDDDDDD@DbDQD@< $DQDD@ >DDDDDDD@D DDDDDDp@88Q@QDDDDDDDDDDQDq8 8QDĈ@D 1 DDDDDDĈ@DDDDDDD@DbDQD@< $DQDD@ >DDDDDDD@D DDDDDDp@88Q@QDDDDDDDDDDQDq88QDĈ@D 1"DDDDDDĈ@DDDDDDD@Db8QD@<  DQDD@ DDDDDDD@D  DDDDDDp@8>8Q@QDDDDDDDDDDQDq88QDĈ@D 1"DDDDDDĈ@DDDDDDD@Db8QD@<  DQDD@ DDDDDDD@D  DDDDDDp@8>8Q@QDDDDDDDDDDQDq88QDĈ@D 1"DDDDDDĈ@DDDDDDD@Db8QD@<  DQDD@ DDDDDDD@D  DDDDDDp@8>8Q@QDDDDDDDDDDQDq88QDĈ@D 1"DDDDDDĈ@DDDDDDD@Db8QD@<  DQDD@ DDDDDDD@D  DDDDDDp@8>8Q@QDDDDDDDDDD Q pÀ!xQD!$@b @"DDDDD'!.$x "DDDD !1ǀ# Q !!$@" "QD !!2$@" "DDDDD #!$@" "DDDD p!À!qQ QD DDDDDDDDD Q 0À!8pQD!0$@b D"DDDDD'P!.$$ DDDD P!1ǀ $ OOyODDDDDD>O`>O >O~g?OF>ONgps GDDDDDDGDDDDDDDÀ0DDDDDDE35Q1DDDDDD p  $Q < 'QD "@DDDDDDE3QDDDDDD"@p#D DDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD Figure 5: Card parts inspector for a browser card. In Figure 5, the four menus contain entries for every valid version of card parts for the browser card with title "Tailorability". The top menu is for versions of titles and below that are menus for versions of the card's substance, links, and prop list. For example, the Substance submenu contains entries for 6 versions of the substance of this card. The current version of each card part is shaded. Each menu entry gives the date that that version was written. (Very for old notefiles may show "NO DATE AVAILABLE" in place of a real date.) """""""""""""""""""""""""""""" """""""""""""""""""""""""""""" """""""""""""""""""""""""""""" '""""""""""" &> 0  ?""""""""""" &c 8l  """"""""""" 8l < &< """"""""""" &36 3""""""""""" ?6l ?33l 3&cal a""""""""""" &>a xa"""""""""""  & """"""""""" '""""""""""" & ~?""""""""""" &` c00` 0""""""""""" ` a0` 0` a0` 0&` a0~ ?""""""""""" &{` a0` 0""""""""""" ` a0` 0` a0` 0&` c00` 0""""""""""" &` x~? ?"""""""""""  & """"""""""" '""""""""""" '? & ??g? |g?y>??s?~g?y???s&'?y?s?3Ó88 &'?y?9?s3s3r  ~x???s9s3r>x3?389'? '? ?$ $DDDDDDDE\DDDT\|GNDDDDF @@ 1"DK<:YŘ,@(@$MBFj&d̑4@(x $FFDDdDLDVdTdLDDDDDDF BBC$D @| DBFB$D @  D$<:AD @>8 $DDFDDDDDDDDDDDDDDDFDDDDDDDF <'"""""""""" '"""""""""" ??&~"""""""""" &~O 80Ó88"""""""""" ?ϑss3s3rϓgyg<'~'ϓ~g'"""""""""" 'Op?'"""""""""" ~Og?s'r<gs9s3r'089"""""""""" '"""""""""" $"""""""""" $DDDDDDDDDDDDDDDDDDF"""""""""" Àp"$@$ p  $ """""""""" $FMMN|EEdguTDDF""""""""""  "@ "@$"@"""""""""" $DDtLN\E_gtDDF""""""""""  '"""""""""" '"""""""""" 興?興&?"""""""""" &"""""""""" yÓ88興s9s3s興&g?g<'"""""""""" &Og'"""""""""" ?'興39?s's興&y9s3s"""""""""" &}89"""""""""" 興興'"""""""""" $DDDDDDDDDDDDDDDDDDb"""""""""" (q8`|($$@D 0`"""""""""""" $dDDDEVDFLb"""""""""" $@x(Ĉ@D  ($@D  """"""""""" $DDDLVdTdddLb"""""""""" p@8"> (@($""""""""""" $""""""""""" (q8`|($$@D 0`"""""""""""" $$@@""""""""""" Ĉ@x($@D  ($$@D  """"""""""" $$@D  """"""""""" p@8"> (@($""""""""""" $""""""""""" (q8`8($$@D 0`"D""""""""""" $$@@""""""""""" $@x(Ĉ@D  ($@D  """"""""""" $@D  @""""""""""" p@8">|(@($""""""""""" $""""""""""" (q8`8($$@D 0` D""""""""""" $$@@8(@($""""""""""" '"""""""""" &"""""""""""" &|"""""""""""" ~~Is`&pp &~A3Ng3g1"""""""""""" &|>OOyO"""""""""""" >O`>O >O~g?O䈈&>ONgps '"""""""""""" '"""""""""""" $Àp"""""""""""" $ELDDUfGUFdDTF""""""""""""  p  $  < '1$ "@"""""""""""" $DGMMMfELEDDLTF"""""""""""" "@p#p$ """""""""""" $\DDDDDDDDDDDDDDF"""""""""""" """""""""""""""""""""""""""""" """""""""""""""""""""""""""""" """""""""""""""""""""""""""""" """""""""""""""""""""""""""""" Figure 6: Card parts inspector for a deleted card. Figure 6 shows a card parts inspector for a deleted text card and thus allows the UNDELETE option. By clicking UNDELETE, this card can be backed up to its last version. If the current version of the card part is bad, then the menu entry will be a string so indicating, for example, "BADSUBSTANCE." The title of the top menu includes the card's type. In addition, each menu item contains some information, in square brackets, before the date. In the title versions menu, this information is the first few characters of the title. In the substance versions menu, it is the number of bytes in the substance. In the links versions menu, it is a triple of numbers giving the number of to links, from links, and global links for this card. Finally, the proplist versions menu includes the number of entries on the property list for this card (i.e. twice the number of attribute-value pairs). Atop the stack of menus is an attached menu of operations, described below. CANCEL: This cancels this card parts inspector, throwing away any changes made. UPDATE: This closes the card parts inspector, incorporating any changes (backing up to previous versions of card parts) you might have done. DELETE: This option closes the card parts inspector and deletes the card. UNDELETE: For cards that have been deleted, this option appears instead of DELETE. Choosing it causes the card to be undeleted. RESET: This causes the selections in the submenus to be restored to the values they had when the card parts inspector was first brought up. (Equivalent to doing CANCEL and then inspecting this card again from the card inspector menu.) Note that cards that can't be deleted (like the top level fileboxes) don't have the DELETE option on their card parts inspector. Buttoning an entry in a submenu of a card parts inspector pops up a short menu unless the entry is for a bad version (e.g. "BADSUBSTANCE"). This menu contains at least the entry Inspect and possibly Change Selection, if the selected entry is not the same as the current one (i.e. not shaded). Choosing Inspect allows further inspection of the details of the selected card part version. (See Figure 7 below.) For example, inspecting a title version brings up the Interlisp inspector on a record containing the title, date and card object. Similarly, inspecting a links or prop list version brings up the Interlisp inspector on a record containing the lists of links (i.e. to links, from links and global links) or the prop list. Note that changing values in these Interlisp inspectors has no affect on the notefile and is ignored. a""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""??<??|??><1???3y3>~3??>yxsO?~y<dy?q3|?<|''>d9ss|??<?d?ys| O?<??>~O'3>d>>yϞsx?O??<??><'1s9?3yp?f?'<?||??FÈ??????8828288 @ @88 @qaŇxŇ,8aG,28 @&A &@2DA%A&ɒ$H22 @A $"0AA"%F 8 @$A P$"AA"%A 88 @&A$P$"DIA&" 28 πq "80A‡ 2 888282Ç"x!88$B2DPB HD 88$B2DPB `H(D!28Q*DPC # 2Q*DB>HB 8QDB&DBDH 88!$B&DBDH@!!28!#"xC8i>|!28882802pCǀq@q 8$@ "0a88$@,4aÇ~" "P28@2LDH(p#!2@ DG(B !8D@ DD@ !88$@ LDHP# !28q' 4q`CPp>|2@80882828?""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//?À`?>?ϟg~@'<gs3ϟ?>8<>G?`<ϓ2y<ϟ??~8>Oc?</>ϓ2??9>Og</0ϓ2?ϟOO'>Ox/ϟ?/,, 8B"8, D$DB D(DB D80B, D$B, D$DB D"DB>8"8,,00,<8H Bq>80@,"DI B@ DP@"DJ@B~!@ DP 8p (>|0,"@!D@ B@D )"@Q"@!@@B~!@D$B@Q"@!S@B(p"@(PDx ,"@!R@A(B@ 0 PD@,"@!2D@@BC @("@!2$@@BPC@$D|q# CPpA|"8, @,00``,>xpO>|Pp€, DB&H@P "(B DB&H@P ,&(!1B DpO| "p @,,,x >|@Â,D! @DF "D!ņ,8p@ADJ x!&I2xB@<,"P"DBA",>H!$"C""D!$ 2! D`@D""D ,p 8!Gϟ, H ,0@,/"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""/"""""""""""/?""""""À`?>ϟg~<"""""/ϟ??ϟ<<~9"""""""""""/Ϟ82p< p92""""""gs3ϟ?>88ϓ2y<ϟ??~88"""""/>ϓ2??992"""""""""""/0ϓ2?ϟ>"""""""""""/ϟ""""""?"""""/""""""""""",2""""""8 8""""",<8Ï!@@2""""""""""","DB!@AA2"""""""DBAG8@80P2""""""""""",$DBA$H  2"""""""DBA$ȉ"D 8"8 G8A8""""", @2""""""""""", 2""""""88""""",>xpO>|Pp8a€2""""""""""", DB&H@P@"D"2"""""" DB&H@P@,"@ 8 DpO|@ "pτ>8 !8""""",2""""""""""",2""""""88""""",x >|@Â2""""""""""",D! @DF "2""""""D!ņ,8p@ADJ 8x!&I2xB@<8""""","P"DBA"2""""""""""",>H!$"C"2"""""""D!$ 2! D`@D"8"D ,p 8!Gϟ8""""", H 2""""""""""",0@2""""""88""""",2"""""""""""/"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Figure 7: Card part version inspectors for title, links and prop list. All substance versions for card types inheriting from Text, Sketch and Graph can currently be inspected. (This includes most cards except those having user-defined substance types, like the NCFile card.) Inspecting a card's substance version will bring up a window showing a copy of the substance. (Note that changes to this copy have no affect on the notefile.) Any links in the substance of the card will show up as bracketed strings describing the link. Choosing Change Selection from the card part version popup menu causes the current selection to be changed to the selected one. This changes a card part's current version to another legal one. (This change can be undone by resetting or canceling the card parts inspector as well as by later aborting the card inspector or interaction window.) 3. Running the Notefile inspector: Phase 3: Rebuilding your links To complete the Inspect&Repair process, select the Continue Repair option from the interaction window menu. This invokes phase 3, the links rebuilder. Normally, this simply rebuilds links from card substances. In certain circumstances, it may do extra work as well. If your link types list is bad, and you didn't back it up to a previous version, then phase 3 will rebuild it. If there are fileboxes with bad substances that you haven't either deleted or backed up to previous versions, then phase 3 will rebuild them. Finally, if there are cards with bad links that you haven't backed up or deleted, then phase 3 will rebuild those links as well. (It rebuilds ALL to links and from links anyway. For those cards, it will rebuild global links as well.) First the links rebuilder removes all the to and from links for every card. Then it reads the substances for each card and recreates to links and from links by looking at the links found inside the link icons in the card's substance. The link rebuilder is also able to rebuild bad filebox substances. It does this by looking for all cards in the notefile with from links from the bad box and creating a new substance for the box containing only links to those cards. This process loses any text that the box might have contained as well as scrapping the original ordering of links. Nonetheless, in some cases this may be preferred to backing up the substance to a previous version or to deleting the box altogether. The links rebuilder can rebuild the notefile's list of link types in a similar manner. That is, it records the set of link types seen on valid links and replaces the old links types with the new set. Note that this throws away any link types for which there are no links in the notefile. Finally, the links rebuilder can rebuild bad global links for a card. It does this by looking for any cards with from links from the bad card that are global. This assumes that the card at the destination end has good links. Thus, if the cards at both ends of a global link have unreadable links, then there is no way to recover that link. Note that the links rebuilder automatically files any unfiled cards in the ToBeFiled box. A message is printed in that case. 4. Tips and hints for using Inspect&Repair This section contains a list of strategies and tips for using Inspect&Repair. For the most part, they are ordered from the useful and obvious to the esoteric. Several of these are implicit in the first four sections of the document, but are repeated here for emphasis and completeness. When in doubt, abort! All your changes will be lost, but then if you're uncertain about what's happened this is the safe course. Often, in fact, you may simply want to check the health of your notefile and abort without tinkering. Fixing versus tinkering. There are two main ways to use the inspector, either for fixing a broken notefile, or tinkering with a healthy one. The latter case occurs when you wish to recover some card that was inadvertantly deleted. Or back up a card that was accidentally changed to its original version. Inspect&Repair after a crash. If you try to open a notefile and you get the infamous "Work was done since last checkpoint..." message, then you're given the chance to run Inspect&Repair on the notefile. This is a good idea whenever you wish to recover that post-checkpoint work. The inspector will integrate the changes you made since that checkpoint. (You do have to continue through phase 3, however.) Compacting. It used to be the case that old versions of card parts were in the notefile but inaccessible. Thus, there was little reason not to compact a notefile often. Now there is a tradeoff between the need to save space by compacting versus the need to be able to back up using Inspect&Repair. Probably the safest course is to keep a backed up copy of the pre-compacted notefile around until you have confidence that the compacted one is healthy and that you have no need for previous versions of any of its cards. Inspect&Repair closes the notefile before starting. This means that if you are working in your notefile and notice a card you'd like to inspect a previous version of, you must record the card's title and close the notefile. Then, run Inspect&Repair, find the card's entry in the inspector menu using the Search facility, and tinker with it as desired. Fixing enough problems to allow phase 3 to run. You can't run phase 3 unless Inspect&Repair thinks your notefile is above a certain threshold of health. There are certain problems it can handle (e.g. bad filebox substances, see Section 3), and others that it can't (e.g. bad substance for non-filebox). You have to decide either to fix these sorts of problems yourself in phase 2, let phase 3 attempt to rebuild them, or just abort the whole thing (always an option). Sometimes these decisions can be tricky. For example, suppose a filebox's substance is bad. Call it BadBox. Should you (a) delete BadBox altogether, (b) back its substance up to a previous version, or (c) allow phase 3 to rebuild it by looking for from links in other cards from BadBox? Option (c) may not be advisable if there was important text in BadBox or if the order of cards in BadBox was important. On the other hand, option (b) may be of little use if the last good version is too out of date (or if there is no good version at all).(((( TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN" $#8vlDiA2p  BMOBJ.GETFN3 TIMESROMAN 4  BMOBJ.GETFN32Cv BMOBJ.GETFN3 TIMESROMAN % C *p    9  l  T BMOBJ.GETFN3 TIMESROMAN ** BMOBJ.GETFN3 TIMESROMAN ) fi<f!T BMOBJ.GETFN3 TIMESROMAN 4$ BMOBJ.GETFN34QLQKN) BMOBJ.GETFN3 TIMESROMAN H @C3"W, { 3/1#uz