Coder Social home page Coder Social logo

Comments (7)

nathanlesage avatar nathanlesage commented on May 18, 2024 1

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?

from zettlr.

nathanlesage avatar nathanlesage commented on May 18, 2024

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?

from zettlr.

sahil48 avatar sahil48 commented on May 18, 2024

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.

from zettlr.

sahil48 avatar sahil48 commented on May 18, 2024

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

from zettlr.

nathanlesage avatar nathanlesage commented on May 18, 2024

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?

from zettlr.

sahil48 avatar sahil48 commented on May 18, 2024

"hard" save.

from zettlr.

nathanlesage avatar nathanlesage commented on May 18, 2024

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?")

from zettlr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.