Plugins and Cloud storage
-
Notepad++ seems to allow to store its setting in the Cloud. I mean the Settings -> Preferences -> Cloud -> Set you cloud location path. (I’m writing “seems to” because personally I have never used Cloud).
However, there is nothing related to Cloud in the “Notepad_plus_msgs.h” and, as far as I can see, Notepad++'s plugins are not aware of the Cloud path.Suggestion #1:
Maybe let’s add a new check-box “Store plugin’s settings in the Cloud” and make NPPM_GETPLUGINSCONFIGDIR to return the Cloud path in this case? Thus, the plugins will be able to use the Cloud path automatically.Suggestion #2:
Maybe let’s add a new message similar to NPPM_GETSETTINGSCLOUDPATH? In such case, Notepad++'s plugins will be able to retrieve the Cloud path manually and deal with this path. -
That does sound like something that should be added. A full issue is likely warranted. #1 makes more sense to me, but proposing both allows options.
If you do create an issue, you might also want to link that issue to #5317 and #4696, which are related to other config files that don’t properly use the cloud folder. That way, if someone is working on one of those older issues, they’ll also see the mention from your new issue.
-
OK, a new issue created:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9168 -
Now, since NPPM_GETSETTINGSONCLOUDPATH is available in Notepad++, I am experimenting with storing and reading NppExec’s configuration from a cloud path.
So far, I just specified a custom folder on my local machine as the “cloud location path” in Notepad++'s settings.
But, in general, how do you use the “cloud location path”? I mean, do you specify some network path there (e.g. “\machine\shared_folder”) or maybe some HTTP or FTP (e.g. “https://…” or “ftp://…”)? Or maybe something different? I’d like to test this in the whole scope, but I just have no idea what the “cloud location path” could be…
Could someone provide me an example of some really “cloudy” cloud location path? -
It’s intended for use with “cloud applications” like Dropbox, Google Drive, or Microsoft OneDrive. So you would just set the “cloud path” to a folder on your machine that is inside the folder hierarchy synced by your chosen cloud provider. For example, if you have Google Drive in a standard location, you might set the cloud path to
c:\users\Vitaly\Google Drive\Notepad++\
to get it in the Google Drive hierarchy. -
Who wants to try NppExec that saves its configuration to the cloud location path?
Those who are interested can download the latest dev version of NppExec here:
https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec Plugin (dev)/
NppExec20210210_dll_PA.zip and NppExec20210210_dll_x64_PA.zip are the ones you are looking for.Some technical details:
With cloud location path specified in Notepad++'s settings, NppExec does the following:
- On start, NppExec tries to read its configuration files from the cloud location path. If these files do not exist or are filled with NULs, NppExec reads its configuration from $(PLUGINS_CONFIG_DIR).
- When NppExec saves its configuration, first it is saved to $(PLUGINS_CONFIG_DIR) and then copied to the cloud location path. Thus, NppExec always has a copy of its current configuration within the $(PLUGINS_CONFIG_DIR) folder.
- NppExec’s saved scripts - the “npes_saved.txt” file - are monitored in the cloud location path. So, if you manually edit the “npes_saved.txt” within the cloud location, NppExec detects it. If, however, you manually edit the “npes_saved.txt” within the $(PLUGINS_CONFIG_DIR) folder, it is ignored.
When the cloud location path is not specified in Notepad++'s settings, NppExec stores its configuration within the $(PLUGINS_CONFIG_DIR) folder.