Zim-desktop-wiki: Improve auto-saving behavior when leaving Zim window

Created on 18 Mar 2018  Â·  6Comments  Â·  Source: zim-desktop-wiki/zim-desktop-wiki

As discussed on the mailing list -- https://lists.launchpad.net/zim-wiki/msg04602.html -- I'm facing an annoying functionality/behaviour (while not so important): when I write in Zim window and leave it for another window, Zim auto-save the current content, even if I told him to save every 10 minutes in the config file.
It's annoying in my case because I synchronize Zim with other machines thanks to Seafile. The issue is perhaps also annoying with version control plugin.

From my point of view, it should be an option which can be enable/disable.

enhancement good first issue

Most helpful comment

In the current behavior it will save the moment you switch focus away from
the editing window.

In the proposed behavior it would ignore that, because it is less than 8
minutes. Two minutes later the 10 minute timer goes off and it is saved.

On Fri, Feb 1, 2019 at 11:13 AM Luffah notifications@github.com wrote:

Just for my own understanding. When will the file be saved in the
following usecase ?

  • t 0 : I configure the parameter on zim to 10 min.
  • t 0bis : I edit a note, it take 7 min.
  • t 7 : I switch to pidgin window to say to a comrade "hey look on the
    shared zim !"
  • t 7bis : I go sleepy on peertube... waiting for comments.
  • t 17 : 10 minutes later, I switch back on zim window, worrying about
    misspelling.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/zim-desktop-wiki/zim-desktop-wiki/issues/393#issuecomment-459673175,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABMMHvxeGJ87dIKUrarmaLIx-JAoX3-Qks5vJBM8gaJpZM4SvOzG
.

All 6 comments

_(first part removed by myself because issue was misunderstanded)_

Personally, i find the autosave feature usefully when you have a lot of notes.

_Edit: +1 to add the possibility to avoid autosave on window switching._

I heavily rely on the version control plugin, have repos shared across sundry local & remote machines, and have no issues related to the current auto-save implementation. IMO, the real issue here is that you are trying to press zim into a low-latency collaboration mechanism (like a shared whiteboard or etherpad), and I don't think this will be your last problem going down that road. I imagine that you are also likely to get silently dropped modifications (esp. with simultaneous writes to journal pages), and ever more so as the number of people sharing the zim repo increases or (as you are recommending) the longer unsaved pages linger in RAM.

See https://lists.launchpad.net/zim-wiki/msg04605.html

The logic should be refined to check the timer and only do the save if e.g. within 80% of the time to next save. Result would be that 10 minutes becomes somewhere between 8 and 10 minutes.

Just for my own understanding. When will the file be saved in the following usecase ?

  • t 0 : I configure the parameter on zim to 10 min.
  • t 0bis : I edit a note, it take 7 min.
  • t 7 : I switch to pidgin window to say to a comrade "hey look on the shared zim !"
  • t 7bis : I go sleepy on peertube... waiting for comments.
  • t 17 : 10 minutes later, I switch back on zim window, worrying about misspelling.

In the current behavior it will save the moment you switch focus away from
the editing window.

In the proposed behavior it would ignore that, because it is less than 8
minutes. Two minutes later the 10 minute timer goes off and it is saved.

On Fri, Feb 1, 2019 at 11:13 AM Luffah notifications@github.com wrote:

Just for my own understanding. When will the file be saved in the
following usecase ?

  • t 0 : I configure the parameter on zim to 10 min.
  • t 0bis : I edit a note, it take 7 min.
  • t 7 : I switch to pidgin window to say to a comrade "hey look on the
    shared zim !"
  • t 7bis : I go sleepy on peertube... waiting for comments.
  • t 17 : 10 minutes later, I switch back on zim window, worrying about
    misspelling.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/zim-desktop-wiki/zim-desktop-wiki/issues/393#issuecomment-459673175,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABMMHvxeGJ87dIKUrarmaLIx-JAoX3-Qks5vJBM8gaJpZM4SvOzG
.

I like the current save-when-leaving, so I'd request any new behavior be optional, as suggested at top.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mehdisadeghi picture mehdisadeghi  Â·  4Comments

sojusnik picture sojusnik  Â·  3Comments

markfink picture markfink  Â·  6Comments

Nick222 picture Nick222  Â·  4Comments

kbrenneman picture kbrenneman  Â·  4Comments