Bug 268913 - Load a default session that can be saved on application closure, so session saving is automatic like a web browser
Summary: Load a default session that can be saved on application closure, so session s...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 332949 402598 418183 433237 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-19 20:42 UTC by Mike Robinson
Modified: 2022-09-28 18:37 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Robinson 2011-03-19 20:42:19 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

I installed kde 4.6.1 through the Kubuntu repositories on two completely different computers (one laptop and one desktop) and both have exactly the same effect. "Load last-used session" is selected, however when you close the window and reopen it, the session is either not saved upon close or not resumed upon reopen.

Reproducible: Always

Steps to Reproduce:
I have a feeling this doesn't affect other versions, but only kubuntu, so:
1) Install KDE 4.6 from ppa:kubuntu-ppa/backports
2) Select "Load last-used session" in the preferences
3) Open one or more files
4) Close and reopen kate



OS: Linux (i686) release 2.6.35-28-generic
Compiler: cc
Comment 1 mike 2011-03-27 03:53:45 UTC
Somehow I fixed the problem. I clicked on Sessions > Quick open session > default (which was the only option) and it loaded a session that was saved from before the kde 4.6 upgrade and now it works as expected.

Also, before this was fixed, I noticed that the "recent documents" were not saving either.

Hopefully this helps someone trying to debug this error.
Comment 2 Christoph Cullmann 2012-11-01 01:09:04 UTC
If that works for you now, that is fine, I guess we won't find there any error, as we can't reproduce, too.
Comment 3 Mike Robinson 2012-11-04 00:54:18 UTC
This bug actually still exists for me even after OS reinstall. When telling kate to remember the last session, the "Last Session" variable of ~/.kde/share/config/katerc should change from blank to "mysession.katesession", but this doesn't happen, so when you open up kate, it always starts with a new window. I tried manually editing the above file with that value, but upon one of the updates it got overwritten again.

See the following question I opened on askubuntu: http://askubuntu.com/questions/57855/how-do-i-get-kate-to-restore-last-used-session

Another way to reproduce this bug: 

1) In ~/.kde/share/config/katerc change the Last Session line to "Last Session=" with nothing after it
2)  Open Kate and set it to remember "load last-used session" (if it isn't already)
3) Open a file with Kate and close and reopen the window
Comment 4 Michal Humpula 2013-12-31 21:33:22 UTC
Hi Mike,

do you still experie this problem with current version of kate?
Comment 5 Mike Robinson 2014-01-02 20:37:29 UTC
Yes, I am still having the same problem with Kubuntu 13.10: KDE 4.11.3 and Kate 3.11.3.
Comment 6 Michal Humpula 2014-01-02 20:48:46 UTC
Hi Mike,

the session workflow changed a little bit trough time (there is no explicit default session now). I've noticed that you don't select any session specificaly in your "steps to reproduce". If you just start kate to new session, open files and then quit kate, the last session will be none, i.e. the new (unnamed) session doesn't count in this case. You have to quit kate with named/saved session.

Is this the case you are describing?
Comment 7 Mike Robinson 2014-01-02 21:16:11 UTC
Hi Michal,

Thank you for your reply. I think Kate is a bit misleading then. If I tell my web browser to resume the last used session, it opens up my previous tabs. If I tell KDE to restore my previous session (Settings > Session Management), it opens up my previously used windows when I log in again. I would expect that when Kate says "Load last-used session", it would open up all the previous files that were open when Kate was closed. 

However, if the desired behavior is to have the user first create a session and then save it and only then can it be resumed, perhaps some sort of error message should appear when the "last-used" session is not available.
Comment 8 Andrew Crouthamel 2018-09-06 23:10:09 UTC
Hi from the Bugsquad!

I am going to change this severity to wishlist since the reporter can make this function, but has to create a session first. I can confirm the session loading works, but agree it is confusing.
Comment 9 kde 2018-10-27 22:03:24 UTC
This is a bug, and not a wish!
I came here today because I wanted to file a bug about exactly this totally unexpected behavior of Kate and first searched if it is already reported. It is reported 5 times, exactly this or a closely related bad behavior, the first reports dating back to the year 2011 and 2013. Calling it a wish because someone might by chance find some hidden workaround is not helpful for the user. The repeated reports clearly show this. Classifying it a wish might be good to fake the statistics about KDE software related bugs to look better, though. But calling it a wish does not resolve the bad behavior and only pushes it deeper into the state of "will never be cared for". As you can read, upon reading the last comment, my mood changed from "Hmmm, I should spent some time to write a helpful bug report" to "I like KDE PLASMA and will continue to use it, but it might be better to not expect the KDE applications to receive support and before even loosing time to write a bug report simply stay with other solutions, like in this case Geany". However, as I have the other report numbers already at hand, here they are:
https://bugs.kde.org/show_bug.cgi?id=268913   (this one, from 2011!)
https://bugs.kde.org/show_bug.cgi?id=319396   (from 2013)
https://bugs.kde.org/show_bug.cgi?id=342057   (from 2014)
https://bugs.kde.org/show_bug.cgi?id=332949   (from 2014)
https://bugs.kde.org/show_bug.cgi?id=382906   (from 2017)
I wanted to write all this from those 5 reports in my own bug report, but as all this is already reported, I should not do so. Now I am unsure. Maybe I have to report it as a new bug, so that after so many years this strange and not expected behavior once might receive attention.
I am using on Debian 9.5 (currently the stable Debian edition):
Kate 16.08.3
KDE Frameworks 5.28.0
Qt 5.7.1 (built against 5.7.1)
The xcb windowing system

*** This bug has been marked as a duplicate of bug 319396 ***
Comment 10 Nate Graham 2021-02-22 00:19:40 UTC
*** Bug 402598 has been marked as a duplicate of this bug. ***
Comment 11 Marcell Fulop 2021-02-26 07:11:39 UTC
Isn't 418183 also a duplicate?
Comment 12 Méven Car 2021-02-26 13:41:31 UTC
*** Bug 418183 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2021-07-17 02:56:26 UTC
Fixed by Michal Humpula with https://invent.kde.org/utilities/kate/-/commit/88c6ab08f48fd3c088470716a1d175496a3960d2 in Kate 21.12!
Comment 14 Nate Graham 2022-07-21 16:53:48 UTC
*** Bug 433237 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2022-07-21 16:54:14 UTC
*** Bug 332949 has been marked as a duplicate of this bug. ***
Comment 16 Michael D 2022-07-21 16:57:06 UTC
Not working for me on a clean install of version 22.04.3 of Kate (on Manjaro). I had to save the session first before it would load it on startup.