TIP: Click on subject to list as thread! ANSI
echo: semware
to: All
from: Michael Fisher
date: 2003-02-17 11:11:48
subject: [TSEPro] Bookmark Enhancement: Moving Marks and Quick Mark

From: Michael Fisher 
@Date: Sun, 16 Feb 2003 16:41:49 -0800
@Sender: semware-owner{at}sawasdi.apana.org.au



To everyone using TSE's bookmarks a lot:

I included two snippets of code, one working with the "Visual 
Bookmark Macros v3.0" (by Sammy, Steve Kraus, et al.), and one for 
the standard bookmarks command.

Imagine you are reading through e.g.  a long learned paper with 
end notes, or a source file with function definitions at the top 
or bottom.  While you go through the text, you may want to look up 
a note that is referenced, or a function being called.

With bookmarks, you place one at your current position in the 
text, so you can return to it quickly, then search for that 
particular note or function.  Once found, you study it, then 
return to reading in the text body.  This procedure may repeat 
itself every time you want o look up a note or function.

As you work through the file, the bookmarks thus created 
proliferate ('A', 'B', ...)  and picking the right one requires 
calling the selection menu every time, and picking the mark last 
used.  Eventually, things may become confusing.

Wouldn't it be easier in this situation to move a single bookmark 
from one position to the next, wherever you need it?  This is done 
for instance with Wordperfect's "Quick Mark".

Here are two procedures to allow something similar in TSE.  

1.  Add the first at the end of your book "Visual Bookmark Macros 
v3.0" (it depends on earlier defined routines), and assign it to a 
key.

It moves an existing bookmark to the current cursor position, by 
deleting and recreating it.  The "Select Bookmarks" window is used 
even if there is only one bookmark, to give the user a chance to 
abort.

2.  The second one is stand-alone, and uses the 26th and last 
bookmark 'Z' for its purpose, on the assumption that the previous 
25 could be enough for the user's needs.

Use with a TRUE parameter to place or move the mark, and a FALSE 
one to go to it.

------Visual Bookmark Macros v3.0---------------

proc mMoveBookMark()
 string bmc[1]              // Bookmark character, null for none

 PushPosition()             // Save cursor position to move to
 bmc = mSelectBookMark ("Move") // Select which mark to move
 if bmc  ''               // If a bookmark is selected to move
    AbandonFile ()          // Delete bookmark buffer
    DelBookMark(bmc)        // Delete mark in the old place
    PopPosition()           // Go to saved cursor position
    PlaceMark(bmc)          // Recreate mark in new place
 else                       // Else no bookmark selected
    AbandonFile ()          // Delete the bookmark buffer
    PopPosition ()          // Return to original position
 endif
end

--------------TSE Functions Only-------------------

proc mQuickMark(integer doWhat)
 case doWhat
      when TRUE               // Place or Move QuickMark
     if (isBookMarkSet('z') == FALSE)
        PlaceMark('z')
        Message(" -- QuickMark Z placed --")
     else
        DelBookMark('z')
        PlaceMark('z')
        Message(" -- QuickMark Z moved --")
     endif
  when  FALSE                 // Goto QuickMark
    if (isBookMarkSet('z') == FALSE)
       Message(" -- QuickMark Z not placed --")
    else
     GotoMark('z')
    endif
  endcase
end


--
TSEPro mailing list



---
[sawasdi.apana.org.au] (3:800/846.13)
* Origin: apana>>>>>fidonet
SEEN-BY: 633/267 270
@PATH: 800/846 1 640/954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.