Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Support session renaming #259

Open
hadronized opened this issue Mar 7, 2024 · 1 comment
Open

Support session renaming #259

hadronized opened this issue Mar 7, 2024 · 1 comment
Labels
prio:medium Something requiring attention TBD To Be Determined

Comments

@hadronized
Copy link
Owner

hadronized commented Mar 7, 2024

From the beginning of KTS, we’ve always assumed that sessions do not get renamed. That is obviously a wrong assumption and we should move away from that.

A possible solution would be to:

  • Upon starting, we provide the session so that KTS knows who we are.
  • KTS creates a token for us, and responds with a command to store that token as a set-option global thing. It internally maps the session to that token.
  • We use that token instead of the session from now on. KTS knows which session the token maps to so it can reply.
  • If the session changes, KTS still receives the same token, but it now needs to talk to the right session. Supporting that probably requires Kakoune to write its current session under a token folder or something to provide the mapping.

The only issue with that is that we cannot really detect dead sessions anymore, besides with KakEnd. If for whatever reason KTS crashes and restarts, it has to be able to restore all the active sessions. We need to think a bit about that problem.

Another alternative would be to allow users to issue a command to reinit after a session rename. That would invalidate the previous session and would restart from scratch, which is a bit a pity, but okay.

@hadronized hadronized added the TBD To Be Determined label Mar 7, 2024
@hadronized hadronized added the prio:medium Something requiring attention label Apr 23, 2024
@hadronized
Copy link
Owner Author

We should get a hook for that ~soon, so we should defer that until we get the feature, it will make support renaming super simple.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
prio:medium Something requiring attention TBD To Be Determined
Projects
None yet
Development

No branches or pull requests

1 participant