Provide interactive interface for vulpea-meta
d12frosted opened this issue · comments
Some context - #96.
In short, it would be nice to have interactive interface to modify metadata lists, e.g. vulpea-meta-add
and vulpea-meta-remove
. It should use note at point or read a note interactively. And should support list keys.
@hyan46 I've added interactive functions to manipulate meta via 937ae09 (available in
feature/org-roam-v2
branch):
vulpea-meta-add
vulpea-meta-add-list
vulpea-meta-remove
vulpea-meta-clean
Would be glad to have some feedback.
Thank you very much, @d12frosted ! It works pretty well now. A quick question, what is the current behavior if we like to add a new meta to an existing tag? It seems that the current vulpea-meta-add
will overwrite the existing tag. Should I use vulpea-meta-add-list
for this purpose? I probably don't fully understand the meaning of list meta yet.
Hello,
Is there a function that returns a list of available metadata for a note ?
@Cletip since you are asking in the context of 'interactive inteface', I need more details. Do you want an interactive function that will present a list of note metadata? Or just a non-interactive function like vulpea-note-meta
?
In the first case there are no plans for that as you already have metadata inside your note :) Just open it and that's it.
In the latter case, it's already there and is used by vulpea-note-meta-get
and vulpea-note-meta-get-list
. But keep in mind that it contains raw data (e.g. each value is a list of not parsed strings). But maybe this is what you want.
Oh, gee, I'm sorry I didn't see the "interactive". Sorry to have restarted this issue for nothing.
I want a simple function that takes a note as a parameter and returns a list of the metadatas of that note, without their associated values and non-interactive.
Thanks for the "vulpea-note-meta" function, I don't know how or why I didn't see it before (I had only seen "vulpea-meta"), now the solution seems obvious.
Here is the function (feel free to change the name, description etc):
(defun vulpea-note-meta-get-list-of-name (note)
"Get a list of name of metadata from NOTE"
(mapcar 'car (vulpea-note-meta note))
Sorry again to have restarted this issue for nothing ^^
And thanks again for your help ;)
pff @Cletip no worries :) this is why we have these communication mediums like github issues!
yup, in your case you can simply do (mapcar 'car (vulpea-note-meta note)
. IMO it's not worth a separate function in vulpea
, but I will keep an eye on that.
let me know if you have any other questions ;)
P.S. i remember about tag inheritance, i just need more time to process everything after vacation
Ok cool :)
No other questions, but if I have any other questions, I will open a new issue XD
No problem for tag inheritance, take your time !