Community
    • Login

    Bookmarks are gone after closing the file

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    9 Posts 4 Posters 3.7k 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.
    • Miha Mazzini97M
      Miha Mazzini97
      last edited by

      Hi,
      I open the file and set the bookmark.

      1. if I close the notepad (7.6.6., 64 bit) and reopen it, the bookmark is still in the file.
      2. if I keep the notepad open and close only the file and then reopen it - the bookmark is gone.
        Why?
        Please, help.
      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @Miha Mazzini97
        last edited by

        @Miha-Mazzini97

        if I keep the notepad open and close only the file and then reopen it - the bookmark is gone.
        Why?

        because session.xml is written when npp stops and not reevaluated each time a file gets loaded.

        1 Reply Last reply Reply Quote 2
        • Miha Mazzini97M
          Miha Mazzini97
          last edited by

          Thanks. Ah, so the only solution is cluttering of the Notepad with all the possible files open at the same time. :(
          I thought it was a bug.

          1 Reply Last reply Reply Quote 0
          • guy038G
            guy038
            last edited by

            Hi, All,

            Indeed, I’ve never noticed this fact ! And I’m wondering : should we consider this behavior as a minor bug ?

            I means, on closing an individual file, N++ could note the marked line numbers in the appropriate <File........</File> section of the session.xml file !

            I verified that, even if you slightly modify a file, containing bookmarks and re-saved it, bookmarks have disappeared, after the consecutive actions Ctrl + W, and Ctrl + Shift + T

            BR

            guy038

            1 Reply Last reply Reply Quote 0
            • EkopalypseE
              Ekopalypse
              last edited by

              I wouldn’t call it a bug - works like designed.
              I mean, how should npp know, that a file which gets manually closed with bookmarks is
              considered to be opened again under the assumption to see this bookmarks or not?
              And how long should it store that state? What if I have opened it in another instance
              without bookmarks and what if the content has been modified externally? And …

              This feature sounds easy in the first place but could become quiet complicated.

              1 Reply Last reply Reply Quote 4
              • Miha Mazzini97M
                Miha Mazzini97
                last edited by

                Hi, the file should be in the “bookmark state” until the bookmarks are manually removed from the file - when the user doesn’t need them anymore.
                Closing and reopening the program to have effect on the file doesn’t feel intuitive. Bookmarks are part of the file, not the program.
                Sorry, years of working as UX expert have taken its toll.

                EkopalypseE 1 Reply Last reply Reply Quote 2
                • EkopalypseE
                  Ekopalypse @Miha Mazzini97
                  last edited by

                  @Miha-Mazzini97

                  the file should be in the “bookmark state” until the bookmarks are manually removed from the file

                  Personally, this would hit me as I always do bookmarking and then close it knowing that there are gone.
                  I would argue that if I open a file I want to see its content only and nothing else.
                  For me, using bookmarks is something temporarily and as soon as the file gets closed
                  should be forgotten.

                  There is always a pro and con about such features and as we see some like it the one
                  or the other way. But if such a feature should be introduced then how should multiple instances be handled?

                  1 Reply Last reply Reply Quote 0
                  • Miha Mazzini97M
                    Miha Mazzini97
                    last edited by

                    Maybe some setting in Preferences, how user wants the program to handle this?
                    Multiple instances: last one to close overrides every other.
                    Working on the file with some other editor: well, we are sorry, we remember the last position and don’t know what you did, dear user, out of the marriage.
                    Thanks for the discussion.

                    1 Reply Last reply Reply Quote 0
                    • gstaviG
                      gstavi
                      last edited by

                      The devil is in the details. We, the users, want our bookmarks to be remembered. But what is bookmark?

                      Is it line number?
                      Is it line text?
                      What should happen when file is modified externally?
                      If I put a bookmark on line 100 and adds 10 lines at the beginning of file, bookmark will jump to 110. Now, when I close the file without saving it, what should be remembered? There could has been 1000 different edits that added and removed random lines.
                      What if the bookmark was placed on a line that was never saved?

                      For IDEs that are workspace oriented things are (a bit) easier because bookmarks can be saved as part of the workspace meta files. Notepad++ is not workspace oriented.

                      Having bookmarks saved as part of the session is a reasonable compromise. I don’t think that core Notepad++ should go beyond that. Find someone to implement Long-Term-Bbookmark-Storage plugin.

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