--- Cannot embed stylesheet 'c:/users/edreamleo/vr2-css': Permission denied. --->
Manage bookmarks in a list, and show bookmarks in a pane.
This plugin has two bookmark related functions. It manages nodes that contain bookmarks, and can also display those nodes in a special bookmarks pane / panel / subwindow.
These commands let you have personal bookmarks in a .leo file you’re sharing with others. E.g. you can store your personal bookmarks for the shared LeoPyRef.leo Leo development outline in ~/.leo/workbook.leo.
Note: bookmarks treats file urls missing the file:// part as urls, which deviates from Leo’s behavior elsewhere. It also recognizes local UNLs like #ToDo-->Critical as urls.
Nodes can be added and removed from the display with the following mouse actions:
The @setting @int bookmarks-levels = 1 sets the number of levels of hierarchy shown in the bookmarks pane. By default, the @setting @int bookmarks_levels = 1 will limit the bookmarks shown to one level, so given these bookmarks:
A B B1 B2 C
you’d just see A B C, with B underlined, indicating it has children, and when you click B, one of two things happens.
With bookmarks_levels = 1 (the default) the effect of clicking on B depends on whether or not B is itself a bookmark (contains an URL) or just an organizer node (no body).
If it’s just an organizer node, clicking it immediately shows its children. If it contains an URL itself, the first click makes Leo navigate to that URL, a subsequent click shows the children.
Note that this first click / second click behavior only applies with @int bookmarks_levels = 1.
With @int bookmarks_levels = 2 or more, you’ll initially see:
A B C
with B underlined, and clicking on B will immediately show its children, so you see:
A B C B1 B2
and, if B contains an URL, navigate to the URL
With @int bookmarks_levels = 0, the original behavior is used, hierarchy is ignored, and you see:
A B B1 B2 C
all the time.
The quickMove.py plugin also provides actions for adding nodes to a bookmark list.
The free_layout Action button context menu will also allow you to add one of these bookmark panes, and they will be saved and loaded again if the layout is saved and loaded.
Create a new outline with the following nodes, as simple top level nodes:
aardvarks apples autos bats bison bunting @bookmarks
(pro-tip, with the paste_as_headlines plugin active, you can just copy the above and use Edit -> Paste as headlines, you’ll need to promote them to top level again though).
Select the @bookmarks node and then Alt-X bookmarks-show, which should create a new empty pane above the body pane. Select the aardvarks node and click in the new empty pane, repeat for the bats node.
Squish the new empty pane up so it’s just high enough to hold the two bookmarks, or “tabs”, and then right click a pane divider and save this layout as “Tabs” or whatever you want to call it.
So now you have two tabs which jump between two nodes. Click the aardvarks tab, then select the apples node. Now shift-click the aardvarks tab. Now you are entering sub tabs of the aardvarks tab. You might want to repeat the aardvarks tab at this level, just select the node and click in the empty space in the bookmarks pane to repeat it here. You could add autos at this level too.
How the ‘tabs’ are displayed (one or more levels at once etc.) and how you edit them are described in the earlier parts of these docs. For example at the top level the first time you click the aardvarks tab it just shows you the aardvarks node, it requires a second click to see its subtabs (aardvarks, apples, and autos), because the top level aardvarks tab is both a bookmark and an organizer node. If you want it to be just and organizer node, alt-click it to edit the bookmark node itself, and delete the body text (UNL) there.