On Sat, Jul 5, 2014 at 6:10 AM, Edward K. Ream <
edre...@gmail.com> wrote:
> Here, I'm going to discuss thoughts related to supporting org mode, a file
> format that indicates outline structure without using gnx's.l
Terry, I'll be especially interested in your comments to what follows.
> 6. All the big questions (and opportunities!) involve work flow. The big
> challenge is to make a virtue of necessity.
OMG, there is an easy way forward, one that leaves workflow almost
completely unchanged, if not improved.
The trick is this: suppose the clone command automatically creates an
(official) bookmark node instead of a clone node inside @auto and
@org-mode trees.
Bookmarks *are* clones, but they aren't marked as clones unless the
user clones them later. In addition, bookmarks contains uA's, but I'm
getting ahead of myself: see points 3 and 5 below.
That's all there is to it!!!
Well, almost everything ;-) Here are the details:
1. [No duplicates in files]. Neither clones nor bookmarks may appear
more than once in an @auto or @org-mode file. The rationale for this
is that the read code would treat multiple bookmarks or clones as
separate pieces of code. This restriction *might* be lifted, but for
now let's assume it is enforced by the write code.
2. [Optional automatic moves]. Whenever I create a clone, the very
first thing I do is to move it to what is, in effect, an @view node.
Well, why not just do the move automatically?
Suppose a node (which must be outside any @auto or @org-mode tree) is
designated as the **current view node** In that case, cloning or
bookmarking a node will automatically move the new node to be a child
of the current view node. Not only does this save time, but it ensures
that newly-created bookmarks do not become duplicate bookmarks.
If there is no designated view node, creating a bookmark will create a
node following the bookmarked node, just as when creating a clone.
The mark-current-view-node command, or something like it, will
designate a node to which newly bookmarked (or cloned!) nodes will
automatically be moved.
Designated view nodes may not appear in @auto or @org-mode files, but
they *may* appear in @file nodes, provided that the root @file node
contains an @all directive. This will allow view nodes in
leoProjects.txt and leoNotes.txt.
Btw, there will likely be a dialog asking whether, when creating a
clone or bookmark, the user wants to move to the designated view node,
or remain in the outline.
3. [Bookmarks *are* clones, but are *not* marked as such]. Creating
(and perhaps automatically moving) a bookmark creates a new cloned
node, but the new bookmark is not *marked* as a clone. It will
probably be a good idea to mark the original node as the *target* of a
bookmark.
The clone command, when applied to a bookmark, will work as usual,
whether or not the bookmark has automatically been moved outside the
@org-mode or @auto tree. When explicitly cloned, the bookmark node
will be marked as a clone.
4. [Deleting bookmarks]. Deleting a bookmark will work just the same
as any other node, whether or not the bookmark is cloned. When only
the target of a bookmark remains, the bookmark will no longer be
marked as cloned.
5. [Bookmarks (and their targets) have uA's contain the bookmarks
pattern (s?)] Bookmarks are self-contained. They (and their clones)
may appear anywhere. Especially when bookmarks break, we'll want an
easy way to examine the patterns contained in the bookmark pattern,
say a show-bookmark-pattern command.
I said earlier that bookmark nodes may appear in @file nodes, provided
that the root @file node contains an @all directive. We want to allow
@file nodes to save bookmarks, because only @file trees can remember
the bookmark's uA's. Naturally, the write code will *not* write the
uA of a target of a bookmark if that target appears in an @auto or
@org-mode tree.
6. [Find can be aware of views and bookmarks]. If a find starts on or
within a view node, it might be good to limit the search to that view
node. Otherwise, find should probably skip all view nodes and their
children. This simple rule (or something like it) would reduce or
even eliminate most duplicate hits during finds.
===== Summary
All this is truly unexpected. Bookmark nodes will act just like any
other node! They be moved or cloned anywhere, except for the the
restriction in point 1. There will be some complications arising from
the distinction between a bookmark and its target, but my present
workflow will likely remain completely unchanged, except that I'll
take advantage of automatic moves of both clones and bookmarks.
Why the excitement, you ask? Because bookmarks provide a way of doing
without gnx's in @org-mode or @auto files, while retaining (or even
improving) existing workflow. That's a huge step forward for Leo.
Edward