Bug 436085

Summary: Newly created session has all plugins disabled
Product: [Applications] kate Reporter: Gleb Popov <6yearold>
Component: sessionsAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph, nate
Priority: NOR    
Version First Reported In: 20.12.3   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed/Implemented In: 22.08.0
Sentry Crash Report:

Description Gleb Popov 2021-04-23 09:06:44 UTC
When I start Kate from the command line and pass -s option with unknown session name, it creates a new session. However, no plugins are enabled by default, which is a bit confusing and absolutely not neat.

At the same time, when creating a new session with GUI, it uses default plugin set.


STEPS TO REPRODUCE
1. kate -s my-new-session somefile.cpp

OBSERVED RESULT

1. Kate opens and the session is created, but no plugins are enabled. For instance, there is no side panel at all, because "Project" and "File Browser" plugins are disabled.
2. Go to .local/share/kate/sessions and open my-new-session.katesession
3. The [Kate Plugins] section is filled with "false" values.

EXPECTED RESULT

The plugins section is filled with the same values as other .katesession's created with GUI.
Comment 1 Christoph Cullmann 2021-06-01 21:01:11 UTC
This merge request would fix that as a side-effect

https://invent.kde.org/utilities/kate/-/merge_requests/424
Comment 2 Christoph Cullmann 2022-06-16 17:22:36 UTC
Git commit 68bf53945c9b908fa9a9bc23590864205d0615c4 by Christoph Cullmann.
Committed on 16/06/2022 at 17:22.
Pushed by cullmann into branch 'master'.

ensure new sessions at have the default plugins

ATM if you start kate via

kate -n -s sjdfjskljfklsjdlf

and the session doesn't exist, even the default plugin
loading state is lost

M  +1    -1    apps/lib/katepluginmanager.cpp

https://invent.kde.org/utilities/kate/commit/68bf53945c9b908fa9a9bc23590864205d0615c4
Comment 3 Christoph Cullmann 2022-06-16 18:46:40 UTC
This should do the job.