Skip to content

When a scene changed in two places

Sometimes a scene has changed in two places since they last matched: in the copy on this computer, and in your project folder. Leafbind never decides between the two, and it never throws either away. It asks you. Whichever version you choose, the other is kept in the scene’s history, so you can always get its words back.

You write into the copy on this computer, and Leafbind carries your changes to the project folder by itself (see When your project folder is written). A scene ends up changed in two places when something else changes the folder’s copy before your own changes have gone across. Usually that is one of these:

  • Two computers. You write on the laptop on the train, then open the desktop at home and start typing in the same scene before your sync app (Dropbox, OneDrive, Google Drive) has brought the laptop’s version across. When it arrives a minute later, the scene has changed in both places.
  • Another program. You change the scene’s file in another editor while Leafbind has it open, and type in Leafbind as well.

Leafbind doesn’t decide by which file looks newer. A sync app may give a file the time it was saved on the other computer, which can be older than what you just typed here. Instead, Leafbind compares both copies with the last version the two agreed on:

  • Only the folder’s copy changed: Leafbind takes it, without asking.
  • Only this computer’s copy changed: Leafbind sends it to the folder.
  • Both changed: Leafbind asks you, and changes neither until you have chosen.

The window One thing is waiting for you opens, with the scene under ▲ Waiting for you: changed here and in the folder, differently. If you are typing, it waits until you pause. If the scene is open, a line above the text says what happened to it: changed here and in the project folder, removed from the folder after it changed here, or one of the other cases below.

Until you choose, nothing is overwritten. Other scenes are not affected, and they go to and from the folder as usual.

If the two versions stop disagreeing while the window is open, for example because you made them the same in another program, the scene leaves the list within about a minute and the window says it settled by itself.

The row has three buttons, each version’s answer on its own side, as in the comparison:

  • Keep this computer’s sends this computer’s version to the project folder.
  • See what differs shows the two versions side by side: this computer’s on the left, the project folder’s on the right. Look here first. A file name can’t tell you which version to keep. How to read it is under Reading the comparison.
  • Take the folder’s replaces this computer’s version with the folder’s.

If Leafbind is busy with the project folder when you choose, a bar moves above the buttons until your choice has gone through. On a slow drive that can take a few seconds.

When nothing is left to answer, the window says Nothing to do and closes itself after five seconds. A bar shows the time left, and the window stays open while you move the pointer over it.

The comparison has Keep this computer’s and Take the folder’s too, under the column each one keeps, and Not now, which leaves the decision for later. Leafbind asks again the next time it compares with the folder, usually within a minute.

The comparison follows both files while it is open. If either changes, for example because you save the scene in another program, it shows the new text within a few seconds and says which version changed. A choice is never applied to text you haven’t seen: if a version changed after you last looked, Leafbind shows you the new one and waits for you to choose again.

Leafbind can’t combine two versions yet. The version you keep replaces the other one whole. The one you don’t keep is saved in the scene’s history, on this computer, marked Not kept when two versions differed, unless that exact text is already a version there. The one you keep follows it, marked Kept when two versions differed. Nothing you choose here is lost for good.

When each version has something the other needs (a paragraph written on the train, a word changed here), keep one and carry the other’s changes across:

  1. Click See what differs and work out which version holds more of the work. Usually that is the one you have been writing in.
  2. Keep that one, with Keep this computer’s or Take the folder’s.
  3. Open the scene, then its properties panel with Ctrl+Shift+T. Under Versions, the newest is Kept when two versions differed, and just below it is Not kept when two versions differed.
  4. Click Not kept when two versions differed, then Expand, and switch to Compared with now. That shows exactly what the other version has that your scene now doesn’t.
  5. Copy those passages into the scene.

Don’t use Go back to this version for this. It would bring back the other version whole and undo what you just kept. (It can be undone the same way, but it isn’t what you want here.) More about versions: Go back to an earlier version of a scene.

If the drive or synced folder goes away while a scene is waiting, the row says so in orange, for example ▲ T: isn’t reachable. The buttons go grey, because each of them needs the folder. In See what differs, the folder’s column is dimmed: it shows the folder’s version as it was when you opened the comparison, but that version can’t be taken right now.

You can choose a version once the folder is back. Nothing is overwritten until you do, and the buttons come back by themselves.

Should you keep writing in that scene meanwhile? Better to work on other scenes. Until you choose, every change you make to this scene is more to carry across by hand if you end up taking the folder’s version. If you already know you will keep this computer’s, writing on is harmless.

The same window can ask about a scene that is gone from your project folder, and Leafbind did not remove it: something outside Leafbind deleted or moved its file. Leafbind doesn’t follow an absence on its own word, so it asks:

  • Delete it here too deletes it the way Leafbind deletes anything: it goes to the recycling bin, where you can restore it.
  • Put it back writes this computer’s copy back to the project folder, exactly as it was.

While the folder is away, Put it back waits for it. Delete it here too works at once.

  • Before you leave a computer, glance at the status bar. When it no longer counts documents as waiting, the project folder has everything. Your sync app can take it from there.
  • On the other computer, let your sync app finish first. Once it shows it is up to date, open Leafbind. When it opens a project, Leafbind compares with the folder before you start writing.
  • Edit a scene in one program at a time. If you change a file in another editor, close the scene in Leafbind first.

None of this is needed to keep your words safe. When two versions do collide, Leafbind asks instead of overwriting, and keeps both.