-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Position of context and project tags should be respected in file #370
Comments
@thewholelifetolearn thanks for pointing it out. Unfortunately there is nothing we can do at this moment, as the parsing is done by a library, which doesn't respect the arrangements in the file. There is an issue here and also in the respective library: #68 |
There is indeed already an issue in Sleek regarding the position in the display. My issue is about the position in the file. Sleek is a tool mostly to display the content of the file. It should not alter the content. In this case, the content of the file is not what I have submitted. That means that even if I use an other tool on the same or other platform, the display will stay incorrect. |
Complete disaster. Opened my todo.txt once with sleek and all entries scrambled already. Quite a lot turned from readable into a riddle. Edit for clarity: I agree that sleek just showing it that way would not be a problem, but it rewrote my whole todo.txt. |
I'll take another look into what we can do about it and put it on the backlog. |
@aubreyz @aurisnoctis @thewholelifetolearn We can approach this step by step. First we should limit the file writing in order to just edit single lines and not the whole file. But as long as we're using the jsTodoTxt library for parsing, newly added todos or todos, that are edited, will continue being rearranged. I did some minor changes to the file handling in sleek and created a pre-release. This release should not alter your todos, unless you edit a single one of them. In this case the todo will be rearranged and written to file. The same goes for new todos. Please feel free and help me give it some proper testing, you can download the release here: https://github.com/ransome1/sleek/releases/tag/v1.2.2-rc.2 Be aware that there is still work to be done on the archiving function. Archiving still does alter the whole todo.txt file according to jsTodoTxt specs. Second, I'm still hoping there will be some work on this anytime soon at jsTodoTxt. Here is the corresponding issue in case you want to be in the loop: jmhobbs/jsTodoTxt#5 |
Hi @ransome1 and thanks for the quick test version. Indeed, the order of words and symbols in the existing lines in the todo.txt are now preserved. New tasks created in sleek are still scrambled directly after saving them to the todo.txt file. The upper "anna" line was created in the new version of sleek, the lower line was typed with an editor directly into the todo.txt file. The rearrangement to the end of the line seems to leave too many blanks behind. In the todo.txt, the lines not created with sleek remain in the correct order so far, also after a new start and also after starting to edit a line, but cancelling the process. |
@aurisnoctis in order for the rest to work, we need to wait until jsTodoTxt has been enhanced unfortunately. |
Ok, for the moment I am back to https://github.com/QTodoTxt/ but will keep an 👁️ on you every now and then. Thanks again for your quick response! |
I haven't yet dug through the code and understood how the parser is used in sleek, but in Markor, we just keep the todo item string intact through parsing. Would it be possible to do this in sleek too? i.e. for each line, parse using the js library to extract the contexts, due date etc etc while keeping a copy of the full task string. It isn't a full fix - changing the task will still result in it being re-written with the contexts and projects in the end, but tasks which are not modified will be unaffected. |
@harshad1 yes this is possible and actually one of the solutions I've been looking into already. As I'm afk at the moment I can only continue working on this from October on. So please stay tuned. |
Awesome. I can try to help, but I have basically zero JS experience, so I'm not sure how useful I'll be.
Sep. 16, 2022 07:39:48 ransome ***@***.***>:
… @harshad1[https://github.com/harshad1] yes this is possible and actually one of the solutions I've been looking into already. As I'm afk at the moment I can only continue working on this from October on. So please stay tuned.
—
Reply to this email directly, view it on GitHub[#370 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAOZ3TELL3TEWRBNZZXCYY3V6SBDHANCNFSM5T4PZEZA].
You are receiving this because you were mentioned.[Tracking image][https://github.com/notifications/beacon/AAOZ3TGHQQDDXVQCEBIMWJLV6SBDHA5CNFSM5T4PZEZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJJ4SSHI.gif]
|
@thewholelifetolearn @harshad1 @aurisnoctis @aubreyz I looked into it a bit further and applied some changes. The issue has not been fully solved, though. In this pre release sleek will not rearrange todos anymore if you just open and rewrite them using the interface. The only times todos will be put into the todo.txt parser (this is the part where todos are being altered, unfortunately) is when you
As you see there is still work to do, but the most critical issues have been solved – theoretically. I could need some help of you guys on the testing. It would mean a lot to me, if you could download the latest pre-release (https://github.com/ransome1/sleek/releases/tag/v1.2.2-rc.4), backup your data and start testing the changes. |
Hi @ransome1 ! Thanks for working on the issue. I am back on https://github.com/QTodoTxt (QTodoTxt2, the re-write of it), contributed some code there and that satisfies my needs completely at the moment. |
First impression is very good! Word order keeps fine. |
I agree, but there is so much else to do before I could take care of that. But stay tuned. |
This should now be happening in 1.2.2. I'm closing here. If you find any issues, let's discuss them here and reopen if necessary. |
Describe the bug
When project tags and/or context tags are used in the task, they appear in Sleek at the end of the line but also in the saved file
To Reproduce
Steps to reproduce the behavior:
Expected behavior
At least the file should respect what the user entered in the form. The tags should be placed as written by the user.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: