Bug with -openFoldersAsWorkspace



  • I just discovered the command option -openFoldersAsWorkspace. Great, but it has a big flaw/bug :

    It only works if Notepad++ is closed (so only at startup).
    It empties the list of previous Workspace (only the target folder is active).
    It would be useful if the command adds the target folder to the list without resetting the list (session retention) and works even if a Notepadd++ instance is already running (and adds it to the list).

    On the same subject, I think we should update the installer and include the option “Add Notepad++ to diretory context menu” (then the functionality is there)



  • Edit :
    Windows (look for others os?) has a feature to “open/select” the current folder with a click on the background (in the file explore).

    Regs keys:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\ANotepad++64]
    @=“Open with Notepad++”
    “Icon”="\“D:\\Program Files\\Notepad++\\notepad++.exe\”,0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\ANotepad++64\command]
    @="\“D:\Program Files\\\Notepad++\notepad++.exe\” -openFoldersAsWorkspace \"%V\""



  • @un-pogaz said in Bug with -openFoldersAsWorkspace:

    Great, but it has a big flaw/bug

    I don’t know whether I’d call it a bug, or just a difference in interpretation of what should be in that feature.

    But I can confirm with v7.9 and v7.9.1 that it behaves as you describe: -openFoldersAsWorkspace works if Notepad++ is not already running; but if there’s already an instance running, then that option will not take effect.

    Now that I’ve tried it, I think I agree with you that the option would be better if it worked whether or not Notepad++ was already running.

    Based on the fact that you reported your feature request / bug report here, I am going to point out a few things:

    1. This forum is for discussion, so it’s a good place to start (in case we can point out how to do something in the existing code, or find a workaround, or what have you). But FAQ Desk: Feature Request or Bug Report explains where to go to submit an official feature request or bug report – since your suggestions seem like good ideas to me, I recommend you follow that FAQ. As that FAQ explains, make sure you search existing issues before posting a new one, because it might already exist
    2. You have two separate requests in this post (-openFoldersAsWorkspace improvement and installer improvement). If you do end up making official issue reports, make sure you do them as two separate issues, because they are completely unrelated to each other.
    3. If you do end up making official issue reports, it is considered polite to paste a link to those reports in this discussion, so that others can easily find out the status of those requests, or go add their support, or what have you.


  • @un-pogaz

    Well…perhaps you have a valid point; the -openFoldersAsWorkspace part.

    But…since you are talking about Explorer operations, why not just drag-n-drop a folder from Explorer onto the Folder as Workspace panel in Notepad++?

    Trade one Explorer operation that you can’t do with one that you can.



  • @PeterJones
    Okay. done :
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9135 (-openFoldersAsWorkspace behaviour)
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9136 (Installer improvment / Context Menu for folder)

    Sorry if I posted my bug report incorrectly. I discovered the Notepad++ forum recently, and as every free software has its own management…
    I should have searched and read the FAQ, but… I rushed >_>

    @Alan-Kilborn
    Yes, I still can. But using the context menu is so much more pleasant and comfortable.
    You want to add a folder to your Workspace list ; No need to worry if an instance is already open, if it is minimized, if the “Workspace” dialog is activated…
    With the context menu, a simpe Right Click > Click on the entry and hop, Notepad is opened, in the foreground, with your new Workspace.



  • @un-pogaz

    I fully understand the Explorer right-click concept.

    There is also the factor of how often you do this (set up a folder as workspace).
    I have had the same folder set up this way for several years now; hasn’t changed.
    But, everyone’s different.
    I just wouldn’t have a high expectation that this kind of thing is in the upper parts of the dev’s todo lists.


Log in to reply