Odd Query Regarding Sessions & Preferences
-
I have had a quick search on the forum and I can’t see anything pertaining to this so sorry if this is a duplicate, if so could someone please point me in the right direction? ;)
I use sessions quite a lot, I group certain things together, I have noticed that some of my sessions seem to have different settings to other sessions, one quick example is that if I go File > Save Session some will overwrite the existing file (with no file extension) while other sessions will automagically add a .txt extension meaning I have to open the folder, delete the old session file and rename the new one removing the .txt extension (then confirming I’m not insane or a blathering idiot who doesn’t know what they’re doing ;), obviously all these steps are a tad annoying. This is the main thing I have noticed but it has made me hesitant to change any preferences, whether I am in a session or not, in case it isn’t going to be implemented across the board ;)
What I would really like to know is where the preferences/config file for each session is, then I would be able to copy the pertinent parts from a well behaved session into the sessions that aren’t behaving themselves but the only preferences I can find referenced are in %APPDATA%\Notepad++ and while it has a config and session xml file neither seem to have any means of handling sessions differently, I’ve even tried copying and renaming the session save files so they have a .xml extension then editing said file in NP++ to see if there are some hidden settings in there… but alas again there don’t seem to be any entries for the session as a whole just the files included in the session, while this makes perfect sense, it leaves me at a loss as to why/how my various sessions are behaving differently to each other?
Can anyone advice what is going on here?
-
Should probably have said I am using NP++ 7.8.5 (32 bit) on Win 10 Pro 64 bit… currently installing NP++ 7.8.5 (64 bit) which wasn’t available when I originally installed and it just updates as and when (not that I am lazy or anything ;)
-
@Miss-Chief said in Odd Query Regarding Sessions & Preferences:
some of my sessions seem to have different settings to other sessions
Can you give a specific “setting” example?
other sessions will automagically add a .txt extension
Makes me think of “old style” Open/Save dialog setting where, if you don’t supply an extension on a file at save time, the current filter setting (usually
*.txt
) extension (thus ->.txt
) will be auto-applied.Perhaps best advice for this would be to always add
.xml
to the end when you are saving a session?don’t seem to be any entries for the session as a whole just the files included in the session
That is my understanding; pretty much just file info. Perhaps something interesting will be revealed if you can tell us what other setting(s) you suspect is being saved.
Also, do you use multiple instances of N++?
-
Also, perhaps after your current problem is “solved”, given this situation:
I use sessions quite a lot, I group certain things together
Maybe you should consider using the Session Manager plugin?
-
Thanks for your reply… my issue really is why are some sessions doing it and not others rather than the issue itself, if that makes sense?
I just don’t get how some sessions are behaving differently to others.
However, I’m a bit miffed now as the 64 bit version seems to be working as I would expect… not that I am complaining that it’s working but this has been bugging me for ages (wouldn’t have posted otherwise).
Question now is, is it a bug with the 32 bit version or was it just a bug because I needed to do a fresh install (it has been a while since I did that, see aforementioned lazyness ;), although I didn’t do a clean install, it kept my preferences etc. I probably should have tried a fresh install before posting, it just seemed like there was some secret/hidden preferences file for the individual sessions rather than a buggy install :/
Perhaps I will reinstall the 32 bit version and see if the issue comes back, I suppose I could try creating some new sessions aswell, to see if that might be a contributing factor… this kind of thing bugs me no end, (despite the aforementioned lazyness ;).
I will have a look at the session manager plugin once I’ve finished fiddling, I did see it mentioned when I was looking into this issue but I didn’t want to complicate things when it wasn’t behaving as I would expect, now it is I will probably take a looksee, I certainly use sessions and NP++ an awful lot, not just for code either (editing/spellchecking posts, saving common comments, links, to do lists, you name it ;), I would be lost without NP++ and the sessions ;)
-
Well, I guess good that it seems to be working for you now, but bad for looking deeper into the why of the not-ideal situation you had before.
-
@Alan-Kilborn said in Odd Query Regarding Sessions & Preferences:
Also, do you use multiple instances of N++?
Yes, each session would be loaded in a separate instance, plus I might have another instance open that isn’t a session, each instance would have multiple files in it, usually I have 2-4 instances and while I might only have 1-3 files open in an instance that doesn’t have a session loaded, there would be anything from 10-30 files in a session. It varies, it depends what I’m doing and what sessions I need on hand at the time. I do try not to have 5 or more instances running but some of the sessions do have rather a lot of files in them.
The issue definitely happened to specific sessions rather than different ones at different times, this is why I didn’t think it was a bug… one of my sessions that I keep open almost constantly would always overwrite the session file but another one never overwrote the file, it didn’t matter if I had multiple instances or if that was the only one, granted I have a lot of session files and I can’t swear blind all of them were consistent but those two are in frequent, near constant use and I know one of them always worked and one never did.
You think multiple instances would impact it? Or you think I am overloading my system and it wasn’t coping? While I admit I am not always kind to my systems resources (this is mainly cause I am bad at leaving browser tabs open), one of the last things I do before a reboot is save my NP++ files and session, this is cause as I close things I add links/notes to remind me to do/finish this and that when I get back… given I have closed everything else at this point there should be plenty of system resources available.
Bah, this is annoying… I will try my other machine, it’s been a while since I used it but I’m pretty sure it happens on that too (if it didn’t I would have known it was a buggy install and I would have tried reinstalling, I might be lazy but I’m not that bad ;), that is also running Win 10 64 bit and NP++ 32 bit.
-
@Miss-Chief said in Odd Query Regarding Sessions & Preferences:
Can anyone advice what is going on here?
https://community.notepad-plus-plus.org/topic/19151/session-bug-in-v7-8-5
-
@gurikbal-singh
Downvoting because you are clearly spreading misinformation; totally unrelated to anything discussed above.
-
@Miss-Chief said in Odd Query Regarding Sessions & Preferences:
You think multiple instances would impact it?
Yes, I think it could. Each instance shares the same settings, and the instance you close LAST will write the settings.
So say you have 2 instances open, call them A and B. If you go into instance A’s settings and you turn off the tool bar, instance A’s tool bar will (obviously) not be shown but instance B will still have a tool bar.
If you then quit instance A and then quit instance B and then restart Notepad++, what you get will have a tool bar.
However, if you had quit instance B and then quit instance A and then restarted, what you get will NOT have a tool bar.
I don’t think the automatic session management stuff works the same way as a setting like the tool bar, at least a quick test didn’t show that it did, but…
I avoid this sort of multi-instance running myself, for these types of reasons.
At most I ever want/need is one additional instance, so I have a secondary portable version of Notepad++ hanging around for just such a need. I have a Run menu item set up to run this secondary instance from my main instance. Since both instances have totally different settings and sessions, I don’t have any problems. Such a setup is convenient for me, but I recognize that it isn’t necessarily convenient for everyone.