Community
    • Login

    Why does Autosave plugin keep disabling autosave at timed intervals?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 109 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Mr-BrunesM
      Mr-Brunes
      last edited by Mr-Brunes

      Hi

      I had occasion to reinstall NP++ 8.8.3 on Win11 and re-enabled the Autosave plugin (v2.00) with the option to save at 1 min timed intervals ticked. But periodically I’ve noticed that files were not being saved and the plugin option shows the timed interval is now unticked!

      Autosave.ini is dated 25th July '25, isn’t read-only and says:

      [Options]
      Timer=10
      SaveOnActivateApp=0
      SaveOnTimer=0
      SaveOnTabChange=0
      SaveOnExit=0
      SaveCurrentFileOnly=0

      Shouldn’t timer = 1?
      Any ideas why this is?

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Mr-Brunes
        last edited by

        @Mr-Brunes ,

        I’ve used AutoSave 2.00 for years (and versions before that), and I’ve never seen it un-checkmark that option (or change the time between saves).

        I am wondering whether you might have multiple instances of Notepad++ on your computer; if so, maybe AutoSave is only set up the way you want it to be on one of those multiple instances.

        When you are running Notepad++ with AutoSave in the wrong settings, look at ?-menu’s Debug Info (and copy it, and maybe paste it into a reply here)

        Assuming Debug Info shows something like

        Notepad++ v8.8.4   (64-bit)
        Build time: Aug  4 2025 - 18:01:28
        Scintilla/Lexilla included: 5.5.7/5.4.5
        Boost Regex included: 1_85
        Path: C:\Program Files\Notepad++\notepad++.exe
        Command Line: "C:\Users\pryrt\AppData\Roaming\Notepad++\plugins\config\AutoSave.ini" 
        Admin mode: OFF
        Local Conf mode: OFF
        Cloud Config: OFF
        Periodic Backup: OFF
        ...
        Plugins: 
            AutoSave (2)
            ...
        

        (I stripped out irrelevant stuff, because I have a lot of plugins)

        A first thing to look at is the Path:, Admin mode:, and Local Conf mode: entries in the Debug Info. That will tell us a lot.

        If I set the options to:
        30c6c10f-1fa4-407f-ad5c-f4b6eca942c2-image.png
        … I then have to exit Notepad++ normally (File > Exit or the upper-right X), then it writes the updates to %AppData%\Notepad++\Plugins\Config\AutoSave.ini – it doesn’t write the config file when I say OK, it waits until I exit Notepad++. So look at the AutoSave.ini last-changed date while Notepad++ is open. Then change AutoSave>Options…, click OK, then exit Notepad++; refresh the Explorer window and see if the AutoSave.ini date changes to the most recent timestamp. If not, then the settings for AutoSave aren’t where you think you are (and that strengthens the idea that you have multiple copies of Notepad++ floating around).

        Secondly, I’m wondering if the times when it loses it, you are getting a Notepad++ crash, instead of a normal closing. (Or even using something like taskkill /f /im notepad++.exe will prevent AutoSave from writing its config to disk, whereas taskkill without the /f will allow it to write the config.)

        Third, I know you said it’s not “read-only”, but Windows doesn’t just use a singular “read-only” flag: it also has user-based permissions. So maybe it’s not “read-only”, but your normal user doesn’t have write permission. (Or maybe you are running Notepad++ as admin when you make the change, but when you run as your normal user, it finds those settings weren’t saved.) So right click on the AutoSave.ini, Properties, then go to the Security tab; click thru the users in the list of user names, and see if the Permissions for XYZ table shows that different users have different permissions (especially your normal user compared to the Administrators group).

        So, to recap, the first things I’d check:

        1. ? > Debug Info, especially Path, Admin mode, and Local Conf mode.
        2. Look for multiple copies of Notepad++ on your computer, which would mean the config files are in different locations, so maybe the different copies have different settings
        3. How is Notepad++ being closed after you change the setting? Do you File > Exit, or click the X or just shutdown Windows or use Task Manager to kill the task or use the TASKKILL utility or something else?
        4. Check detailed permissions, not just “read only” flag
        Mr-BrunesM 1 Reply Last reply Reply Quote 2
        • Mr-BrunesM
          Mr-Brunes @PeterJones
          last edited by PeterJones

          @PeterJones tx those are all very helpful diagnosis steps.

          Results:

          Win11’s ‘Installed Apps’ says one instance of NPP.

          Debug info:
          Path : D:\Program Files\Notepad++\notepad++.exe
          Admin mode : OFF
          Local Conf mode : OFF

          (For the sake of completeness would it be useful for debug to add the %appdata% path (though I guess it’s a system env. variable)?)

          Mode                 LastWriteTime         Length Name
          ----                 -------------         ------ ----
          -a----        25/07/2025     11:42            113 AutoSave.ini
          

          File > exit NPP

          Mode                 LastWriteTime         Length Name
          ----                 -------------         ------ ----
          -a----        14/08/2025     15:22            113 AutoSave.ini
          

          I normally shut down or restart Windows, and never do a NPP File > Exit.
          I’ve restarted the PC several times since 25th July!
          The irony is not lost on me that it appears that the Autosave plug-in options are not (ahem) autosaved! ;-)

          Detailed Autosave.ini Security perms shows that my user has all permissions allowed.

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Mr-Brunes
            last edited by

            @Mr-Brunes said in Why does Autosave plugin keep disabling autosave at timed intervals?:

            I normally shut down or restart Windows, and never do a NPP File > Exit.

            So if the Windows OS shutdown/restart prevents Notepad++ from sending the “shut down gracefully” signal to plugins, then the AutoSave plugin might never have a chance to write its config file to disk

            14/08/2025 15:22

            The good news is, your new options have now been saved. In theory, they shouldn’t disappear again. My recommendation to you is that, since you normally don’t do File > Exit, you should do that after changing any AutoSave plugin settings (or other plugin settings, too, because I cannot guarantee which of your plugins might write settings immediately vs writing on safe-exit)

            The irony is not lost on me that it appears that the Autosave plug-in options are not (ahem) autosaved! ;-)

            You have a point. It would make sense for it to save the options as soon as you hit OK. I am creating an Issue with the AutoSave repo => Issue #70 … I don’t know whether the author will ever address that problem, but at least they’ve been informed.

            Mr-BrunesM 1 Reply Last reply Reply Quote 0
            • Mr-BrunesM
              Mr-Brunes @PeterJones
              last edited by

              @PeterJones that’s great. I wonder if it’s a Win11 ‘feature’ that prevents the graceful app close/shutdown.
              Either way I know now what the smoking gun looks like so will be mindful of that in future.
              Tx for the analysis and for filing the plugin issue.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors