lainsce / quilter

[DEPRECATED] Focus on your writing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autosave does not seem to work

razmarques opened this issue · comments

It seems that the autosave feature does not work properly. Here's the behaviour I got:

  1. Open App,
  2. Type some text,
  3. Save as to some location
  4. Type some more text (with the autosave feature activated)
  5. Close App
  6. Open App
  7. Text introduced in 4) isn't there

A more extreme case occurred where I typed text on a big document, exited expecting autosave would saved it. Then, opened the App, and it was all empty!

I believe this worked at some point but now it got quite unreliable. Another interesting observation is that when I open a document, I used to see the full path to the file in the top bar. Now, independently of which file is open it always "No documents open"

commented

Are you updated to the latest release? People had this exact same bug on a previous release.

I believe so, but I'm not able to tell for sure, running the following in the terminal:

~$ com.github.lainsce.quilter -v
Quilter - Copyright 2017-2020 Lains

Also I don't find any menu in the App showing this info, however in the AppCenter (elementary OS) I can say I don't have a pending update. Searching for Quilter it seems I have 2.5.1

commented

Could you try something for me?

Close any Quilter you have open,
Install Dconf Editor by issuing sudo apt install dconf-editor,
Then, go com→github→lainsce, then right click on quilter, and click on "Reset Recursively",
There'll be a checkmark button along the bottom, click that,
Now open Quilter and do your things again.
Don't forget to remove Dconf Editor to prevent any misclicks.

Does the bug persist after this?

Unfortunately it didn't work. It gives me the exact same behaviour. I am thinking of reinstalling Quilter and deleting ~/.local/share/com.github.lainsce.quilter (just to be sure to get a hard reset). But if this works you probably won't know what was causing this. Would you like me to try anything else before trying this?

commented

I saw what this was, the autosave triggers every 30 seconds to save disk writes from trashing your HDD or SSD. When you close too fast after saving as, it doesn't even have time to write any other changes when autosaving. So I recommend issuing Ctrl+S if you need a save faster.

This fixes the bug.

You're right, waiting 30 s will save automatically saves the changes.
But is this a bug, or the expected behaviour? If it is a bug, using Ctrl+S won't fix, just provides a workaround. I say this because in Preferences -> Editor -> Save files when changed, seems to imply that if a file is changed, the content is saved, which is not strictly the case. The user doesn't know has to wait 30 s.

If it is not a bug, but the expected behaviour may I suggest changing the option "Save files when changed" to clarify the behaviour?

I don't mean to be pushy. I really like this app and would love it to keep improving. You've made a great job here and it is actually one of the few apps in AppCentre which I have supported financially.

commented

It is expected behaviour, and I will change the copy to specify that the autosave takes place every 30s in a explanatory label below the preference.
Expect this to be in 3.0.0 however.

Edit:

This is how the autosave part of the preference dialog will look like (in Text-Mockup):

Autosave opened document:          (  O)
With autosave enabled, save every: [ 30 | - | + ] seconds.
Warning: values below 15 seconds may affect your storage medium negatively.

The seconds label & spinbutton and warning label will show only if the switch is on.

Thanks for considering it for improvement and for showing your ideas! It looks neat.

Looking forward for the update!