Bookmarks are gone after closing the file
I open the file and set the bookmark.
- if I close the notepad (7.6.6., 64 bit) and reopen it, the bookmark is still in the file.
- if I keep the notepad open and close only the file and then reopen it - the bookmark is gone.
if I keep the notepad open and close only the file and then reopen it - the bookmark is gone.
because session.xml is written when npp stops and not reevaluated each time a file gets loaded.
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.
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
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
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.
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.
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?
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.
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.