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

heading search case sensitive #114

Closed
bitclick opened this issue Apr 29, 2020 · 5 comments
Closed

heading search case sensitive #114

bitclick opened this issue Apr 29, 2020 · 5 comments

Comments

@bitclick
Copy link

this is not a bug i think, but a case of user-confusion ;-)

in helm-org-ql the query for the heading-text is case-sensitive. Is it possible to make it case-insensitive without adding lots of regex-sugar to the query? maybe provide an argument for the function.

CONTEXT:
I am trying to implement a quick way to jump to PROJECT headings (keyword PROJECT). in helm-org-ql i can search for

todo:PROJECT build house

which finds

  • PROJECT build house

but not

  • PROJECT Build house

am i missing something? maybe helm-org-ql is not the right tool for this. i tried helm-org-rifle and helm-org-agenda-headings with no luck.. i did not find any documentation on how to preinsert my keyword-query or a custom filter function. i would like to have a binding to quickly search for a project heading an jump to it.

any ideas are much appreciated :-)

@alphapapa
Copy link
Owner

alphapapa commented Apr 29, 2020

in helm-org-ql the query for the heading-text is case-sensitive.

No, it's not. Maybe you have changed the value of case-fold-search in your Emacs config.

i did not find any documentation on how to preinsert my keyword-query or a custom filter function.

You could define your own Helm command, modeled on helm-org-ql, and set the helm function's :input argument to "todo:PROJECT ".

@bitclick
Copy link
Author

thanks for the fast reply! sadly no luck :-(
i checked case-fold-search and some other ones helm-case-fold.. etc.

The query todo:PROJECT build does not find * PROJECT Build House,
the query todo: build does find it. As soon as i specify a keyword, the search becomes case-sensitive.

org-ql-search shows the same behavior while the non-org-ql helm-tools (for example 'helm-org-in-buffer-headings`) don't (they are case insensitive).

Creating my own search function with :input was easy though ;-) now it's only the case-fold-confusion.

Any ideas? (i am on up-to-date spacemacs with up-to-date packages, also latest org-ql)

@bitclick
Copy link
Author

i checked the sexp-query and get the same behavior (in org-ql-search):
(and (todo "PROJECT") (r "build")) does not find * PROJECT Build House but
(and (todo "PROJECT") (r "Build")) does.

@alphapapa
Copy link
Owner

Thanks, you did discover a bug in the case folding. It should be fixed now. Please let me know if it works for you.

@bitclick
Copy link
Author

bitclick commented May 1, 2020

jep, it's working great. thanks!

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

No branches or pull requests

2 participants