Auto-reload files, if changed on drive?

Let a document be

  • stored on Dropbox,
  • opened on both a Windows PC and a Linux PC.
  • saved, or at least auto-saved, after every edit before anything is done on the other PC.
  • generally not closed before switching PCs.

What is the best way to avoid creating conflicting versions or lost content?

By default, the behavior currently is this:

  • On Windows, the Libreoffice retains a write handle to the file, which blocks Dropbox from updating the file from the cloud.
  • On Linux, Dropbox can update the file from the cloud, but Libreoffice won’t detect, that the file contents have changed. Saving potentially overrides the changes.

Ideally I would like the behavior to be the following:

  • No file-locks on the document or it’s auto-save file.
  • If the file, or its auto-save file, is updated by Dropbox, Libreoffice should detect this and either
    • Auto-reload the file, if there were no changes since the save/auto-save
    • Offer to reload the file and discard edits, if there were.

This is roughly the behavior that I see e.g. with LyX and Emacs.

Is there some way to obtain this for LibreOffice?

No - unless you file an enhancement request, and ideally implement it.

Note that “auto-reload” is bad. It may work in simple text editors like Emacs, where it’s trivial both to reload, and to re-position. But not in LibreOffice. Reloading may take a big time; after loading, there may be a lengthy background repagination; and both make auto-reloading unwanted. If at all, a warning could be implemented.

Note that the fix to tdf#47065 could be used as a guideline, which implemented tracking when files become available for editing.

Maybe switch to something designed more for usage “in the cloud” like

.
I have not tested the options for concurrent editing, as “we” use only MariaDB for multi-user edits, so I can’t comment on usability.

As PS:

I think this will not update the file itself, but only auto-recovery information on one of your computers, so not preventing conflicting versions.

For that purpose I already use Google Docs. I would however prefer to use the full power and desktop integration of an offline office suite, while safely editing files shared across PCs, without having to worry about closing the files before leaving one PC and going to another.

You know that Collabora is a major contributor of code to LibreOffice so that there is a lot of shared code on both?

And this is usually the main difference. Desktop software assumes the right to change files and locks exclusive access. There are ways around this, but this is a mayor task.
.
Also this needs the files to be “somewhere accessible” may this be LAN or a remote URL, so my guess developers will now opt directly for “cloud ready” as this would also work for LAN.
.
If you don’t really work in parallel, you may look for the approach of Nextcloud with OnlyOffice. It seems to sync files, instead of the central Collabora office, but syncing files can create multiple versions.
.
Choice is up to you…

I know plenty of software that doesn’t. Though most of that is some manner of plain text editing of source files, where manipulation of files by external tools (versioning, formatters, …) is part of the assumed offline workflow.

The only exception I know of being LyX. And it does the suggested “do not auto reload but warn and offer” thing.

Still, it would be a useful feature for pretty mich all software to detect, when something external modifies the file.