Community
    • Login

    AsNotepad.xml nolonger working as it did

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 4 Posters 68 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.
    • Chris GorringeC
      Chris Gorringe
      last edited by

      Up until about 8.7.8, the asNotepad.xml file would make NP++ behave like Windows Notepad in that it only ever worked on one file and never showed any tabs. From 8.7.8, this appeared to stop working. I have tried to use the Preferences to acheive the same functionality but it doesn’t appear to be 100% perfect in that tabs still appear depending on the sequence that files are opened and closed.
      Is this a new bug or is this intential? I would really like to work with NP++ without tabs.

      PeterJonesP mkupperM 2 Replies Last reply Reply Quote 1
      • Jim DaileyJ
        Jim Dailey
        last edited by

        @Chris-Gorringe Settings->Preferences->General “Tab Bar”. Check the “Hide” checkbox.

        PeterJonesP 1 Reply Last reply Reply Quote 0
        • PeterJonesP
          PeterJones @Chris Gorringe
          last edited by PeterJones

          @Chris-Gorringe ,

          According to the documentation on asNotepad.xml, it is supposed to behave like the -multiInst -nosession -notabbar command line options were in effect: so you can run multiple instances, it doesn’t load the files saved in session.xml, and it doesn’t show the tabbar.

          So I took fresh portable copies of v8.7 and v8.8.2 (to make sure I’m not right on the border of v8.7.8, in case you mis-remembered which version it changed in), and made sure they had a session file (with two files open) to begin with, so it would be obvious.

          With v8.7:

          • Run Notepad++ as Normal (no asNotepad.xml):
            • I saw both files from the previous session (so -nosession isn’t active)
            • I see the tabbar (so -notabbar isn’t active)
            • If I tried to open a second copy of Notepad++, it just focused the active instance instead (so -multiInst isn’t active)
            • If I drag a file onto notepad++.exe, it adds that file to the session (again, -multiInst isn’t active)
            • That all works as I expect
            • Exit Notepad++
          • Add file asNotepad.xml to the portable directory, then run Notepad++
            • I don’t see the files from the previous session – it started with a new file. (so equivalent of -nosession is active)
            • I don’t see the tabbar (so equivalent of -notabbar is active)
            • If I run a second instance of notepad++.exe, a second window appears (so two instances are running simultaneously: equivalent of -multiInst is active)
            • If I drag a file onto notepad++.exe, it opens it in a new instance/window (so equivalent of -multiInst is active)
            • That all works as expected
            • Exit Notepad++

          Move to the portable 8.8.2 directory instead, and run the same experiment:

          • Run Notepad++ as Normal (no asNotepad.xml):
            • I saw both files from the previous session (so -nosession isn’t active)
            • I see the tabbar (so -notabbar isn’t active)
            • If I tried to open a second copy of Notepad++, it just focused the active instance instead (so -multiInst isn’t active)
            • If I drag a file onto notepad++.exe, it adds that file to the session (again, -multiInst isn’t active)
            • That all works as I expect
            • Exit Notepad++
          • Add file asNotepad.xml to the portable directory, then run Notepad++
            • I don’t see the files from the previous session – it started with a new file. (so equivalent of -nosession is active)
            • I don’t see the tabbar (so equivalent of -notabbar is active)
            • If I run a second instance of notepad++.exe, a second window appears (so two instances are running simultaneously: equivalent of -multiInst is active)
            • If I drag a file onto notepad++.exe, it opens it in a new instance/window (so equivalent of -multiInst is active)
            • That all works as expected
            • Exit Notepad++

          The two versions behave identically for me, in terms of honoring the asNotepad.xml file.

          Things to check:

          • Are you sure you correctly named it asNotepad.xml? That is, make sure that Windows isn’t hiding extensions, so that the file is really named asNotepad.xml.txt with Windows Exploring hiding the extra .txt extension.
          • Are you sure you put it in the same directory as notepad++.exe? As the Manual explains, it is not recognized in %AppData%\Notepad++\asNotepad.xml.
          • Make sure it’s in the same directory as the notepad++.exe that you are running. If you have multiple copies of Notepad++, the asNotepad.xml must go in the same directory as the copy that you are running.
          • Share your ?-menu’s Debug Info with us: maybe we can see something odd.

          I cannot think of other way to get the asNotepad.xml-enabled Notepad++ to not behave like that. (You can temporarily change settings, but when you re-run, the asNotepad.xml takes effect again.)

          Speaking of changing settings, there are equivalent settings to each of those:

          1. Settings > Preferences > Tab Bar: checkmark ☑ Hide: this will make it permanently like -notabbar
            • @Jim-Dailey said it was in Settings > Preferences > General, which was true in v8.7.9 and earlier; but in v8.8 and newer, the tab-bar settings were given their own page of settings.
          2. Settings > Preferences > Backup: uncheck ☐ Remember Current Session for Next Launch: this will make it permanently like -nosession
          3. Settings > Preferences > Multi-Instance & Date: Change to ⦿ Always in multi-instance mode: this will make it permanently like -multiInst

          If I had just one normal instance of Notepad++ open, set those three settings, and exit Notepad++ (to make sure the settings get saved), then every time I run it after that, it behaves identically to the experiments above, as if it were asNotepad.xml.

          So, to sum up:

          1. I cannot replicate your problem. Whether the version is before or after v8.7.8, asNotepad.xml behaves identically with either version for me.
          2. There are some things you can check to help figure out why asNotepad.xml is not working for you.
          3. If you cannot get asNotepad.xml to work, you can make Notepad++ behave identically using either three command-line-options (mentioned in the manual), or by setting three settings and then restarting Notepad++.
          1 Reply Last reply Reply Quote 1
          • PeterJonesP
            PeterJones @Jim Dailey
            last edited by

            @Jim-Dailey said in AsNotepad.xml nolonger working as it did:

            Settings->Preferences->General “Tab Bar”. Check the “Hide” checkbox.

            Aside from what I already said, it should be noted that if Notepad++ is truly/correctly in the asNotepad.xml mode, the state of that option will be ignored: so I can run with asNotepad.xml, see that there is no tabbar, see that preference says it’s not hidden; if I checkmark that preference on, nothing changes (though there is a flash); if I uncheckmark it off, then the tabbar shows up for that instance – but if I exit and re-run (still with asNotepad.xml), the the tabbar is hidden again, even though the checkbox still claims it’s not hidden. So the asNotepad.xml is separate logic from the preference checkbox.

            1 Reply Last reply Reply Quote 1
            • mkupperM
              mkupper @Chris Gorringe
              last edited by

              @Chris-Gorringe said in AsNotepad.xml nolonger working as it did:

              Up until about 8.7.8, the asNotepad.xml file would make NP++ behave like Windows Notepad in that it only ever worked on one file and never showed any tabs. From 8.7.8, this appeared to stop working. I have tried to use the Preferences to acheive the same functionality but it doesn’t appear to be 100% perfect in that tabs still appear depending on the sequence that files are opened and closed.
              Is this a new bug or is this intential? I would really like to work with NP++ without tabs.

              I believe we will need more details about what is meant by “appeared to stop working.” Let’s start with the debug info from the ? / Debug info... menu.

              Like @PeterJones, I tried several versions of Notepad++ and the asNotepad.xml logic appears to work. However, my test was fairly cursory in that I verified that there was no tab bar and that opening two files created two instances, and that the session.xml files were never used nor updated. I did not push hard to see if I could get Notepad++ to behave in some unexpected way.

              I have portable versions of Notepad++ in c:\npp\~~~\notepad++.exe where ~~~ is a Notepad++ version number such as 878 or 882. For testing this issue I ran these from a command prompt as needed.

              rem Create asNotepad.xml files for testing
              for /d %i in (c:\npp\*) do @if not exist "%i\asNotepad.xml" cd . >"%i\asNotepad.xml"
              
              rem Rename the asNotepad.xml files to see if the latter case matters - it did not matter
              for /d %i in (C:\npp\*) do ren "%i\asNotepad.xml" asnotepad.xml
              for /d %i in (C:\npp\*) do ren "%i\asNotepad.xml" ASNOTEPAD.XML
              for /d %i in (C:\npp\*) do ren "%i\asNotepad.xml" ASnoTepad.xml
              
              rem Delete the asNotepad.xml files I had added for testing
              for /d %i in (c:\npp\*) do del "%i\asNotepad.xml"
              
              rem Look for asNotepad.xml files - Normally I don't have them
              dir /s /b C:\npp\asNotepad*
              
              
              rem Run a version Notepad++, wait 2 seconds, and run that version again to
              rem verify that both test files get opened in their own instances and that
              rem there are no tab bars.
              c:\npp\833\Notepad++.exe c:\tmp\tmp1 && sleep 2000 && c:\npp\833\Notepad++.exe c:\tmp\tmp2
              c:\npp\878\Notepad++.exe c:\tmp\tmp1 && sleep 2000 && c:\npp\878\Notepad++.exe c:\tmp\tmp2 
              c:\npp\881\Notepad++.exe c:\tmp\tmp1 && sleep 2000 && c:\npp\881\Notepad++.exe c:\tmp\tmp2
              c:\npp\882\Notepad++.exe c:\tmp\tmp1 && sleep 2000 && c:\npp\882\Notepad++.exe c:\tmp\tmp2
              
              1 Reply Last reply Reply Quote 2
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors