Skip to content
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

Feature Request: AutoSave and Revert Button #7

Closed
sahil48 opened this issue Feb 25, 2018 · 7 comments
Closed

Feature Request: AutoSave and Revert Button #7

sahil48 opened this issue Feb 25, 2018 · 7 comments
Labels
feature This is a completely new feature for Zettlr.

Comments

@sahil48
Copy link

sahil48 commented Feb 25, 2018

Please add an option to autosave documents when edited, so that I do not have to explicitly click the save button. If anything, I would want a revert button to undo autosaved changes since I last clicked the save button. It's more likely that I want the document saved when I exit, and very infrequently, I want to revert those changes when I mess up my document.

@nathanlesage nathanlesage added the feature This is a completely new feature for Zettlr. label Feb 25, 2018
@nathanlesage
Copy link
Member

Auto-save can be implemented. I'm not sure about how long it may take, as there are other, more pressing problems, but it's noted.

And what do you mean by revert? Revert as "Undo" in the editor, or rather different versions of the same file, ready to be loaded, e.g. as in version control systems? I'm unsure whether or not it fits into the app, because I personally use it with cloud services that offer that functionality out of the box. Some use cases to describe what you were thinking of?

@sahil48
Copy link
Author

sahil48 commented Feb 25, 2018

A lot of times, I think I have a great idea, and then realize after a while that it wasn't such a great idea and I want to start from where I left off. Or you're writing and writing, and don't seem to be getting anywhere and want to start over from where you were before in a different direction. Usually occurs over 5 or 10 minutes (happens a lot when writing emails or last minute drafts). So, I'm not looking for a version control system, and I agree that should not be in the scope of the app, but something that reverts what you edited since the last time you did a hard save. I would be open to having a temporary file with the last hard saved content in the same folder.

@nathanlesage
Copy link
Member

Ah alright, then I'll get into it in the next days! I think this should be pretty easy to accomplish. The easiest way would be to simply save the original file contents in a variable to be recalled if one wishes.

That means, the revert feature would work like this:

  1. Open a file.
  2. The file will be temporarily saved in memory, and displayed as well.
  3. You edit it, save it, etc. pp.
  4. You realize you want to revert all you've added, so you click "revert".
  5. The app overwrites the editor's contents with the old data, and lets you then save to overwrite.

Or, should it always replace this reversion status on "hard saves" as you've called them?

@sahil48
Copy link
Author

sahil48 commented Feb 25, 2018

Let's stick with temporarily saved in memory for now, and explore the need for other options later.

@nathanlesage
Copy link
Member

nathanlesage commented Feb 25, 2018

Alright, it's noted. After I've managed the inline image previews and hardened the regular scans for changed folders and files, I'll get to it. I hope that this will be in the course of next week

And concerning my question, which version should be held in memory: The one from when you opened the file or the status that the file had on each "hard" save?

@sahil48
Copy link
Author

sahil48 commented Feb 25, 2018

"hard" save.

@nathanlesage
Copy link
Member

Alright. I think I'll simply do both and let the user decide in the settings (a.k.a. "What should the revert button revert to?")

nathanlesage pushed a commit that referenced this issue Jun 24, 2021
- Issue #7: Add show Zettlr window event to MacOS/Linux
nathanlesage pushed a commit that referenced this issue Jun 24, 2021
Pull Request For Issue #1, #2, #4, #7, #8, #9, #28 AND fix issues according to @cskeogh's reviewing comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is a completely new feature for Zettlr.
Projects
None yet
Development

No branches or pull requests

2 participants