Community
    • Login

    NPP No Longer Remembers Previous Search Criteria

    Scheduled Pinned Locked Moved General Discussion
    10 Posts 3 Posters 1.4k 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.
    • Dick Adams 0D
      Dick Adams 0
      last edited by

      Recently, NPP stopped remembering my previous searches. Instead, when I bring up Find in Files, it thinks my previous search was the lower case letter ell (‘l’).

      I have version 8.1.5, 64-bit. Search mode = Normal, Match Case, searching standard HTML files.

      This has been working fine for years, and is now broken. I do remember updating to the latest version recently. Not sure if the problem began happening immediatley after.

      Any ideas?

      PeterJonesP Dick Adams 0D 3 Replies Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Dick Adams 0
        last edited by

        @Dick-Adams-0 ,

        It sounds like maybe you lost write-permission to your config.xml configuration file, or that file somehow got corrupted. (Maybe it was accidentally set to be Admin owner, but you are now using your non-Admin account, or similar). Try exiting Notepad++, renaming the config file to something else, and then re-start Notepad++; then try a few searches, and see if it remembers them inside the current session and into the next session.

        1 Reply Last reply Reply Quote 1
        • Dick Adams 0D
          Dick Adams 0 @Dick Adams 0
          last edited by

          @dick-adams-0 Not sure why, but the config.xml isn’t in the folder the help page says it should be in (%AppData%\Notepad++). Rather, it is in AppData\Roaming\Notepad++.

          So I renamed the config.xml there, but it had no effect.

          Any ideas?

          PeterJonesP Dick Adams 0D 2 Replies Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Dick Adams 0
            last edited by PeterJones

            @dick-adams-0

            the help page says it should be in (%AppData%\Notepad++). Rather, it is in AppData\Roaming\Notepad++.

            The helpfile correctly says that that it’s in %AppData%\Notepad++, because %AppData% resolves on you system to ...\AppData\Roaming, so %AppData%\Notepad++ will go exactly where you ended up finding it. See our AppData FAQ for more.

            So I renamed the config.xml there, but it had no effect.

            The correct steps are

            1. Exit all instances of Notepad++
            2. Rename the config.xml
            3. Start Notepad++ again
            4. Notepad++ will use the default config settings
            5. If you exit Notepad++ again, the config.xml should have been re-created with default values

            You should share your ?-menu’s Debug Info contents by copying from that dialog and pasting here. (This confirms for us various environmental conditions which may help us give you better advice.)

            You should look into permissions in your %AppData%\Notepad++ folder – for the folder, and for the files under it, and make sure you are allowed to add files and edit files in that folder.

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

              @dick-adams-0 said in NPP No Longer Remembers Previous Search Criteria:

              when I bring up Find in Files, it thinks my previous search was the lower case letter ell (‘l’).

              BTW: are you sure you didn’t have a lower-case l selected when you opened Find in Files? Because unless you’ve changed your settings so that Settings > Preferences > Searching > Don’t fill find field in Find dialog with selected word is checked instead of the default unchecked, if you have text selected when you open that dialog, it will auto-populate the FIND field.

              1 Reply Last reply Reply Quote 0
              • Dick Adams 0D
                Dick Adams 0 @Dick Adams 0
                last edited by

                @dick-adams-0 I just looked at the config.xml which NPP re-created after I renamed the old one. Buried in the middle were two curious entries:

                <Find name="%20" />
                <Find name="l" />
                

                The first Find element is the my most recent search string, which NPP is forgetting (%20). I was searching for a URL-encoded space character.

                The second Find element is the search string which NPP presents as the default when I next enter Search-Find in Files (l).

                Is it possible the percent sign in %20 is confusing NPP?

                Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
                • Alan KilbornA
                  Alan Kilborn @Dick Adams 0
                  last edited by

                  @dick-adams-0

                  If I try reproducing what you see I get:

                  bff80296-f7ed-4f4a-acad-03faa142db7a-image.png

                  But then when I reinvoke Find I see:

                  08b231ac-8e64-41ad-bc68-12395cff0acc-image.png

                  Which seems correct to me.

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

                    @dick-adams-0

                    I started up a clean v8.1.5 (so default settings, plugins, etc), and searched for 1, 2, 3, space, and last. I exited Notepad++ and re-ran it. My FIND dialog and config.xml look like:

                    21261341-246f-4f49-9fbf-6ac069101977-image.png

                    That’s exactly what I would expect. The only way I could get %20 in the FIND history is if I actually searched for those characters.

                    You are going to have to provide us with more information – including that which has already been asked for but not given – because we cannot replicate your problem as it stands.

                    ? > Debug Info

                    Notepad++ v8.1.5 (64-bit)
                    Build time : Sep 26 2021 - 15:23:23
                    Path : C:\usr\local\apps\npp\npp.8.1.5.portable.x64\notepad++.exe
                    Command Line :
                    Admin mode : OFF
                    Local Conf mode : ON
                    Cloud Config : OFF
                    OS Name : Windows 10 Enterprise (64-bit)
                    OS Version : 2009
                    OS Build : 19042.1288
                    Current ANSI codepage : 1252
                    Plugins : mimeTools.dll NppConverter.dll NppExport.dll

                    1 Reply Last reply Reply Quote 0
                    • Dick Adams 0D
                      Dick Adams 0
                      last edited by

                      I think I may have solved the mystery (and found a new one)

                      On my latest attempt to find %20, when I started NPP, I noticed the new document, which appears by default, had a single character, a lower case ell, and it was highlighted.

                      So, when I chose find-and-replace, NPP thought the highlighted ell was what I wanted to search for. So that explains the pre-filled ell in in the find/replace dialog.

                      I suspect the ell in the “new document” was probably a typo that had been introduced many sessions ago, and it was such a short string, I had not noticed it. When I deleted the ell in the new document, the suggested search string was %20 as expected/desired.

                      But that brings up another question:

                      Why would NPP think I wanted new documents to start with the letter ell? I never saved the new document, so why did NPP keep presenting it with a single letter ell when I launched NPP? Is that normal behavior?

                      Alan KilbornA 1 Reply Last reply Reply Quote 0
                      • Alan KilbornA
                        Alan Kilborn @Dick Adams 0
                        last edited by

                        @dick-adams-0 said in NPP No Longer Remembers Previous Search Criteria:

                        Why would NPP think I wanted new documents to start with the letter ell?

                        It doesn’t.

                        never saved the new document, so why did NPP keep presenting it with a single letter ell when I launched NPP? Is that normal behavior?

                        N++ by default remembers unsaved changes to documents. Yes, it is normal behavior. You can change the way N++ handles this so that you get prompted to save/discard any unsaved changes when Notepad++ exits, if you want that behavior.

                        I’d say what happened was that you somehow “fat fingered” an l into your document, you never noticed it, and it just “hung around” as an unsaved change. N++ had no way of knowing it was unintentional.

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