Community
    • Login

    AsNotepad.xml nolonger working as it did

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

                Thanks both for your help but I still have the problem.
                I have unistalled NP++ and chose the option to delete my config which did delete all the files in my C:\Users\Chris\AppData\Roaming\Notepad++ folder. I then checked the folder where NP++ was installed (C:\Program Files\Notepad++) and the only file left was asNotepad.xml.
                I then reinstalled NP++ with default options and then within Explorer, I edited the readme.txt (“C:\Program Files\Notepad++\readme.txt”) with NP++. It opened successfully but showed the tab as well.
                My Debug info is this:
                Notepad++ v8.8.2 (64-bit)
                Build time : Jun 26 2025 - 01:12:36
                Scintilla/Lexilla included : 5.5.7/5.4.5
                Boost Regex included : 1_85
                Path : C:\Program Files\Notepad++\notepad++.exe
                Command Line : “C:\Program Files\Notepad++\readme.txt”
                Admin mode : OFF
                Local Conf mode : OFF
                Cloud Config : OFF
                Periodic Backup : OFF
                Placeholders : OFF
                Scintilla Rendering Mode : SC_TECHNOLOGY_DIRECTWRITE (1)
                Multi-instance Mode : monoInst
                File Status Auto-Detection : cdEnabledNew (for current file/tab only)
                Dark Mode : OFF
                Display Info :
                primary monitor: 1920x1080, scaling 100%
                visible monitors count: 1
                installed Display Class adapters:
                0001: Description - AMD Radeon ™ R9 M375
                0001: DriverVersion - 27.20.20903.8001
                0002: Description - Intel® HD Graphics 5500
                0002: DriverVersion - 20.19.15.4624
                0005: Description - Microsoft Remote Display Adapter
                0005: DriverVersion - 10.0.26100.1150
                0006: Description - Microsoft Remote Display Adapter
                0006: DriverVersion - 10.0.26100.3624
                - warning, search has been limited to maximum number of adapter records: 4
                OS Name : Windows 11 Pro (64-bit)
                OS Version : 24H2
                OS Build : 26100.4351
                Current ANSI codepage : 1252
                Plugins :
                mimeTools (3.1)
                NppConverter (4.6)
                NppExport (0.4)
                Attached is an image of NP++ after the reinstall and another image shows the folder where NP++ is installed.NP++ after reinstall.png NP++ folder contents after reinstall.png

                1 Reply Last reply Reply Quote 0
                • Chris GorringeC
                  Chris Gorringe
                  last edited by

                  If I then uninstall 8.8.2 and delete my settings again, followed by a fresh install of 8.7.7 and repeat the exact same process, it works correctly. Images attached
                  NP++ 8.7.7 after reinstall.png NP++ 8.7.7 folder contents after reinstall.png

                  And then if I uninstall 8.7.7 and reinstall 8.8.2, the problem then reappears as before.
                  I have also tested it by launching NP++ and the opening the readme.txt file from within NP but the problem still persists. Did this to eliminate and context menu launch parameter issues.

                  Not sure what I can do next to help you.

                  1 Reply Last reply Reply Quote 0
                  • Chris GorringeC
                    Chris Gorringe
                    last edited by

                    I have repeated this test on another machine which is a 1 month old W11 Pro desktop PC and it shows the same problem. I tried to post the debug info here but it was blocked as spam!

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

                      Okay, now this is weird.

                      All my experiments with the portable before showed it was working 100%.

                      But after your posts today, I tried in my installed v8.8.2 (c:\program files\notepad++\), and asNotepad.xml only partly worked: it properly prevents sessions, and allows multi-instance, but the tab bar is still showing

                      So I removed asNotepad.xml from the installed, and just tried running the C:\Program Files\Notepad++>.\notepad++.exe -multiInst -nosession -notabbar – it still showed the tabbar, but the other features are working.

                      So I switched back to the portable 8.8.2, and tried: if I do .\notepad++.exe -multiInst -nosession -notabbar from the portable, it shows an empty file with no tab bar; but if I do .\notepad++.exe -multiInst -nosession -notabbar readme.txt , the tab bar does show. So there does seem to be a bug in the tab-bar-hiding routine.

                      (I also confirmed with those same two commands in a portable v8.8.3-RC2)

                      Not sure what I can do next to help you.

                      Since you know it’s working right with v8.7.7, and you’re willing to uninstall/reinstall, could you run the experiment where you step through all the versions between v8.7.7 and v8.8.2, and figure out which version it stops working on (so the first broken version)? (for the first broken version, please show the Debug Info)

                      If you do that and post the results here, I can work on putting in an official bug report to the Issue tracker. update: not needed; confirmed v8.7.8 worked and v8.7.9 failed using portables; created issue, linked below

                      Sorry for not replicating it earlier: I don’t know why I didn’t notice the tab bar issue in my earlier tests, but I’m definitely seeing it today.

                      1 Reply Last reply Reply Quote 1
                      • PeterJonesP
                        PeterJones
                        last edited by

                        @Chris-Gorringe ,

                        Using portable, I was able to confirm that v8.7.9 was the version that broke that feature. I have submitted bug report #16794

                        1 Reply Last reply Reply Quote 1
                        • Chris GorringeC
                          Chris Gorringe
                          last edited by

                          Thanks Peter. I was starting to wonder if I was running NP in an odd way that was preventing it from working correctly. 😊

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