-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Auto/manual save within editing mode or narrow mode #126
Comments
This is a consequence of the current architecture. Changes in the narrowed view aren't "applied" to the original file until you exit the narrowed view. Narrowed views are not considered "saveable" because they are completely divorced from the context of their originating file.
This shouldn't happen. I have taken precautions to ensure that the narrow state and editing state are preserved and restored even if the app is ejected from memory. If that's not working for you then please let me know so I can fix it. (I did just discover that after restoration you must make at least one additional edit to the content in order for it to save correctly; this will be fixed in the next version.) Do you really need to be able to save while narrowed, or are you just concerned about data loss? |
I'm concerned only about data loss, the manual save functionality isn't necessary for me if data integrity is ensured. If I'm in edit mode and do some edit, and I close the app from the recent apps (removing it from memory), when I open it again I see the "Recent files" view |
Manually removing it from memory is different from being ejected from memory by the system. State restoration only works on the latter. To test it you can enable the "Don't keep activities" system debug setting: https://developer.android.com/studio/debug/dev-options
|
Yes, that should be working. The problem I see is that it's inconvenient to need to get out of editing and narrowed mode so that the save is applied, as I'm used to compulsively saving progress in emacs and vim on the laptop. Also, it can happen that when doing app switching while narrowed after editing I forget to come back to save progress and remove the app from memory manually. |
There are various architectural problems that make it difficult to allow persisting to disk when narrowed. My feeling is that thorough and rigorous state restoration is sufficient, so I am not inclined to look into this further at the moment.
Manually removing apps from memory like that is not recommended (see here, here, here, etc.) so in my opinion this is borderline operator error. |
Currently autosave only seems to occur when exiting edit mode and all narrow modes, which I find a bit inconvenient: if I want to save and keep editing, I must exit edit mode, narrow mode, and then look again for the section I was editing to get into narrow mode and edit mode again. Also, many times I want to switch apps while editing within a narrow mode and there's the risk that the app gets closed and changes are lost.
I think it would be better if autosave is triggered every time one exits from edit mode. Maybe it would also be convenient to have a manual save option within edit mode?
The text was updated successfully, but these errors were encountered: