org-brain
org-brain copied to clipboard
Move current entrys/thoughts links into its subdirectory
Following scenario:
- All my .org files are in a directory, e.g. org-brain, 1000 .org files
- Including special.org
- As the concept special gets more important to me, I create a new subdirectory for it, with exact same name and move it (special.org) there, now I have: org-brain/special/special.org
- Here it where things get interesting: Now having an org-brain-move-brain function, which would scan special.org for all links, parent, child, friend, and move all found results as well into this subdirectory.
How this can be useful? As topics/concepts grow, and not to make org-brain too slow, and now having, org-brain-switch-brain available, this is the complementary required feature somehow, so make best use of those features. Organizing into sub-brains, could also get more fun this way. Just select partially what is important to you, then move them out as separate brains. Or do we have this feature already somehow?
Hi! No, there's no functionality like this at the moment. I think that the most likely situation is that the whole brain would be moved though, since usually all entries in the brain are linked somehow?
which would scan special.org for all links, parent, child, friend, and move all found results as well into this subdirectory.
It should move only those connected to special directly, so 1 hop away, not further. That should work I guess. The idea is usually special should be anyway some detailed concept of some bigger topic, and we would look only to its relative aspects, which would be those 1 hop connected links, be it friend or child. Anything detailing it further would be child for example, rest friend. At least in the direction of parent and friend it should behave so. For child it could dive further, usually those should be dependent on special, so the result could make sense.
As a summary:
- parent and friend: 1 hop only.
- child: all hops.
But I am not sure myself yet, but something in this direction could be interesting, worth keeping in some corner of our (real) brain. :)
This sounds like a useful feature. I wouldn’t expect such a function to move the parents or friends of special
, though. But moving all children and grand-children seems comprehensible to me.
Thanks for jumping in with new perspectives, a nice mixture of these thoughts could be:
- child: all hops > move
- parent and friend: 1 hop only > copy
Parent and friend would exist twice but their relationships would be kept in the new sub-brain, at least in a lecture context this could be important, not to lose those connections. On the other hand if this "copy idea" is accepted one could copy a few more hops as well, like 2 or 3 hops in parent and friend direction, not sure if the benefit would be big, probably not.
I like the idea of creating a new brain based on a "branch" of another brain, but it seems somewhat complicated to implement. If the children of special
are moved, but they include parents/children which do not have special
as an "ascendant", then these relationships will be broken. Probably it could be solved by using brainswitch
links...
It is possible converting an .org tree structure into an os directory tree structure?
Example:
* one
** two
** three
Some magic function when triggered would create from this org file:
- directory one: with file one.org and all content inside one up to two
- subdir of one, two, with file two.org in this subdir, and all content inside two up to three
- subdir of one, three, with file three.org in this subdir, and all content inside three up to next org header, if available
What would this give us for new options? Any lecture can start from a single .org file, then we can quickly, convert it into a directory tree, each directory containing smaller parts of the more complex lecture. Plus each subdirectory can have its own brain, which is the topic here. Somehow a mixture of all above:
- complex/longer .org files
- directory tree based on complex .org file
- simple/shorter .org files
- each subdir can be a brain
This would allow splitting bigger projects into smaller chunks. And also be represented on the harddisk in this form, easy to zip and share and manage, all independently.
org-brain currently suffers form some bad UX, and this is a symptom. The current flow needs you to -really- know how you want to model your brain from the get go. Doing these changes are not really that simple nor straight forward. Check https://github.com/Kungsgeten/org-brain/issues/225#issuecomment-570013643 on my flow.
I think that the simplest solution here would be to namespace it ONCE, and not try to mimic the filesystem completely.
ruby.org
could become...
Ruby/Ruby.org (parent)
Ruby/Variables.org (child of Ruby)
Ruby/Methods.org (child of Ruby)
Now, there's the problem of what do with references to non-titles. Since org-brain gives you a lot of freedom, there's a chance you have children that are titles from another section / file, that is used in another location / file. So I reckon that those should remain untouched, and only deal with what is actually on file.
You could also just output what was not automatically parsed/moved into the index file, in the above example Ruby/Ruby.org
.
I have a hard time understanding how this would work. I think a full example is needed: what is the input, and what is the output? As its most basic, I understand it like this:
I have a file named cats.org
. Now I want to put this into a sub-directory, which would also move its children (in other files) into this sub-directory. For the most part, my guess is that most of these children would also be in cats.org
, so no problem there. Let's say though that I have a file named fodder.org
in which I describe different kinds of food that animals eat. There I have headline entries for Wet cat food
and Dry cat food
, which somehow are children of an entry in cats.org
.
What would happen now if I run the "magic function" which should move cats.org
and its children to a sub-directory? Should the entire fodder.org
file be moved into the sub-directory too? Or should only children which are file entries be moved? In that case fodder.org
wouldn't get moved, but a file named cattoys.org
could be moved if there was a child link directly to the cattoys
file entry.
Another option would be that the lihked headline entries from fodder.org
got moved into a new file in the newly created cats
sub-directory, something like cats/fodder.org
. A potential problematic thing here though would be if Wet cat food
had more parents than fodder
and cats
. Perhaps I have a lizards.org
file and I've discovered that they eat wet cat food too. Should Wet cat food
still be moved?
Things can get complicated quite fast! The first step to this feature would be to decide how the feature works. Then there's the issue of deciding if it should be implemented, and actually doing so :D
Whoops, didn't mean to close it.
What would happen now if I run the "magic function" which should move cats.org and its children to a sub-directory? Should the entire fodder.org file be moved into the sub-directory too?
For my use case, yes. So in my case, while using org-brain you should create children in such a way moving them later into subbrain would not hurt you. Children should somehow belong to the above parent concept.