Closed d12frosted closed 3 years ago
@hyan46 I've added interactive functions to manipulate meta via https://github.com/d12frosted/vulpea/commit/937ae09f0321ae0793950ea0f6113d8100c086ab (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.
@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.
When you simply add (better name would be set) you override any existent value with the same key. So this operation doesn't allow multiple values for the same key, or in other words, key can be used only once. List allows it to be repeated.
Cheers, @.***
On Thu, Jul 15, 2021 at 10:14, Hao Yan @.***> wrote:
@.***(https://github.com/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, @.***(https://github.com/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.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
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 !
Some context - https://github.com/d12frosted/vulpea/discussions/96.
In short, it would be nice to have interactive interface to modify metadata lists, e.g.
vulpea-meta-add
andvulpea-meta-remove
. It should use note at point or read a note interactively. And should support list keys.