How to save version

Hello,
How can I quickly save a version of my draft before embarking on major changes like sorting (which just messed up a draft I now have to rewrite). Note that undo command did not work
thank you

I am replying to myself. I will try to create an action using draft.saveVersion(); kindly recommended by @sylumer

Drafts should save versions automatically. I think this generally occurs when you navigate away after making modifications.

But to force one, a simple action is absolutely the way to go :sunglasses:

1 Like

I wrote my first action (save version) thanks (and only thanks) to your previous post.
I very much enjoy your scripts. Would you have any suggestion for someone with an IQ in the low Neanderthal range who would want to understand the basics of scripting to create actions ?

If all you want to do is a create a duplicate version of the draft in its current state ahead of editing, just long-press on the draft in the list until green circle with with cross appears. Drag it in the list, let go, and a duplicate will be created. Works on iPhone or iPad. No action required.

1 Like

@TDK_SA90 - do you see there being a notable advantage to that approach over a version action?

Note that navigating away and back should version a draft that has been edited; which is the comparable non-action approach.

Only in the sense that at least I know Iā€™ve got a backup. I must admit Iā€™ve never really understood the basis by which versions get provoked into creation at a system level. Iā€™ve happily edited and gone back to a draft and still found a version count of zero. Hence my ā€œbelt and braces,ā€ approach. If an action can reliably invoke the creating of a version, then, yes, thatā€™s great.

thank you for the info about a duplicate which in terms of workflow is different from a version but also useful.
Did you find it out by yourself or is all this in the manual ?

@agiletortoise - can you clarify what the criteria are for when Drafts should automatically instigate a backup of a draft?

Today for instance. Quite a few edits, in and out of a draft. No new version produced for 15 mins. Then, it resumes producing new versions on a minute by minute basis upon edit. Thatā€™s why I regard it as a ā€˜nice to have,ā€™ rather than wholly reliable, as the versioning, in my experience, seems to be rather fitful.

I think this was probably a tip tweeted by Greg or in one of those rather long reviews of Drafts 5 available on interwebs.

1 Like

Sounds like you have had significant issues with it in the past. Did you ever raise this as an issue with any of the releases? If not, Iā€™d strongly recommend doing so. To date Iā€™ve not had an issue with versioning, but most of my drafts content is fairly transient in nature, so versions arenā€™t a daily driver for me.

Itā€™s not a major issue for me either, so have not flagged to support. Itā€™s just a behaviour Iā€™ve noticed. Syncing works fine and is rock-solid across my devices so thatā€™s all Iā€™m really concerned about. If I am making wholesale edits to a draft (not that often), I do the ā€˜drag and dupeā€™ just to ensure I know Iā€™ve got a reference draft I can return to.

Itā€™s probably something that could use an audit pass. Drafts tries not to create excessive versions. It generally should create one when you select a different draft, or end an editing session - but only if changes have been made.

There are some other triggers, like running actions, doing a find-replace, etc.

2 Likes

In reading through this thread, it strikes me that ā€˜New Draft Afterā€™ (in settings) in combination with ā€˜Focus Modeā€™ might have something to do with how often versioning happens? Especially if weā€™re staying within the specific word-usement structured by @TDK_SA90

If, in fact, you have ā€˜New Draft Afterā€™ set to 15 minutes, I would be interested to know. I have often wondered how these two settings work together since they are set aside in their own section in the settings.

As a side note to @lucas222,

Iā€™m not sure, but it seems that maybe you did not get the answer you needed?

Drafts creates a version of your Draft frequently. To find these versions, look for the ā€˜informationā€™ icon in the upper left (it is a lowercase letter ā€˜iā€™ inside a circle.) tap that, and in the list of information about that draft, you should see the word ā€œversionsā€ with a count of the number of versions that exist for that Draft:

I hope that helps, and that you can still recover the original version of that Draft you mention you had done such work on! To save an earlier version off to its own Draft, I would guess ā€œselect allā€ copy + paste would work the easiest, but I could be wrong, maybe thatā€™s not even necessary?

1 Like

thank you for your interesting comment.
I think that saving a version is too important to be left up to the system.
How can the app guess that I am in a critical stage of writing, or too many versions are generated. My solution was to create my own action associated with the Cmd-S shortcut, which consists of one line for which I must give @sylumer credit:
draft.saveVersion();
It works perfectly.
thanks again

1 Like

Glad you got what you needed!