[Github-comments] [geany/geany] session_split branch long term issue: applicability to projects (Issue #3015)

xiota notifications at xxxxx
Wed Nov 24 13:21:29 UTC 2021


> it doesn't mean .session and .geany is next to each other

I just listed the major options I could think of at the time.

> basically I'm undecided between `~/.cache/geany/sessions/` and `~/.config/geany/sessions/`

It depends on what you consider "session" settings.  It seems different classification schemes are being mixed up under the "session" banner.  For instance, @elextr stated that only settings affecting edited files are config and all GUI settings are session.  That seems to better fit division by shared/personal.  In a project, settings that affect edited files could be shared, while GUI settings are based on personal preference.

I consider any setting Geany automatically manages as "session", while settings users explicitly set in preferences as "config".

* window geometry and position are managed by Geany/window manager/etc, *not* explicitly set by user in preferences ⇒ session
* sidebar/msgwin position, also determined by Geany, though *implicitly* set by user ⇒ session
* sidebar/msgwin location (left/right, bottom/right), *explicitly* set by user in preferences ⇒ config
* gray area – sidebar/msgwin visibility.  There is a setting in preferences.  But Geany uses it to save state.  Since Geany manages it, I would consider it session.  A couple ways to resolve this:
  + Save the *explicitly* set preference as "config".  Save the auto-managed state in "session".  Session normally overrides config, but when session is reset, the config is used as the default.
  + Add a setting for whether to save/restore state or always use the explicitly set config.
  + Just pick one (config/session) and consider it an "exception" to usual rule.

Using this guideline, pretty much anything in session can be regenerated without consequence (since they'd all be auto-managed).  If the session file is lost, the worst that would happen is the user would have to reopen some files.  So `~/.cache` would be suitable.

But if "session" files contain a lot of settings that can't be regenerated, `~/.config` might make more sense.  But then the config folder could become cluttered with orphaned session files (whose original project files have been moved or deleted).  So it would be a bit more important for Geany to be able to periodically clean up the session folder.  (Clutter in `~/.cache` is more tolerable, but I'd still want to eventually add cleanup capabilities to Geany.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3015#issuecomment-977872756
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211124/04c3b1b1/attachment.htm>


More information about the Github-comments mailing list