[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Bookmarks



Re "A Better Bookmark", permit me to quote from SMARTSET.NTS
(part of
SMARTS24.ZIP -- available here):

------------
The 8/15/93 revision of SmartSet added a unique placemarker
routine, called FMARK. What sets this apart from other
placemarker programs is its implementation of dynamic or
"floating" markers. Ordinary placemarker routines (including the
factory-issue "bookmark" feature) statically record the cursor
position at the time the marker is saved. If the text at the
marker changes position due to editing (as often happens), the
marker is thrown off. When you try to retrieve it, you're
returned not to your marker, but to the place where the marker
would have been had the file not changed -- an annoying
limitation. FMARK's floating markers return you to the text you
marked initially, regardless of its present location within the
file.

How does FMARK accomplish this? In addition to memorizing the
cursor position, the program records a 20-character snippet of
text at that position. When you retrieve the marker, FMARK jumps
to the last- recorded position and checks whether the snippet is
still there. If it has moved, FMARK SEarches backward and
forward for it. If it's found,
FMARK memorizes the new position. If the snippet is not found
(because, e.g., it has been deleted or changed), FMARK quietly
returns you to the last-recorded character position for that
marker.

* * *

FMARK sorts placemarkers by filename. Compare the factory-issue
bookmark, which links markers to window numbers -- a bad idea.
(What if the file in window #2 changes? The markers no longer
make sense! And what if that file is reCAlled in another window?
 The markers are no longer accessible! Plus -- am I seeing
straight? -- you get only 2 markers per window! Arbitrary,
capricious, and totally unnecessary!) FMARK lets you work
concurrently with any number of markers for any number of files
(not just 9); the only limitation is memory. Files can be
ABorted or STored, and then reCAlled in any window, without
losing the markers, which remain in memory until Deleted or Cleared. Finally,
FMARK does not modify files. DeFine blocks are preserved, so you can
MoVe or CoPy DeFined text to a marker position.
------------

Carl Distefano
70154.3452@xxxxxxxx