-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag Hierarchy for vulpea #146
Comments
Hey, I am in a travel mode, so can't answer in full details. But from the top of my mind, it should work because vulpea doesn't have it's own notion of tags. Everything is done using Org mode APIs. So I'd say - if vulpea doesn't respect tags configuration, then it's a bug. What I mean is that if Meanwhile I will read that article about hierarchy, cause I know little about that. |
Thank you for your answer. Okay, I think I just realized that there are two major problems:
Then I see two solutions: either the tags are returned by a function, a little like this : Or you have to implement it differently with vulpea. The idea would be maybe to rewrite the function that allows to have the tags of a note in vulpea, which would take into account the "org-tag-alist" variable directly. There are surely other solutions that I haven't thought of. Finally, why not create another variable to store the tag hierarchy (exclusive to vulpea, why not just a list of list of list etc). Its initial value could be parsed with the basic "org-tag-alist" variable, but the user could change it to give another hierarchy than the one by org-mode. Also, thank you very much for this wonderful package and for your involvement, whether in your blogs, message or simply your different projects (I see the new repo "publicatorg"). I would like to help more with the code, unfortunately I don't have the level to do it yet. Thanks in advance for your future answer |
@Cletip sorry for the delay. I was playing around wit this idea of using tag groups. And in the process I realised that this issomething I would use myself in variety of contexts. For example, for my vino or litnotes plugins. The major problem I see right now is that Org mode does not provide a way1 to get a list of tags including their groups. E.g. in your example, to get The way I see it - In addition, the solution should be 'portable' to support file level notes via I might work on such a function. But in really, I am not sure if that is "valid" flow 🤷 Now regarding your message. Thanks for taking time and checking various cases and sharing your thoughts.
Indeed, this is what I found myself. That function supports inherited tags, but not groups.
Files are treated specially in Org Roam and (inherently) Vulpea. There is a code path that reads filetags value.
Not sure I understand the solution. If the tag is in the DB, querying is not a problem. The problem is that there is no simple way to get the list of tags together with their respective groups (recursively). Once there is a way to do it - querying is not a problem.
Keep in mind that tags configurations are buffer-local, e.g. buffer content may change semantics of any tag. For performance and (probably) consistency it's better to store all information on write and avoid reading files when querying.
I would try to stick to Org mode as much as possible :) That way it integrates with other parts of Org Mode. So to summarise, to me it seems like all we need is a function that can expand tags to their groups. Using it we can implement a variant of Let me know if something is not clear in my answer.
❤️ Footnotes
|
Hi! Sorry for the little delay too Yes I understood your answer, and I thank you for the precicion of this one. I think indeed that this is probably the best solution. I'll send a mail to the org-mode mailing list, someone surely did it already. PS : I think that this functionnality : "In addition, the solution should be 'portable' to support file level notes via filetags." will have to be implemented by ourselves. another PS : Have you seen the new package called "denote"? What do you think about it ? Can we discuss it somewhere else than this issue ? |
@Cletip Cool. Let's see what we can get.
Sure. Feel free to start a new public discussion or to send me an email. |
Hello, I have some news! You can have the "tags that are part of the hierarchy" with this function: "org-tags-expand". But this function doesn't give the list of tags of a heading (it just takes one tag as argument) I made a small function to illustrate the fact to get all the tags, using the "org-tag-alist" variable of org-mode. You can try this in an org file:
The function :
Just execute the function when your cursor is on a heading with the tag "Persp" for example. This allows, for a certain heading, to recover its tags. we can just modify the "tags-heading" variable to retrieve the tags of a note! I think PS : I asked to know if a function of this style already existed in org-mode, I wait for the answer but it seems that not |
@Cletip Yup, Now with this function you can basically advice P.S. I am not really sure that |
Sorry I'm late with the answer, really sorry.
Yes sorry, I forgot you had mentioned that. So the principle is the following : get, according to the hierarchy given by the "org-tag-alist" variable, the children of a tag X, and give this tag list to the "vulpea-db-query-by-tags-some" function. This allows to change only the search functions, and not to modify directly the tags of a note
Here's what it does:
I don't really understand this: do you mean something like this Also, I don't think we need to add an advice: why not just add a boolean in the search functions that would respect the hierarchy? What do you think about it? It would look like this:
Okay, I think there's a definitional problem in the thing: A hierarchy allows, for me, to do this:
There can be several places, take here the example X
Here it is stored in two places. So no matter if I call Control or Persp, it will always give all the notes with X, which is convenient. This allows you to store these tags in several places at once Finally, I wanted to thank you again for taking the time to discuss these things with a complete stranger: me x) |
Hello I'll be back to "help" you and to add some code yeah. It's not much after all, but I hope it works. I finished a simple but efficient code that allows to simulate a hierarchy when searching. This is done in two functions:
Both functions:
You can try, for example, by setting your note with the tag "Vision", and search with "Persp" (if you take the previous exemple with GTD, Persp etc), like this: PS : I don't know how you want to "implement" it in vulpea. I think it might be useful to have it in vulpea though. |
Hello,
My question is in the title: would it be possible to implement the functionality of having a tag hierarchy in vulpea?
Concrete example:
If I have the following configuration (https://orgmode.org/manual/Tag-Hierarchy.html)
That can conceptually be seen as a hierarchy of tags like this:
If one of the notes has for example the tag "Task" (in filetag), would it be possible that, when using the command "vulpea-db-query-by-tags-every", this note would be found if I ask for the tag "Control" or even "GTD"?
To conclude, I may not realize the difficulty of this feature :
Is it possible ?
Could there be alternatives ?
Is it complicated to implement ?
This feature would just be execeptional for me,
Thanks in advance for your futur answer.
The text was updated successfully, but these errors were encountered: