Bug 452882 - Kate/Kwrite don't save tabulator settings as set by user
Summary: Kate/Kwrite don't save tabulator settings as set by user
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-22 22:34 UTC by Nathan Shearer
Modified: 2022-06-18 08:17 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Shearer 2022-04-22 22:34:10 UTC
I am trying to change settings in kwrite but they are never saved when the dialog is closed.

    Open kwrite
    Settings -> Configure Editor... -> Editing -> Indentation
    Change from "Tabulators" to "Tabulators and Spaces"
    Press OK
    Settings -> Configure Editor... -> Editing -> Indentation
    The change was not saved

Things I have tried:
    deleting ~/.config/kwriterc did not help
    I verified my entire .config folder is owned by my user

Others have reported the same problem.

This is actually a major problem for me because I needed to modify some config files without the whitespace being mangled, which is currently impossible in KWrite or Kate without being able to change some of the indenting defaults. I am forced to use a different editor altogether for now.
Comment 2 Christoph Cullmann 2022-05-05 18:09:43 UTC
This is intended behavior, Tabs and Spaces is only saved if the indentation width is != the tab width, else that is just the same as indent with tabs only.
Comment 3 Christoph Cullmann 2022-06-17 18:04:17 UTC
Wanted to close this.
It might look a bit confusing, but no settings are lost.
Comment 4 Lothar 2022-06-18 04:45:15 UTC
> Wanted to close this.

I hope Nathan will plead not to close this and give some examples when the current "smart" behavior is an issue.  
I have also stumbled upon this but wasn't annoyed enough to fix it.

> I am forced to use a different editor altogether for now.

That alone should be enough to think more about the current behavior, if it is really no issue. He will not file a report just to bother some KDE guys.

For me is the question wehre the benefit of the current "smart mangle" is. What's wrong to save each setting independent?

I guess Nathan could work around it by just using a different (hard)tab setting. Then looks the file not as desired but can edited as needed.
Comment 5 Christoph Cullmann 2022-06-18 08:17:07 UTC
There is nothing to be stored, if both sizes are equal, spaces will not be used for indentation.

If you indent by 2 and set tabs to 2, each indentation step will be a tab.
Even if you avoid our unification in the dialog or if we remove that.
It will then just pretend to do both but won't do it, therefore we did alter this years ago.

But perhaps I misunderstand the bug report but so far no further input was given here since my comment one month ago.