Community
    • Login

    [8.7.1] File doesn't open expected file in list

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    10 Posts 4 Posters 327 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.
    • S
      Shohreh
      last edited by

      Hello,

      I’m running 8.7.1 and noticed N++ doesn’t open the right file in the list in the File menu > recently-opened files.

      It’s not even the previous/next (7/9 in the screenshot), so it doesn’t look like a one-off error.

      Cheers,

      90beafc8-b7f9-4c1e-85a1-5ddd5989efa1-image.png

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

        @Shohreh ,

        You will have to be more specific. I have never had difficulty with the Recent Files list – whether I click on one of the entries to re-open that specific file, or whether I use Restore Recent Closed File, which for me has always opened the file I most-recently closed, never off-by-one.

        So, if you have a different experience, you will need to give an exact sequence of steps that is reproduceable by anyone. Also share your ?-menu’s Debug Info, because maybe there’s a plugin installed that will influence things.

        S 1 Reply Last reply Reply Quote 2
        • S
          Shohreh @PeterJones
          last edited by

          @PeterJones Thanks. I can’t figure out why it’s not working as expected. I’ll see if I find the cause of the problem.

          1. Open a file: The file is not added to the list of recent files (the list between “Print now” and “Restore Recent Closed File”) even after editing the file

          2. File > Empty Recent Files List does nothing

          PeterJonesP Alan KilbornA 2 Replies Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Shohreh
            last edited by PeterJones

            @Shohreh said in [8.7.1] File doesn't open expected file in list:

            Open a file: The file is not added to the list of recent files (the list between “Print now” and “Restore Recent Closed File”) even after editing the file

            The “recent file list” is a list of files that have been recently closed, not recently opened; no file will enter that list until you close it.

            See the User Manual’s description for the Recent Files feature.

            1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn @Shohreh
              last edited by

              @Shohreh said in [8.7.1] File doesn't open expected file in list:

              File > Empty Recent Files List does nothing

              Are you sure about this?
              Do you have one or more files appearing in the list before you try that command?

              S 1 Reply Last reply Reply Quote 0
              • S
                Shohreh @Alan Kilborn
                last edited by

                @Alan-Kilborn After editing a file, it’s still not listed in Files at the bottom as I expected (eg. UltraEdit).

                After restarting N+, the list is still empty.

                I checked/unchecked Settings > Preferences > Recent Files History “In submenu”, it makes no difference: The file is still not listed.

                4bfdc9b6-7da5-4c5e-a5fa-8ee8d616fd6e-image.png

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

                  @Shohreh

                  You’re actually closing the file you expect to see in Recent Files, right?
                  As Peter said, it isn’t a “recent file” upon opening, only upon closing.

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

                    @Shohreh said in [8.7.1] File doesn't open expected file in list:

                    @Alan-Kilborn After editing a file, it’s still not listed in Files at the bottom as I expected (eg. UltraEdit).

                    Yuo misunderstood him. You had originally stated that File > Empty Recent Files List did nothing. @Alan-Kilborn took issue with that: it did something, it just didn’t have the effect of putting your file in the list. The action it took was it emptied your recent files list – took all the names of the files out of that list.

                    After restarting N+, the list is still empty.

                    In Notepad++ nomenclature (and every other text editor I’ve used over the last few decades, including UltraEdit), exiting the application and closing a file are two separate actions. Notepad++ does not necessarily consider a file closed just because you exited the Noteapd++ application and re-ran the application. If you want Notepad++ to add the file to the list of recently closed files, you have to close it, in Notepad++'s understanding of the verb “to close”, which is by using the File > Close action, or the toolbar equivalent, or the X button on the tab. As far as you have described, you haven’t performed the act of closing the file yet. As soon as you do, you will see the file’s path end up in the Recent Files list.

                    I checked/unchecked Settings > Preferences > Recent Files History “In submenu”, it makes no difference: The file is still not listed.

                    Clicking the checkmark off and back on won’t add the file to the list of files that have been closed. Only closing the file will do that.

                    I hope this time, I was more clear, and you are able to learn how to add a file to the list. If not, I am not capable of teaching you.

                    Alan KilbornA 1 Reply Last reply Reply Quote 1
                    • Alan KilbornA
                      Alan Kilborn @PeterJones
                      last edited by Alan Kilborn

                      @PeterJones said:

                      exiting the application and closing a file are two separate actions

                      Interestingly…

                      But wait…first @Shohreh should NOT read this post to avoid any further confusion! Danger! Warning!

                      Continuing…

                      The act of exiting Notepad++ will cause the open tab files to actually close, at least with the settings I use: “Enable session snapshot” unchecked.
                      I found this out because a short time ago I was experimenting with the FILEBEFORECLOSE notification and I noticed that it would be called when I exited Notepad++ (once for each tab), not just when I manually closed a file.

                      So what Notepad++ is doing is closing out all of the tabs after writing the default session data to session.xml.
                      (It makes sense because this act of closing is (probably) what causes the prompt-to-save for any unsaved tabs.)
                      When Notepad++ is next started, it reads the session file and opens the files it finds there.

                      In this case, even though files are being closed, they aren’t saved in the “recent files” list. There must be something in the code that prevents this from happening during closure via shutdown.
                      In theory, it could add these closed files to the “recent” list, and then remove them on the next startup (because files that are opening are removed from the list), but I don’t think this happens because the list is of relatively small length and this extra saving/restoring would push legitimate list entries off the end of the list.

                      xomxX 1 Reply Last reply Reply Quote 2
                      • xomxX
                        xomx @Alan Kilborn
                        last edited by

                        @Alan-Kilborn said in [8.7.1] File doesn't open expected file in list:

                        In this case, even though files are being closed, they aren’t saved in the “recent files” list. There must be something in the code that prevents this from happening during closure via shutdown.

                        https://github.com/notepad-plus-plus/notepad-plus-plus/blob/de1a04038b45df4e25f81f8bef1008b5a978106d/PowerEditor/src/NppBigSwitch.cpp#L2694

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