omission (bug?) potential data-loss

Asked by HansBKK on 2011-12-22

Not sure if this has been reported as a bug yet, but IMO it should be fixed ASAP.

Mistakenly entered data in the wrong day, no problem, cut the block (very important original content, hours of work, not stored anywhere else)

Go to the correct day and paste - whoops, got some old stuff from my last clipboard operation, must not have actually cut the text, slip of the fingers no problem right? Just Ctrl-Z, undo a couple of times.

Huh? Undo doesn't work? Or it just has a single buffer stored, or?

Oh well no problem, just quit without saving, might lose some work but at least I'll get my VIP stuff back.

What?? Automatic save without asking the user?

Fail. 8-(

OK, for others browsing this before it gets fixed, here are some workaround solutions in the meantime:

  - Keep your data folder in version control and commit your changes frequently.

  - As soon as you realize you've lost data

    - Don't quit RN, or save from the menu of course - thank god at least you don't have autosave

    - Open up the data folder and copy and paste the current month's txt file "Copy of 12.txt".

    - Go back and save your data, then quit RN
      - or just quit, since that does an auto-save for you without asking anyway 8-)

    - Open up your favorite diff tool and move your lost data from "Copy of" to the real data file
      - make sure to also preserve other changes made since the last save!

  - For users that don't keep their normal day-to-day writing in a version control system, and don't know from diff:

    - Copy and paste, never cut.

    - If difficult to navigate back, add a string like xxxxxxx before and after what you copied
      - you can search for this when you come back to delete the block once it's safely in place in the new location.

  - Use a different tool for the job (no thanks)

or just

  - Never let your fingers slip (good idea but 8-)

I'm not sure if all the above comes off as light-hearted as I intended, because it's true I think this is a mistake that needs to be fixed ASAP.

 The ideal would be to just keep an unlimited buffer for undos for the current working session. Or at least a few?

And ask the user about saving changes IMO.

And if you do have any auto-saving going on, turn that off by default, let the user decide - actually all these should be user-configurable with sensible (i.e. data-safe not "user-friendly") defaults.

Take all this for what it's worth, just my 2ยข, and as anyone can figure out by my taking so much trouble -

I do happen to use VCS for all my day-to-day writing - in this case it wouldn't have saved me, the VIP text was created since my last commit. Fortunately I did the switch and diff routine because I guess I subconsciously realized that RN had never asked me "do you want to save your changes?" So I actually didn't lose any data.

I love this software, such a kewl tool!

Thanks again for making such a valuable contribution and giving it away freely.

Question information

English Edit question
RedNotebook Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Jendrik Seipp (jendrikseipp) said : #1

Thanks for bringing that up. I'll definitely have to implement undo
buffers for each day.

HansBKK (hansbkk) said : #2

Thanks, look forward to being able to relax a bit more about my content.

Obviously I have no clue about the coding side, but that never stopped me 8-)

Couldn't it be done on a per-file basis (month?) rather than the day structure (presumably in memory?

Just saving a .bak file each time would be low-hanging fruit, quick and easy.

Heck do that anyway even if you're doing the other, no downside.

Some apps let you just spec a backup folder and a number of versions per file to save

Here's TiddlyWiki's naming convention:

Jendrik Seipp (jendrikseipp) said : #3

hmm, I like your auto-backup idea as most users forget to do those
backups themselves.

HansBKK (hansbkk) said : #4

but it should do the rotate/delete archive thing, as even more users won't clean up until the disk fills up <g>

I believe this algorithm is what my TiddlyWiki uses:

obviously in Javascript, but maybe you could use the same logic.

Key is letting the user specify the folder location, perhaps in the text suggesting that they spec a path to another HDD if they have more than one, but giving a sane default, maybe ./backups under the main data folder?

HansBKK (hansbkk) said : #5

Not sure why this is marked as "solved" - has it been?

Jendrik Seipp (jendrikseipp) said : #6

This message has been marked solved, because the bug is now tracked in the bug tracker.