ahyatt / ekg

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: searching for tag prefixes

molekular opened this issue · comments

First, thank you so much for this great package, I really like the logic of it and start to get used to it. Especially the new templating system is very convenient.

I have a question, not really an issue. I am not sure where to ask it, I hope you don't mind posting it here.

Is it that there is no option to search for prefixes only? In the example you use with "person/" - given, that address data is in those notes, how would you search for the person living in Rome (especially if no other tag is used)?

Maybe I miss something, but my approach to finding information among the notes is right now: I narrow the search with the broadest tag I know of and then use emacs tools (helm) for searching within the ekg-notes. Prefixes are great for categorizing notes, but how do I find information in the category if that information is not behind the slash?

Also, is there a way to show all notes in an ekg-notes buffer (something like ekg-all-notes)?

Thank you!

Just now found the "discussions". Should I close this issue and post it there?

There's a discussion forum, which is probably better. But this is fine.

Search in general we don't support at all, except via the embeddings module. Besides that, the way you are doing things is the only way available.

It is possible to show all notes starting with a prefix, and it's a good idea. Let me think of the best way to add this. Thank you for the comment!

Prefix/partial searches can be easily done. But not a replacement for ekg-all-notes

    (defun ekg-show-notes-with-partial-match (tag)
      "Show notes with partial match against TAG."
      (interactive (list (completing-read "Tag: " (ekg-tags))))
      (ekg-show-notes-with-any-tags (cl-mapcan #'ekg-tags-including (split-string tag "/"))))
    (defun ekg-show-notes-with-partial-match (tag)
      "Show notes with partial match against TAG."
      (interactive (list (completing-read "Tag: " (ekg-tags))))
      (ekg-show-notes-with-any-tags (cl-mapcan #'ekg-tags-including (split-string tag "/"))))

This is useful. Thanks for sharing this!