ransome1 / sleek

todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)
https://github.com/ransome1/sleek/wiki
MIT License
1.34k stars 104 forks source link

Fix for issue #311 #435

Closed zerodat closed 1 year ago

zerodat commented 1 year ago

This is a change to the filter query language to address issue #311 . The change is to use "due:" and "t:" as keywords rather than just "due" and "t". NOTE: this is NOT BACKWARD COMPATIBLE, so people who use the query language will have to change the queries that they type. We don't store those queries yet, so this is just a matter of remembering to add the colons when you type in new queries.

For example:

old query due > tomorrow+3d becomes new query due: > tomorrow+3d

old query t <= 2022-11-01 becomes t: <= 2022-11-01

We should amend the filter query documentation to reflect this change.

ransome1 commented 1 year ago

@zerodat thanks for the PR. I merged your changes and built them into 1.2.9-rc.1. Could you double check please, if everything is how you wanted it? https://github.com/ransome1/sleek/releases/tag/v1.2.9-rc.1

zerodat commented 1 year ago

@ransome1 it isn't working for me. It seems to behave the same as the prior versions. Can you check that the generated file filterlang.mjs was really regenerated from filterlang.pegjs? filterlang.mjs is NOT a source file and it should not be checked into git, but rather, it should always be regenerated from the latest filterlang.pegjs. That's the most likely explanation for why it isn't working, I think. Thank you!

ransome1 commented 1 year ago

@zerodat for some reason Electron Builder was not generating the pegjs file while building with Git, although I thought I instructed it in package.json. Anyway, I regenerated it manually and tested it locally. I think it now works. I will add it to the next release pre-release. Sorry for the hassle.

zerodat commented 1 year ago

Thank you, @ransome1! One thing you could try is to git rm src/js/filterlang.mjs and also add that file to .gitignore so we can try to make sure that it is never added to git or checked out of git, so it will have to be generated from the pegjs file. I think I tried to do that a long time ago, but somehow it crept back into git later.

ransome1 commented 1 year ago

Thank you, @ransome1! One thing you could try is to git rm src/js/filterlang.mjs and also add that file to .gitignore so we can try to make sure that it is never added to git or checked out of git, so it will have to be generated from the pegjs file. I think I tried to do that a long time ago, but somehow it crept back into git later.

I will add the file to the ignore list.

Can you check if your fix is now present in https://github.com/ransome1/sleek/releases/tag/v1.2.9-rc.1?

zerodat commented 1 year ago

Hi, @ransome1. I think you meant https://github.com/ransome1/sleek/releases/tag/v1.2.9-rc.2 and yes, it looks like the fix is working in that version now. Thank you!