Open JeffreyBenjaminBrown opened 8 years ago
Ideally, I think, one would keep a set of special parents in the graph the children of which were commonly used truncation thresholds. This would be a step toward representing queries about the graph in the graph.
As I see it, a dynamic/generalized view contains a list of children for each node which is determined by some function of (atom, atom's context in graph, node's context in tree). For simple views, the function gives you all children or direct ancestors of a node, up to a given depth. You are suggesting a function which gives you all children or ancestors, conditional on some stop criterion.
See LatexWriter in the latest, which does something like this. I have refactored this class to make the recursion clearer. The output delves as deep into the graph as necessary, where some atoms are recursive in the view and others aren't. We might want to follow a similar pattern for general views.
I often want to look at something's ancestor's in as much detail as possible, except where those ancestries reach certain nodes that arise frequently in the display (and which, presumably, I already remember what lies beyond). This would be for that.
I could easily code a stupid version, that asks Smsn to do all the extra work, and then filters out in Emacs ancestors lying beyond the cutoff nodes. (And I might! But it seems like a more responsible use of my time, though, to learn the Java side ...)