New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[session-split] More things to session #3007
Comments
Thanks for the list! I think I'll do some of these that I'd consider no-brainers but others are more or less debatable. E.g. I clearly disagree on virtualspace but msgwin_orientation is an item where I'm not sure myself. I do not want to keep the branch creeping until all possible discussions are settled, so thanks for the offer to merge it beforehand. |
The list is only a starting point for discussion, definitely not definitive, thats why I think its ok to merge the branch since it can take time to consider settings that are unclear, but in the meantime other PRs changing settings can get built on top instead of session-split getting conflicts. The list is just suggestions, so I have defaulted to yes if I'm unsure so it can be looked at by others. The Geany project does not have a clear definition of what constitutes a "session" setting, since until now it didn't matter :-). What I have used as an initial definition is a setting that an individual user is likely to change, possibly often, and it doesn't affect the files being edited, hence for example GUI settings are session, but not indent settings.
Given how many settings there are I didn't look all of them up in the manual/code when making the list, but relied on memory or the setting name (risky). Having looked at it, I agree But for another example |
The following ones are already in session.conf (position_* with #3003, current_page already now). Did you compile the right branch?
|
This is what is in session.conf, note
I used a nice fresh clone to build from, scrolling back through terminal history showed I did (in ~)
opened about.c change a couple of settings and window size and close geany, read the config and session files. I havn't yet tried running the branch with an existing config dir, must do that. |
Seems to work, @kugel- I suggest merging the session-split branch ASAP so other settings changes can be built on top. |
That's almost just the plain definition of an ordinary preference? @kugel- mentioned elsewhere...
So a method to find sessionable preferences would be to run diff on sequential copies to see what preferences are frequently changing.
This probably wouldn't work well for kugel's use case because his goal appears to be to sync a base config across multiple computers. Infrequently changed GUI settings should be synced in that scenario. Another split might be GUI vs non-GUI preferences... But then there would be too many different config files. (Or not. There are already a lot of config files.) |
I said "and it doesn't affect the files being edited, hence for example GUI settings are session". This would exactly support the @kugel- use-case since its pretty likely his screen sizes are different between laptop and workstation, so GUI things (geometry, location of message window, size of message window etc) are likely to be different.
Well its an idea, we can use mine, but by my usual usage almost nothing would be session except the files 😁 In other words thats too individual to be useful. |
Location of message window and sidebar do not depend on screen size. But they are settings users would likely want synced across computers, assuming they don't just use the defaults. Even if they don't sync settings across computers, having to reconfigure msgwin/sidebar location whenever a new session is created would be annoying. With your approach, almost everything is session because everything is eventually tied to GUI. Very few settings affect only the edited file. Indentation width does so only because of tabs-to-spaces. For projects, like Geany, where real tabs are used for indentation, it would be a session preference (by your definition) because it affects only the appearance of the file.
Only if only your configs were used to find sessionable preferences. |
The preferable position/size depends on window size, and the possible window size depends on screen size, a window wider/higher than the screen is impossible. A wide (relative to height) window supports having the message window at the side and a wider symbols pane, with a less ultra wide window it is preferable to have it on the bottom, and a Raspberry Pi window supports not much of either. These are most definitely not the settings users want synced between machines unless they are exactly the same screen and the user chose a similar window size. If the two machines are the same the user just syncs both
Reducio ad absurdum.
Yes, if the capability to create a new session is added to Geany it should copy the current values, its on the same machine as the current session, so it should have the same layout by default. But ATM the only way within Geany to create new session files is to create a whole new config directory with
Or your configs, or @kugel-s .... everybody has different use-cases. My point was that removing existing use-cases because its not how you or I use Geany is not acceptable. |
A better rule of thumb for session variables would be anything the user does not or cannot set explicitly. Or put another way, Geany should avoid resetting/undoing what the user has explicitly set. If there is a setting in the preferences dialog, or elsewhere, it should not be a session config. This has precedence, for instance, with filetype auto-detection. Geany does not redetect filetype on reload because the user might have explicitly changed it.
sidebar/msgwin visibility is a gray area. There is a setting the user can change explicitly, but Geany saves state by changing the setting directly. Since state saving is automated, I would consider this a session preference. Gray area settings could be removed from preferences, since Geany automatically manages them. The menu to show/hide would remain (an "implicit" setting). Or the meaning of the setting in preferences could be changed (eg, startup default vs restore state), so that Geany saves state by changing a different variable. @elextr Your definition is overly inclusive. Only a handful of settings don't fit your criteria as session variables. You essentially confirm this when you stated, "I have defaulted to yes if I'm unsure". (You give a different reason for that default, but using an unsuitable definition of "session" would contribute that that problem.) The core of the definition you suggest is:
That would be detected by running diff on sequential config files (as I suggested). Although I did not mention collecting samples from multiple users, I pretty much took it as a given since it is a common, well-known approach to avoid over-specificity. Settings that change more frequently across a greater number of users are better candidates than settings that do or don't change for only one (or a few).
That is arbitrary. You and other devs have described project files as just "named sessions". You state that indent settings are not session config, but indent settings are part of project files (indicating that it likely is session config). There are only a handful of settings that affect the edited file. Default encoding, line endings, indent (but only if tabs to spaces is enabled). The vast majority of other settings affect the editing environment (eg, GUI), but not the edited files. |
@xiota I would have to say your definition is overly exclusive, it leaves sessions with almost nothing in them, so conf (and project when its split) will still be changing often, and avoiding that is one of the reasons behind the split. To be clear I don't believe there is a simple absolute rule that can always be applied, we need to use some brainpower, not rules, or statistics, the guidance I expressed is a starting point.
To find out how often something is changed this would need to be performed many many times, not gonna happen.
That is a term to indicate that they are very simple, not like VS or Eclipse "Projects". The indent settings and the session files list are in one file now because that is all there is, it does not guide where they should be when the session and project are split. |
If Geany does not change settings that the user explicitly sets, why would the conf file frequently change unless the user is constantly changing settings? It seems part of the problem is not so much config/session split, but also shared vs individualized settings... eg, so that a project/config file could be included in a git repository. In this context, it makes sense that you would want GUI settings to be considered "session" (really, individualized). (Some of your comments about project behavior also make sense in a shared settings context.) |
Regarding plugins, I would consider all of them to be session prefs.
|
Anything below tools is system dependent. On my work machine I might be forced to Ubuntu while on my laptop I'm free to use KDE, or I cannot install my favorite grep clone system-wide on my workstation. Apart from that we have rather sane defaults that work everywhere (except maybe terminal_cmd). I would make a PR migrating these to session.conf
|
That's the point. On a kde "Konsole" is more appropriate, and thus it's probably that a user uses gnome-terminal on machine A and konsole on machine B. |
Ahhh, I misread your "(except maybe terminal_cmd)" as "maybe not move that to session", but on re-reading it I see its referring to the default not being always sane. So in that case we agree all four should be moved to session.conf. |
Right, I was refering to the default. xterm is not a great default. Unfortunately, there doesn't seem to be a XDG or freedesktop standard for "default terminal application" so I won't touch the default. |
The session split branch seems to work AFAICT.
But there are lots of settings in
geany.conf
that I believe are session settings, essentially all the GUI ones for example.Below is the
geany.conf
created by this branch with "yes" or "no" beside the ones I suggest, don't mind if the branch is merged into main and these added after (discussion), @kugel- can choose.The text was updated successfully, but these errors were encountered: