-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Many advanced searches descrbed in the wiki do not seem to work #647
Comments
@zerodat if you can find some time, maybe you could check out these ones here. |
solves filter bug due to todoObject.toString, issue #647
@andrei-a-papou there are actually a few different things going on here. First of all, there was a bug which prevented regex and string matches from working. That is fixed in PR #652 which I've merged into the filter query execution code. The old code was broken when sleek v2 changed the method of getting the text of a todo from That solves your case 1, and also helps make case 2 work. But your query syntax in case 2 is actually a little wrong. To match a literal string in advanced query mode, you need to enclose the string in quotes. So for instance you should find that In your case 3, I think what is happening is that the necessary javascript function |
The whole module has been rewritten and lives now here: https://github.com/ransome1/sleek/blob/main/src/main/modules/ProcessDataRequest/CreateRecurringTodo.tsx. The addition of the interval value is done here: https://github.com/ransome1/sleek/blob/fcf9a4caf5e8310874ebf7b0f5565b308c89da34/src/main/modules/ProcessDataRequest/CreateRecurringTodo.tsx#L25C7-L25C26 The new recurrence implementation needed some iterations until it worked like defined in the wiki. It started off with some flaws in 2.x and has then been fine grinded over the course of this thread: #611 Let me know if you find any indications, that the recurrences are not working as expected. |
Thank you, @ransome1! The new function |
@zerodat Thanks for the explanation. I'll test things out when I get the chance. But I do think it's not very intuitive to have to quote a string for it to be treated correctly. I think users expect the software to just "do the right thing" here. All the more so when there's no match highlighting or any other kind of feedback when no match is found and you are left scratching your head as to why :) |
The result of the current implementation can be tested in this pre-release: https://github.com/ransome1/sleek/releases/tag/v2.0.9-rc.1 |
@andrei-a-papou would you show us the raw text that is in your test todo.txt file? It works correctly for me based on what you seemed to have in your screenshot, but matching for a single letter can give surprising results, for instance if you match a priority letter, a letter in a keyword field, and so on. Thanks, -- zerodat |
Here you go:
|
Hmmm. Interesting. @andrei-a-papou when I test using that data and the pattern This is on Linux using the latest version of the sleek code. |
I'm using 2.0.13 on Linux and also observe bugs in searching.
also simple negation doesn't work like |
@amariusz something does seem to be broken in 2.0.13. I'll look into it a bit. |
@amariusz this is puzzling. When I download the sleek-2.0.13.AppImage, it has the buggy behavior that you described. But if I build the same version from the github repo, it seems to work correctly. You can try it yourself on linux, like this:
That will build you an new AppImage from the source and execute it. When I did this, it did the searches correctly. Perhaps something went wrong in the creation of the official releases. I'm curious to hear whether it will work when you try it. |
@zerodat thanks for the info and instructions. I've followed them and have the same results. I've tested (BTW I realized that quotes are also necessary for NOT to work, but on official build it wasn't working anyway) |
@amariusz thanks for testing and confirming that! I think next we need help from @ransome1 to diagnose why the official builds are not working properly. I can't reproduce the problem on a fresh build, so I can't debug it. I wonder if it is possible that the official build is pulling in an old or stale version of the FilterLang.js file (rather than regenerating from the FilterLang.pegjs source code)? |
I have no idea but apart from buggy behaviour that's also a potential security issue to investigate. I agree @ransome1 is right person to look into that :) |
@amariusz @zerodat I'm afraid I can't be of big help at the moment due to private reasons. I'm not sure if I changed anything in regards of the search. I share the feeling Zerodat has, that it might have something to do with the pegjs hasn't been regenerated properly. Can I ask you to queck the latest pre-release real quick. And let me know if this happens there as well? Since I havn't received any bug reports related to it, I can push it to production and release it rather soon. |
Searching in sleek-2.0.14-rc.1.AppImage behaves like official 2.0.13. No improvement here. |
Some examples:
/.*window.*/
. This matches nothing, but I have four todos with the word window in them. If I just type window into the search field, I catch them all.window +sleek
matches nothing, but I have three todos with the word window in them that have project+sleek
assigned to them.window and +sleek
doesn't show anything either.due: <= tomorrow+1d
doesn't match todos that are both overdue and are due by the day after tomorrow.due: <= tomorrow
works as expected.There are more examples but perhaps it would be more efficient to deal with them iteratively or create an auto-test?
The text was updated successfully, but these errors were encountered: