ahyatt / ekg

The emacs knowledge graph, app for notes and structured data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ensure `ekg-note-id' after resource URL is deleted

qingshuizheng opened this issue · comments

Hi @ahyatt ,

Currently, after deletion of resource URL (I changed my mind to remove it), there's no ID for the ekg note any more. As such, transclusion of such notes is no longer possible.

Do we want to regenerate a new id before save? Or, do we want to allow multiple ids when ekg note is captured, e.g. an essential id (always exists), and optional ids like URL?

Zheng

I think one ID only, since there can only be one "subject" in the triple graph, and we're using the subject as a resource in this case.

After looking at this, I need to rethink how we do a few things, including deleting metadata and handling resource renaming. Thank you for bringing this issue up.

I think one ID only, since there can only be one "subject" in the triple graph

Should be good, as long as id is ensured after deletion of the original one.

how we do a few things, including deleting metadata and handling resource renaming

For myself, something like org-set-property and org-delete-property to add/remove tags in local buffer would be the most frequently use case. I'm trying to figure out but still staggering on the way 😄. Great to know that you are on it.

I'm not sure what you mean about using org-set-property and org-delete-property, but it should be you can remove a resource and it won't leave you with an empty ID, but will generate a new one. One thing I haven't done (and not sure it is a good idea), is to allow you to delete the entire resource line in the metadata. I kind of like how it is now; it makes it very obvious you are changing the resource if you just remove the existing resource and don't put another one.