FR: Unique IDs for notes
Hello,
Thank you for all your work on this plug-in, I appreciate it!
This FR stems from my desire to reorganise my notes sometimes. Occasionally I might come back to a note, and add something to it. Then I might decide the note is really about something else it originally was and I might change the title. Or I might grab notes that I think are related and stick them together in a directory. In this case, the existing links to those files get broken.
I was wondering if there might be a relatively simple (or so I hope!) way of getting around this. If every note gets an optional unique ID (for instance, date + time) in the yaml metadata, like so:
---
title: {{title}}
date: {{date}}
ID: 2022-01-15T19:14:33Z
---
Then links will be generated based of those ideas instead of the relative path of the file. Should things get changed or shuffled around, the links should persist.
Thank you for considering this.
This relates to #56 . Let's take the discussion there until some code emerges.
Just as a comment to your idea: I am not sure I like it. In my previous projects I more or less strictly adhered to [[YYYYMMDDHHSS.msec]] links that could optionally look like [[YYYYMMDDHHSS.msec This is the title]]. The cool thing here was: Only the ID was relevant. Even if the title part of the note file or of the link changed - it would still work.
I got annoyed of the IDs eventually and stopped using them. People were asking why can't we have normal wiki-style links.
So with telekasten, I opted for wiki style links. You can have a little code snippet or even an external program that generates IDs for you. Then just link like [[the_id]] - and voila! No more issues.
Even now, mis-using the search-for-heading feature, you can create a note [[some-id]] and then change it to a readable [[some-id#this is the human-readable title] if you really need to have it now.
Oh, I should have checked the discussions. Thanks!
And the actual implementation of the timestamp is not that important, of course :) Just wanted to throw the idea out there.
Isn't it closed with https://github.com/renerocksai/telekasten.nvim/pull/84
Antomek, could you tell me if this is enough or if you want something more?