Bug 433237 - Kate doesn't restore session on startup
Summary: Kate doesn't restore session on startup
Status: RESOLVED DUPLICATE of bug 268913
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: 20.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-19 10:36 UTC by Dan Dascalescu
Modified: 2022-07-21 16:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screencast (613.92 KB, video/webm)
2021-02-19 10:36 UTC, Dan Dascalescu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Dascalescu 2021-02-19 10:36:21 UTC
Created attachment 135898 [details]
Screencast

SUMMARY
Another regression vs. KDE 5.18: Kate doesn't restore the last session

STEPS TO REPRODUCE
1. Ensure that in the Session settings, "Load last used session" is checked
2. Open two files
3. Exit Kate
4. Launch Kate again

OBSERVED RESULT
Kate starts with an Untitled blank document

EXPECTED RESULT
Kate should load the two files that were open when the user exited Kate.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.21
Comment 1 Jason Straight 2021-02-19 14:50:50 UTC
I've never used this feature before, but it got me curious.

If you open some files and save/name a session then it will open the last used one.

If you don't save/load a session then you seem to be in a sessionless instance and it therefore will not load the last session, because you weren't technically in a named/saved session.
Comment 2 Nate Graham 2021-02-19 17:13:03 UTC
FWIW Kate is an independent application and not released as a part of Plasma, and also there is no such thing as "KDE 5.18"; there is a Plasma 5.18 though :)

Works for me FWIW.
Comment 3 Dan Dascalescu 2021-02-19 21:03:11 UTC
> FWIW Kate is an independent application and not released as a part of Plasma,
> and also there is no such thing as "KDE 5.18"; there is a Plasma 5.18 though :)

Right, I see `kate` as a separate component at bugs.kde.org. I got confused by branding like "KDE neon 5.21".

> If you open some files and save/name a session then it will open the last used one.

Sounds like Kate should save the files to the default session if "Load last used session" is checked. If I run it with `-s Default`, it does just that.

I believe the behavior of not restoring the session when that "Load last used session" is checked, is counter-intuitive, because the user has no indication that they must save the session before it takes effect.
Comment 4 Dan Dascalescu 2021-02-20 08:16:48 UTC
@Jason: that makes sense from a technical POV, but the handling of the default session has been confusing users for a decade:

* bug 268913
* bug 319396
* bug 342057
* bug 332949
Comment 5 Michael D 2022-07-21 16:48:22 UTC
Just came across this issue. I don't think it's a reasonable expectation that the user know to create and save their session first so that it can be restored.
Comment 6 Nate Graham 2022-07-21 16:53:48 UTC
This was supposed to have been fixed in Kate 21.12; duping to Bug 268913 which was tracking that.

If it's not working for you in a version later than 21.12, please leave a comment there describing specifically what's not working. Thanks!

*** This bug has been marked as a duplicate of bug 268913 ***