Skip to content
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

Allow for regex in tag search #305

Closed
SterlingHooten opened this issue Sep 22, 2022 · 4 comments
Closed

Allow for regex in tag search #305

SterlingHooten opened this issue Sep 22, 2022 · 4 comments

Comments

@SterlingHooten
Copy link

I see from #145 that there's the possibility for tag hierarchy support, but this seems to require explicitly denoting tags as a group prior to executing a query.

What I'd like is to be able to match tags like "emacs" and "emacs_org" with a wildcard. The default org search can do this with {^emacs.*} but it looks like org-ql's syntax only accepts strings for tag searches.

Is there a way to search through tags using regular expressions instead?

@akirak
Copy link
Contributor

akirak commented Sep 22, 2022

@SterlingHooten There is tags-regexp predicate. I think it is exactly what you want.

@SterlingHooten
Copy link
Author

SterlingHooten commented Sep 22, 2022

Thank you! That's exactly it, don't know how I missed that in the documentation.
I was able to use helm-org-ql-agenda-files with query tags*:^emacs.* to retrieve headings tagged with either "emacs" or "emacs_org". Likewise org-ql-search returned the same results with the sexp version (tags-regexp "^emacs.*").

@alphapapa
Copy link
Owner

@akirak Thanks for helping with this.

@SterlingHooten Is there anything else to be done on this issue?

@SterlingHooten
Copy link
Author

@alphapapa No, you can close it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants