org-roam-ui icon indicating copy to clipboard operation
org-roam-ui copied to clipboard

[MINOR] Color by mtime

Open ning-y opened this issue 3 years ago • 7 comments

** Have you checked whether this feature is not already on the project board?

Yes

Is your feature request related to a problem? Please describe.

I think that being able to easily and visually identify old nodes can help you keep your knowledge base up-to-date especially re linking old stuff to new stuff (rediscovery!).

Describe the solution you'd like

A checkbox for "color by last modified datetime."

Describe alternatives you've considered

Not sure!

Additional context

I did check the project board to make sure this isn't currently in the works, but in case it is already implemented, I apologize for the spam!

ning-y avatar Sep 26 '21 15:09 ning-y

I think this is a great idea and one we would like to support, but it's kind of difficult to actually do so, since org-roam does not encode this data for nodes, only for files (which makes sense, since you should be able to generate a new db from just the plain org files, which do not encode this info either). We could thus only show this modification time for individual files, which is alright since you can just treat every node in the file the same, but it kind of goes against the current structure of org-roam.

We do really want to support something like this, but this should probably be coupled to some org(-roam) extension which encodes the last modified time in the property drawer of the node. If you know if something like that exists we can move forward more quickly, otherwise someone (probably me) will have to make it, which will take some time.

tefkah avatar Sep 27 '21 11:09 tefkah

Not that that extension will be very involved though.

tefkah avatar Sep 27 '21 12:09 tefkah

I have written such an extension, see https://github.com/ThomasFKJorna/org-roam-timestamps.

It does not work as best as it could, but it does what I need it to to start implementing this feature.

tefkah avatar Sep 29 '21 16:09 tefkah

@ThomasFKJorna Thanks for your help in the implementation! Sorry I couldn't contribute: I have almost zero experience in elisp :x

ning-y avatar Sep 30 '21 01:09 ning-y

No worries! If you have any specific ideas on what kind of behavior you would like (like, very granularly: if i click this I would expect such and such a thing to popup etc) that would be a great help as well!

It will probably take a little while before we have this up and running as we are also in the process of adding a file preview. This will probably go hand in hand with a new sidebar ui element, which we also want to use for things like filtering through notes, for instance by mtime. Turns out: UX is hard! Who knew! Not me, that's for sure, so if you have any ideas on what and how you would like to this feature please let us know!

tefkah avatar Sep 30 '21 10:09 tefkah

Saving

Since org-roam does not really store any data about the contents of the current node, I can’t really check whether the current node has been changed at all. There are four ways to possibly get around this:

Git

Next best option would be to compare the current state to the latest git state. This is kind of annoying though, and would rely on you keeping an accurate git repo of your notes. Since I personally am not that accurate with it, and I want this package to be useable without git (as org-roam(-ui) is), this is not an option.

For those of us who are fairly accurate with Git (thanks to git-auto-commit-mode), would it be possible to optionally integrate org-roam-ui with Git so that we don't have to store ctime's and a long list of mtime's in the files themselves? I suspect it is difficult but not impossible to compile edit history for a particular node via Git's revision history and ID properties.

hpfr avatar Feb 20 '22 00:02 hpfr

This would be possible actually, I've gotten somewhat familiar with https://isomorphic-git.org/ by working on something for my thesis using Org-roam (see https://thesis.tefkah.com (WIP) for some examples, e.g. the "History" tab here: https://thesis.tefkah.com/III.-Anyons or the (embarrassingly sparse) activity view here: https://thesis.tefkah.com/activity)

Unfortunately, this won't happen anytime soon! I'm very busy with procrastinating on my thesis, but I've gotta get back to that eventually as well.

Git integration with probably take a much more involved form when it drops, something more like how [logseq][https://logseq.com] does it, where you can view/clone/commit from orui itself. Tagging dates to nodes will then essentially come for free! But this git integration will be part of a much larger rewrite im planning. ORUI is a bit of a mess and does not accomplish a lot of the things I would like to do with it (publishing, accessible away from emacs, editing). Might be a bit outside of the scope of what most people would want from orui, but I want those things to be there, and don't want to add features now that I will have to support later on.

Tldr: yeah but later!

tefkah avatar Feb 23 '22 12:02 tefkah