Bug 295197 - Krusader doesn't save internal editor settings
Summary: Krusader doesn't save internal editor settings
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: krviewer (show other bugs)
Version: 2.4.0-beta2 "Giant Steps"
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
: 297725 303463 318508 319300 (view as bug list)
Depends on: 297194
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-02 10:05 UTC by Alex
Modified: 2018-05-06 00:15 UTC (History)
23 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2012-03-02 10:05:17 UTC
Version:           2.4.0 (using KDE 4.8.0) 
OS:                Linux

Internal editor settings doesn't get saved

Reproducible: Always

Steps to Reproduce:
1. Open file with the internal editor
2. Change something in "Settings"/"Configure Editor", let it be, for example, "Open/Save"/"Advanced"/"Backup on Save"/"Local files", un-check it, click "Ok"
3. Close editor, restart krusader
4. Check settings changed

Actual Results:  
After krusader restart editor gets it's default settings (backup on save is checked)

Expected Results:  
After krusader restart editor get settings those were previously set (backup on save un-checked)

This happens to other editor setting as well, no [Kate *] sections appear in krusaderrc. 
May be it is related and can help, there is another less annoying none-preserved setting - view mode in popup panel. On each krusader start it chooses default view mode regardless to what you had set it to before.
Comment 1 Antonio 2012-06-07 22:05:24 UTC
I also have this problem - started after a fresh system install.
Copying the krusaderrc file from a working old installation (same Krusader version) did not help with the bug, but at least I could salvage some settings from there (like 'no backup on save').
Comment 2 Maciej Puzio 2012-10-05 20:57:26 UTC
I also see this bug in both internal editor and viewer.
Krusader 1:2.4.0~beta1-0ubuntu1
KDE 4:4.8.5-0ubuntu0.1
OS: Ubuntu 12.04.1, kernel 3.2.0-31-generic #50-Ubuntu SMP x86_64
The workaround for the editor is to use kwrite - it is basically the same editor, the major difference being that it is able to save settings.
See also KDE bug 303463
Comment 3 Lukas Jirkovsky 2012-10-13 06:53:24 UTC
I can confirm it too with 2.4.0 beta2.
Comment 4 Charles 2012-10-19 09:31:51 UTC
additional info:
https://bugs.archlinux.org/task/29429

i found that this works on Debian,
and Gonzalo (ChichipioWilson)
found that if we write configuration to config files of krusader,
then we can change all configs from preferences in krusader :)
Comment 5 Alex 2012-10-19 10:22:36 UTC
2.4.0-beta2 from archlinux package still contains this bug.
Although settings still doesn't get saved, them are read and interpreted correctly. So, as a workaround, one can add [Kate*] sections corresponding to desired settings into krusaderrc manually (while it is not running to avoid file to be overwritten by krusader itself on exit).
Comment 6 PhobosK 2012-11-03 18:16:07 UTC
*** This bug has been confirmed by popular vote. ***
Comment 7 PhobosK 2012-11-03 18:19:05 UTC
The bug has been arround for the last couple of versions of Krusader on Ubuntu and Gentoo.

It is still valid for Krusader v2.4.0-beta3 "Single Step" too.
Using KDE Development Platform 4.9.2
OS: Gentoo amd64
Comment 8 WiseLord 2012-11-03 19:05:02 UTC
Same problem too.

As a partial workaround I set up Kwrite and copied section [Kate Document Defaults] from kwriterc to krusaderrc. Problem still here, but at least default internal editor's settings are more adequate for me now.
Comment 9 Jekyll Wu 2012-11-07 08:48:40 UTC
*** Bug 297725 has been marked as a duplicate of this bug. ***
Comment 10 Jekyll Wu 2012-11-07 09:59:47 UTC
*** Bug 303463 has been marked as a duplicate of this bug. ***
Comment 11 Murz 2012-12-01 11:26:50 UTC
Have the same problem too on kubuntu 12.10, is exist any solution for this issue?
Comment 12 Rin 2012-12-13 18:14:49 UTC
I have this issue on my Ubuntu 12.04 too, and it is very annoying. Yet i found a walkaround:

1. install KWrite,
2. Configure it in the way as you would like KrViewer to be configured (they have almost indentical configuration)
3. Exctract from ~/.kde/share/config/kwriterc all sections like "[Kate *]" and append them to ~/.kde/share/config/krusaderrc (or maybe even append whole kwriterc to the krusaderrc; and do not use KrViewer for that because it will spoil the file, use e.g. vim),
4. Restart Krusader and enjoy. Also you can remove KWrite if not needed anymore.

Of cause if you need to change one more option in the configuration, then you will have to go through that process one more time.
Comment 13 Eduard 2013-01-17 10:51:11 UTC
I have some problem. Ubuntu 12.10, 64bit, Using KDE Development Platform 4.9.4
Comment 14 Makowal 2013-01-17 11:26:17 UTC
The same problem on Ubuntu 12.04 32 bit.
The platform of this bug should be changed to not only Archlinux.
Comment 15 Jan Lepper 2013-01-26 15:43:30 UTC
I can confirm this on Debian wheezy but NOT on squeeze.
It seems some change in Kate is the cause here.
Comment 16 Dominik Haumann 2013-01-28 21:16:07 UTC
The reason the config is not saved is that no save-function is called of the ReadWritePart (which is a Kate Part in this case).

This worked until end of 2011, when Kate got a bug report that the config dialog incorrectly called writeConfig(): https://git.reviewboard.kde.org/r/101026
The Kate bug report is: https://bugs.kde.org/show_bug.cgi?id=270122

There are two ways to fix this:
1. Krusader loads a Kate Part indirectly through the query:
KService::Ptr ptr = KMimeTypeTrader::self()->preferredService("text/plain", "KParts/ReadWritePart");
It could load kate part explicitly to show text files, and then call save itself.

2. When Kate Part is loaded, it knows whether it is loaded as BrowserExtension or "directly as kate part". In case it is loaded as browser extension, it could call writeConfig() to save the data to krusaders KGlobal::config() object.

The 2nd variant is probably the correct fix. Any takers?
Start is http://kate-editor.org/get-it/ and part/utils/kateglobal.cpp (see reviewboard patch).
In katefactory.cpp there is a variable "bWantBrowserView", this is probably the bool flag you need to save in the KateGlobal singleton and then query in kateglobal.cpp at the end of KateGlobal::configDialog().
Comment 17 Dominik Haumann 2013-02-01 09:03:59 UTC
Uhm just stumbled over https://bugs.kde.org/show_bug.cgi?id=295197 which means this bug is fixed in KDE 4.10.

If distributions want to backport this fix, the corresponding patch is 
https://projects.kde.org/projects/kde/kde-baseapps/kate/repository/revisions/b51f7058ce33b2235711bc93b938756ac34dd90e/diff/part/view/kateview.cpp
Comment 18 Jan Lepper 2013-02-01 11:06:15 UTC
On Fri, 01 Feb 2013 09:03:59 +0000
Dominik Haumann <dhaumann@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=295197
> 
> Dominik Haumann <dhaumann@kde.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|CONFIRMED                   |RESOLVED
>    Version Fixed In|                            |4.10
>          Depends on|                            |297194
>          Resolution|---                         |FIXED
> 
> --- Comment #17 from Dominik Haumann <dhaumann@kde.org> ---
> Uhm just stumbled over https://bugs.kde.org/show_bug.cgi?id=295197
> which means this bug is fixed in KDE 4.10.
> 
> If distributions want to backport this fix, the corresponding patch
> is
> https://projects.kde.org/projects/kde/kde-baseapps/kate/repository/revisions/b51f7058ce33b2235711bc93b938756ac34dd90e/diff/part/view/kateview.cpp
> 

Thanks for spotting :-)
Comment 19 Don Danbury 2013-02-18 21:35:59 UTC
(In reply to comment #12)
> I have this issue on my Ubuntu 12.04 too, and it is very annoying. Yet i
> found a walkaround:
[...]

Great! This works fine. Thanks a lot!
Comment 20 Alex 2013-02-22 12:14:04 UTC
Looks like it is all working now on kde 4.10!
Comment 21 MaxiPunkt 2013-03-18 19:04:26 UTC
Just wanted to note that my system (Fedora 18)I was also affected by this bug.
I successfully worked around this problem by manually copying all [Kate * ]-sections into krusaderrc.

Today there were updates to KDE 4.10.1 - and the problem seems to be fixed now:
I can edit Krusader's editor-settings, and the settings will be kept, also when Krusader-application is closed and reopend again.

Thanks for fixing this.
Comment 22 Jekyll Wu 2013-04-18 02:27:51 UTC
*** Bug 318508 has been marked as a duplicate of this bug. ***
Comment 23 Jekyll Wu 2013-05-04 14:10:33 UTC
*** Bug 319300 has been marked as a duplicate of this bug. ***