Version: (using Devel) Installed from: Compiled sources OS: Linux if you open a file from command line i.e. kate file.extension, kate doesn't load plugins(file system browser, terminal etc..)
Confirmed on revision 762662
The plugin configuration is session specific, so you need to configure the defaults. I don't know if there are ways we can improve this - by makeing it easier to save defaults, for example by asking, or making it more obvious that it is session configuration that is saved, or ...
Created attachment 23127 [details] Fix for this problem On 3 branch we had at kateapp.cpp::startupKate() method: // user specified session to open if (m_args->isSet ("start")) { sessionManager()->activateSession (sessionManager()->giveSession (QString::fromLocal8Bit(m_args->getOption("start"))), false, false); } else { // let the user choose session if possible if (!sessionManager()->chooseSession ()) { // we will exit kate now, notify the rest of the world we are done KStartupInfo::appStarted (startupId()); return false; } } now on the else part on the 4 version we also force: else if (!m_args->isSet( "stdin" ) && (m_args->count() == 0)) // only start session if no files specified This means that the tabs added by activateSession() are never added. The proposed patch relaxes the first part of the if(). On the KDE 3 version, if you do "kate foo.txt" you are still asked for a session. I think that was "wrong". This way this is fixed, the asked file is opened and the session is "activated". All the magic is at startupKate() method. OK to commit ?
Created attachment 23128 [details] Fix for this problem (take 2) This patch is very similar to the other proposed, but it is slightly more polite, doesn't mix things. Anyway has the same effect. Can be easier to understand. Can this patch be committed ?
We need to always start the default session, which should be implicit if i remember correctly. Is that what happens with the last patch?
Using giveSession(i18n("Default Session")) should use use the default session.
I disagree. We shouldn't open the default session. The default session can be opened for instance if we do "kate" without parameters. If we add a file to the parameters list of the kate executable, then what we expect to see is that list of files opened. If your default session had 100 files and we do "kate foo1.txt foo2.txt foo3.txt" we will have with your proposal 103 files, when we wanted to modify foo1.txt foo2.txt and foo3.txt. Trying to make things easier we could try to close the rest, and only having what I expected on the files list. That could result on a overwrite of my default session with the 3 files instead of the 100 that I had before if I exit and the auto-save-session feature is enabled. I really think we should ask for giveSession(QString()). If you think i18n("Default Session") still should be used, just tell here and I will commit the same patch as the last one but instead QString(), i18n("Default Session").
The default session should *be* katerc in my opinion. That would load all the default settings, and settings would automatically be saved there when no other session is selected. I do see the problem with files, but maybe we should simply disable that in the defaults. But it is an area that needs consideration, as it is NOT well thought out as is. My take is * we should always have a session, because some data otherwise can't be saved (for example recent files) * If no session is specified the session file should default to katerc. * If files are given on the command line, the file list should only be loaded if a session is also explicitly given
> My take is > > * we should always have a session, because some data otherwise can't be > saved (for example recent files) The proposed patch activates a session with no name. It is *only* done so when we give parameters to kate executable. If you run "kate" only you will be asked for a session (or not) depending on your katerc preferences. The only thing that can break those preferences is to give files to be opened as parameters. > * If no session is specified the session file should default to katerc. > > * If files are given on the command line, the file list should only be > loaded if a session is also explicitly given From my point of view what Kate on KDE3 does here is in some way, wrong. If you have kate configured to ask you for a session when loading, it will still ask you for a session when you give files to be opened as parameters. From my point of view that is wrong. When you specify files as parameters to the executable you want to start editing them at the moment, and don't care about he session. In that case you should have opened "kate", opening the session for later opening those files inside kate.
On Saturday 19 January 2008, Rafael Fern
Hehe, and that is what the last attached patch does. :) - Running "kate" will ask for your session or not, depending on your preferences there. That is not touched. - Running "kate file1 file2 ... fileN" will not ask for session. Never. It will just open those files in a session with no name, activating the session, and therefore using the defaults from katerc.
I think the missing part is just making session data be saved to katerc as well. And I think we should loose the autocreated 'default session'.
When a user launch kate with a list of files, kate should open that list, without extra parameters and esotheric sessions management :-) Just open that files.
I am afraid those preferences weren't saved before either. Just check it. Without the patch if you disable the "Terminal" complement for instance on a session, close kate and open the session the terminal complement will be loaded anyway. So the patch is unrelated to that problem. That problem is apart as far as I see.
On Saturday 19 January 2008, FiNeX wrote: > When a user launch kate with a list of files, kate should open that list, > without extra parameters and esotheric sessions management :-) > > Just open that files. That is a stupid comment simply. Kate needs to load and save its configuration in a way that makes sense, which is obviously not the case currently.
It is not stupid: it's what, imho, users needs (or at least I'd like). If internally kate needs to load settings, in this case it should simply use the default settings. Probably an user which starts kate from the shell, is a bit more skilled than one which starts it from the GUI, probably the default settings should be good enough for him :-) But this is only my opinion, maybe it due to a limited vision of the whole problem. Anyway, I've just tested the current trunk and the problem reported initially seems fixed now! :-)
related: bug #156330
*** Bug 126952 has been marked as a duplicate of this bug. ***
Yes, it's fixed because Anders funnily enough fixed it 3 months later in another report with a very similar patch. So mark as duplicate! :) *** This bug has been marked as a duplicate of bug 159767 ***