Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make buffer time between last modified on disk and last modified on last save configurable #3273

merged 3 commits into from Feb 5, 2018


Copy link

@gnestor gnestor commented Jan 28, 2018

Suggested by #484 (comment)

This will look in notebook.json in ~/.jupyter/nbconfig/notebook.json for a last_modified_buffer value. For example:

  "Notebook": {
    "Header": false,
    "Toolbar": true
  "Cell": {
    "cm_config": {
      "lineNumbers": false
  "last_modified_buffer": 600

Can anyone think of better name than last_modified_buffer?

Copy link

I'm trying to think of a better word than 'buffer', because that suggests a temporary storage area for data. Maybe last_modified_check_margin?

Also, I might make the config option in seconds rather than milliseconds; I think we generally try to keep intervals in seconds throughout our API for consistency (cc @minrk )

// We want to check last_modified (disk) > that.last_modified (our last save)
// In some cases the filesystem reports an inconsistent time,
// so we allow 0.5 seconds difference before complaining.
if ((last_modified.getTime() - that.last_modified.getTime()) > 500) { // 500 ms
// so we allow 0.5 seconds (configurable in nbconfig/notebook.json as `last_modified_buffer`) difference before complaining.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to update the name in the comment too.

Copy link

graphedge commented Feb 12, 2019

I have tried "last_modified_buffer": 2 and "last_modified_check_margin": 3, assuming they're in seconds. They both cause all my notebooks to return a 500 error.

I've been trying to avoid the "overwrite?" dialog, which pops up as frequently as every 5 minutes. I'm on Win10 and notebook 5.7.0



Copy link

Adding the line "last_modified_check_margin": 0.5 does nothing for me. This issue is not closed

Copy link

ckbhatt commented Jan 29, 2020

Is there any plan to have this property configurable in Jupyter lab as well?

Copy link

@ckbhatt I opened jupyterlab/jupyterlab#8556 to track the feature in JupyterLab.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging this pull request may close these issues.

None yet

6 participants